Add description section in html viewer, settable on setup/visual styles / 6 - #36
This commit is contained in:
parent
03ddd3dfbe
commit
6dcbbcc7cc
|
@ -491,6 +491,16 @@ $table_other->data[$row][0] = __('Default line thickness for the Visual Console'
|
||||||
$table_other->data[$row][1] = html_print_input_text ('vc_line_thickness', $config["vc_line_thickness"], '', 5, 5, true);
|
$table_other->data[$row][1] = html_print_input_text ('vc_line_thickness', $config["vc_line_thickness"], '', 5, 5, true);
|
||||||
$row++;
|
$row++;
|
||||||
|
|
||||||
|
// Enrique (27/01/2017) New feature: Show report info on top of reports
|
||||||
|
$table_other->data[$row][0] = __('Show report info with description') .
|
||||||
|
ui_print_help_tip(
|
||||||
|
__('Custom report description info. It will be applied to all reports and templates by default.'), true);
|
||||||
|
$table_other->data[$row][1] = html_print_checkbox('custom_report_info', 1,
|
||||||
|
$config['custom_report_info'], true);
|
||||||
|
$row++;
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
|
||||||
// Juanma (07/05/2014) New feature: Table for custom front page for reports
|
// Juanma (07/05/2014) New feature: Table for custom front page for reports
|
||||||
$table_other->data[$row][0] = __('Custom report front page') .
|
$table_other->data[$row][0] = __('Custom report front page') .
|
||||||
ui_print_help_tip(
|
ui_print_help_tip(
|
||||||
|
@ -500,28 +510,6 @@ $table_other->data[$row][1] = html_print_checkbox('custom_report_front', 1,
|
||||||
$row++;
|
$row++;
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$dirItems = scandir($config['homedir'] . '/images/custom_logo');
|
$dirItems = scandir($config['homedir'] . '/images/custom_logo');
|
||||||
foreach ($dirItems as $entryDir) {
|
foreach ($dirItems as $entryDir) {
|
||||||
if (strstr($entryDir, '.jpg') !== false) {
|
if (strstr($entryDir, '.jpg') !== false) {
|
||||||
|
|
|
@ -593,10 +593,9 @@ function config_update_config () {
|
||||||
if (!config_update_value ('interval_values', $interval_values))
|
if (!config_update_value ('interval_values', $interval_values))
|
||||||
$error_update[] = __('Delete interval');
|
$error_update[] = __('Delete interval');
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
|
if (!config_update_value ('custom_report_info', get_parameter('custom_report_info')))
|
||||||
|
$error_update[] = __('Custom report info');
|
||||||
|
|
||||||
|
|
||||||
// Juanma (06/05/2014) New feature: Custom front page for reports
|
// Juanma (06/05/2014) New feature: Custom front page for reports
|
||||||
if (!config_update_value ('custom_report_front', get_parameter('custom_report_front')))
|
if (!config_update_value ('custom_report_front', get_parameter('custom_report_front')))
|
||||||
$error_update[] = __('Custom report front');
|
$error_update[] = __('Custom report front');
|
||||||
|
|
|
@ -100,7 +100,39 @@ function reporting_html_header(&$table, $mini, $title, $subtitle,
|
||||||
array_push ($table->data, $data);
|
array_push ($table->data, $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
function reporting_html_print_report($report, $mini = false) {
|
function html_do_report_info($report) {
|
||||||
|
global $config;
|
||||||
|
|
||||||
|
$date_today = date ($config["date_format"]);
|
||||||
|
|
||||||
|
$html = '<div style="border: 1px dashed #999; padding: 10px 15px; background: #f5f5f5;margin-top:20px;margin-bottom:20px;">' .
|
||||||
|
'<table>
|
||||||
|
<tr>
|
||||||
|
<td><b>' . __('Generated') . ': </b></td><td>' . $date_today . '</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><b>' . __('Report date') . ': </b></td>';
|
||||||
|
if (isset($report['period'])) {
|
||||||
|
$html .= '<td>' . date($config["date_format"], ($report['datetime'] - $report['period']));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$html .= '<td>' . __('Items period before') . ' <b>' . date($config["date_format"], $report['datetime']) . '</b></td>';
|
||||||
|
}
|
||||||
|
$html .= '</tr>
|
||||||
|
<tr>
|
||||||
|
<td valign="top"><b>' . __('Description') . ': </b></td><td>' . io_safe_output($report['description']) . '</td>
|
||||||
|
</tr>
|
||||||
|
</table>' .
|
||||||
|
'</div>';
|
||||||
|
|
||||||
|
echo $html;
|
||||||
|
}
|
||||||
|
|
||||||
|
function reporting_html_print_report($report, $mini = false, $report_info = 1) {
|
||||||
|
|
||||||
|
if($report_info == 1){
|
||||||
|
html_do_report_info($report);
|
||||||
|
}
|
||||||
|
|
||||||
foreach ($report['contents'] as $key => $item) {
|
foreach ($report['contents'] as $key => $item) {
|
||||||
$table = new stdClass();
|
$table = new stdClass();
|
||||||
|
|
|
@ -221,7 +221,7 @@ if ($enable_init_date) {
|
||||||
$report = reporting_make_reporting_data(null, $id_report, $date, $time,
|
$report = reporting_make_reporting_data(null, $id_report, $date, $time,
|
||||||
$period, 'dinamic');
|
$period, 'dinamic');
|
||||||
|
|
||||||
reporting_html_print_report($report);
|
reporting_html_print_report($report,false,$config['custom_report_info']);
|
||||||
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
Loading…
Reference in New Issue