Merge branch '32-anadir-seccion-description-a-html-view-integria-4323' into 'develop'
Add description section in html viewer, settable on setup/visual styles - #36 See merge request !86
This commit is contained in:
commit
f5169b4816
|
@ -497,6 +497,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);
|
||||
$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
|
||||
$table_other->data[$row][0] = __('Custom report front page') .
|
||||
ui_print_help_tip(
|
||||
|
@ -506,28 +516,6 @@ $table_other->data[$row][1] = html_print_checkbox('custom_report_front', 1,
|
|||
$row++;
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$dirItems = scandir($config['homedir'] . '/images/custom_logo');
|
||||
foreach ($dirItems as $entryDir) {
|
||||
if (strstr($entryDir, '.jpg') !== false) {
|
||||
|
|
|
@ -608,7 +608,8 @@ function config_update_config () {
|
|||
$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
|
||||
|
|
|
@ -100,7 +100,40 @@ function reporting_html_header(&$table, $mini, $title, $subtitle,
|
|||
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) {
|
||||
$table = new stdClass();
|
||||
$table->size = array ();
|
||||
|
|
|
@ -220,8 +220,7 @@ if ($enable_init_date) {
|
|||
|
||||
$report = reporting_make_reporting_data(null, $id_report, $date, $time,
|
||||
$period, 'dinamic');
|
||||
|
||||
reporting_html_print_report($report);
|
||||
reporting_html_print_report($report,false,$config['custom_report_info']);
|
||||
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in New Issue