Merge branch 'ent-5082-setup-visual-styles-reports' into 'develop'
Grouped report items on styles conf. Fixed font bug See merge request artica/pandorafms!2953
This commit is contained in:
commit
13ac0a6229
|
@ -632,8 +632,24 @@ $row++;
|
|||
$table_font->size[0] = '50%';
|
||||
$table_font->data = [];
|
||||
|
||||
$table_font->data[$row][0] = __('Font path');
|
||||
$fonts = load_fonts();
|
||||
$table_font->data[$row][0] = __('Graphs font family');
|
||||
|
||||
// Load font families.
|
||||
$fonts = [];
|
||||
$dirFonts = scandir(_MPDF_TTFONTPATH);
|
||||
foreach ($dirFonts as $entryDir) {
|
||||
if (strstr($entryDir, '.ttf') !== false) {
|
||||
$explode = explode('-', $entryDir);
|
||||
if (count($explode) === 1) {
|
||||
$fonts[$entryDir] = substr($entryDir, 0, (strlen($entryDir) - 4));
|
||||
}
|
||||
|
||||
if ($explode[1] === 'Regular.ttf') {
|
||||
$fonts[$explode[0].'.ttf'] = $explode[0];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$table_font->data[$row][1] = html_print_select(
|
||||
$fonts,
|
||||
'fontpath',
|
||||
|
@ -646,7 +662,7 @@ $row++;
|
|||
|
||||
$row++;
|
||||
|
||||
$table_font->data[$row][0] = __('Font size');
|
||||
$table_font->data[$row][0] = __('Graphs font size');
|
||||
|
||||
$font_size_array = [
|
||||
1 => 1,
|
||||
|
@ -882,14 +898,6 @@ $row++;
|
|||
$table_chars->data[$row][1] = html_print_select($options_zoom_graphs, 'zoom_graph', $config['zoom_graph'], '', '', 0, true, false, false);
|
||||
$row++;
|
||||
|
||||
$table_chars->data[$row][0] = __('Graph image height for HTML reports');
|
||||
$table_chars->data[$row][0] .= ui_print_help_tip(
|
||||
__('This is the height in pixels of the module graph or custom graph in the reports (only: HTML)'),
|
||||
true
|
||||
);
|
||||
$table_chars->data[$row][1] = html_print_input_text('graph_image_height', $config['graph_image_height'], '', 20, 20, true);
|
||||
$row++;
|
||||
|
||||
/*
|
||||
$table_font->data[$row][0] = __('Font path');
|
||||
$fonts = load_fonts();
|
||||
|
@ -996,21 +1004,20 @@ $row++;
|
|||
echo '</fieldset>';
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
// OTHER CONFIGURATION
|
||||
// Reports
|
||||
// ----------------------------------------------------------------------
|
||||
$table_other = new stdClass();
|
||||
$table_other->width = '100%';
|
||||
$table_other->class = 'databox filters';
|
||||
$table_other->style[0] = 'font-weight: bold;';
|
||||
$table_other->size[0] = '50%';
|
||||
$table_other->data = [];
|
||||
$table_report = new stdClass();
|
||||
$table_report->width = '100%';
|
||||
$table_report->class = 'databox filters';
|
||||
$table_report->style[0] = 'font-weight: bold;';
|
||||
$table_report->size[0] = '50%';
|
||||
$table_report->data = [];
|
||||
|
||||
// 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(
|
||||
$table_report->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_switch(
|
||||
$table_report->data[$row][1] = html_print_checkbox_switch(
|
||||
'custom_report_info',
|
||||
1,
|
||||
$config['custom_report_info'],
|
||||
|
@ -1018,13 +1025,11 @@ $row++;
|
|||
);
|
||||
$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(
|
||||
$table_report->data[$row][0] = __('Custom report front page').ui_print_help_tip(
|
||||
__('Custom report front page. It will be applied to all reports and templates by default.'),
|
||||
true
|
||||
);
|
||||
$table_other->data[$row][1] = html_print_checkbox_switch(
|
||||
$table_report->data[$row][1] = html_print_checkbox_switch(
|
||||
'custom_report_front',
|
||||
1,
|
||||
$config['custom_report_front'],
|
||||
|
@ -1033,11 +1038,19 @@ $row++;
|
|||
|
||||
$row++;
|
||||
|
||||
$table_other->data[$row][0] = __('Font size for items reports');
|
||||
$table_other->data[$row][1] = "<input type ='number' value=".$config['font_size_item_report']." size='1' name='font_size_item_report' min='1' max='9' step='0.1'>";
|
||||
$table_report->data[$row][0] = __('PDF font size');
|
||||
$table_report->data[$row][1] = "<input type ='number' value=".$config['font_size_item_report']." size='1' name='font_size_item_report' min='1' max='9' step='0.1'>";
|
||||
|
||||
$row++;
|
||||
|
||||
$table_report->data[$row][0] = __('Graph image height for HTML reports');
|
||||
$table_report->data[$row][0] .= ui_print_help_tip(
|
||||
__('This is the height in pixels of the module graph or custom graph in the reports (only: HTML)'),
|
||||
true
|
||||
);
|
||||
$table_report->data[$row][1] = html_print_input_text('graph_image_height', $config['graph_image_height'], '', 20, 20, true);
|
||||
$row++;
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
$dirItems = scandir($config['homedir'].'/images/custom_logo');
|
||||
foreach ($dirItems as $entryDir) {
|
||||
|
@ -1046,25 +1059,10 @@ $row++;
|
|||
}
|
||||
}
|
||||
|
||||
$_fonts = [];
|
||||
$dirFonts = scandir(_MPDF_TTFONTPATH);
|
||||
foreach ($dirFonts as $entryDir) {
|
||||
if (strstr($entryDir, '.ttf') !== false) {
|
||||
$explode = explode('-', $entryDir);
|
||||
if (count($explode) === 1) {
|
||||
$fonts[$entryDir] = substr($entryDir, 0, (strlen($entryDir) - 4));
|
||||
}
|
||||
|
||||
if ($explode[1] === 'Regular.ttf') {
|
||||
$fonts[$explode[0].'.ttf'] = $explode[0];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Font
|
||||
$table_other->data['custom_report_front-font'][0] = __('Custom report front').' - '.__('Font family');
|
||||
$table_other->data['custom_report_front-font'][1] = html_print_select(
|
||||
$_fonts,
|
||||
$table_report->data['custom_report_front-font'][0] = __('Custom report front').' - '.__('Font family');
|
||||
$table_report->data['custom_report_front-font'][1] = html_print_select(
|
||||
$fonts,
|
||||
'custom_report_front_font',
|
||||
$config['custom_report_front_font'],
|
||||
false,
|
||||
|
@ -1074,11 +1072,11 @@ $row++;
|
|||
);
|
||||
|
||||
// Logo
|
||||
$table_other->data['custom_report_front-logo'][0] = __('Custom report front').' - '.__('Custom logo').ui_print_help_tip(
|
||||
$table_report->data['custom_report_front-logo'][0] = __('Custom report front').' - '.__('Custom logo').ui_print_help_tip(
|
||||
__("The dir of custom logos is in your www Console in 'images/custom_logo'. You can upload more files (ONLY JPEG AND PNG) in upload tool in console."),
|
||||
true
|
||||
);
|
||||
$table_other->data['custom_report_front-logo'][1] = html_print_select(
|
||||
$table_report->data['custom_report_front-logo'][1] = html_print_select(
|
||||
$customLogos,
|
||||
'custom_report_front_logo',
|
||||
io_safe_output($config['custom_report_front_logo']),
|
||||
|
@ -1088,16 +1086,16 @@ $row++;
|
|||
true
|
||||
);
|
||||
// Preview
|
||||
$table_other->data['custom_report_front-preview'][0] = __('Custom report front').' - '.'Preview';
|
||||
$table_report->data['custom_report_front-preview'][0] = __('Custom report front').' - '.'Preview';
|
||||
if (empty($config['custom_report_front_logo'])) {
|
||||
$config['custom_report_front_logo'] = 'images/pandora_logo_white.jpg';
|
||||
}
|
||||
|
||||
$table_other->data['custom_report_front-preview'][1] = '<span id="preview_image">'.html_print_image($config['custom_report_front_logo'], true).'</span>';
|
||||
$table_report->data['custom_report_front-preview'][1] = '<span id="preview_image">'.html_print_image($config['custom_report_front_logo'], true).'</span>';
|
||||
|
||||
// Header
|
||||
$table_other->data['custom_report_front-header'][0] = __('Custom report front').' - '.__('Header');
|
||||
$table_other->data['custom_report_front-header'][1] = html_print_textarea(
|
||||
$table_report->data['custom_report_front-header'][0] = __('Custom report front').' - '.__('Header');
|
||||
$table_report->data['custom_report_front-header'][1] = html_print_textarea(
|
||||
'custom_report_front_header',
|
||||
5,
|
||||
15,
|
||||
|
@ -1107,13 +1105,13 @@ $row++;
|
|||
);
|
||||
|
||||
// First page
|
||||
$table_other->data['custom_report_front-first_page'][0] = __('Custom report front').' - '.__('First page');
|
||||
$table_report->data['custom_report_front-first_page'][0] = __('Custom report front').' - '.__('First page');
|
||||
$custom_report_front_firstpage = str_replace(
|
||||
'(_URLIMAGE_)',
|
||||
ui_get_full_url(false, true, false, false),
|
||||
$config['custom_report_front_firstpage']
|
||||
);
|
||||
$table_other->data['custom_report_front-first_page'][1] = html_print_textarea(
|
||||
$table_report->data['custom_report_front-first_page'][1] = html_print_textarea(
|
||||
'custom_report_front_firstpage',
|
||||
15,
|
||||
15,
|
||||
|
@ -1123,8 +1121,8 @@ $row++;
|
|||
);
|
||||
|
||||
// Footer
|
||||
$table_other->data['custom_report_front-footer'][0] = __('Custom report front').' - '.__('Footer');
|
||||
$table_other->data['custom_report_front-footer'][1] = html_print_textarea(
|
||||
$table_report->data['custom_report_front-footer'][0] = __('Custom report front').' - '.__('Footer');
|
||||
$table_report->data['custom_report_front-footer'][1] = html_print_textarea(
|
||||
'custom_report_front_footer',
|
||||
5,
|
||||
15,
|
||||
|
@ -1133,6 +1131,22 @@ $row++;
|
|||
true
|
||||
);
|
||||
|
||||
echo '<fieldset>';
|
||||
echo '<legend>'.__('Reports configuration').'</legend>';
|
||||
html_print_table($table_report);
|
||||
echo '</fieldset>';
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
// OTHER CONFIGURATION
|
||||
// ----------------------------------------------------------------------
|
||||
$table_other = new stdClass();
|
||||
$table_other->width = '100%';
|
||||
$table_other->class = 'databox filters';
|
||||
$table_other->style[0] = 'font-weight: bold;';
|
||||
$table_other->size[0] = '50%';
|
||||
$table_other->data = [];
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue