diff --git a/htdocs/adherents/index.php b/htdocs/adherents/index.php index aa9f86c8efe..7b4d2f6bba9 100644 --- a/htdocs/adherents/index.php +++ b/htdocs/adherents/index.php @@ -318,8 +318,8 @@ print ""; print "
\n"; - print $resultboxes['boxlista']; + print ''."\n"; print '
'; diff --git a/htdocs/admin/boxes.php b/htdocs/admin/boxes.php index 4cb24cc62df..b28c81a25b1 100644 --- a/htdocs/admin/boxes.php +++ b/htdocs/admin/boxes.php @@ -40,7 +40,7 @@ $action = GETPOST('action', 'aZ09'); // Define possible position of boxes -$pos_name = InfoBox::getListOfPagesForBoxes(); +$arrayofhomepages = InfoBox::getListOfPagesForBoxes(); $boxes = array(); @@ -348,7 +348,7 @@ foreach ($boxtoadd as $box) { // For each possible position, an activation link is displayed if the box is not already active for that position print ''; - print $form->selectarray("boxid[".$box->box_id."][pos]", $pos_name, -1, 1, 0, 0, '', 1)."\n"; + print $form->selectarray("boxid[".$box->box_id."][pos]", $arrayofhomepages, -1, 1, 0, 0, '', 1)."\n"; print ''."\n"; print ''; @@ -406,7 +406,7 @@ foreach ($boxactivated as $key => $box) { print ($box->note ? $box->note : ' '); } print ''; - print ''.(empty($pos_name[$box->position]) ? '' : $langs->trans($pos_name[$box->position])).''; + print ''.(empty($arrayofhomepages[$box->position]) ? '' : $langs->trans($arrayofhomepages[$box->position])).''; $hasnext = ($key < (count($boxactivated) - 1)); $hasprevious = ($key != 0); print ''.($key + 1).''; diff --git a/htdocs/core/boxes/box_nb_ticket_last_x_days.php b/htdocs/core/boxes/box_graph_nb_ticket_last_x_days.php similarity index 99% rename from htdocs/core/boxes/box_nb_ticket_last_x_days.php rename to htdocs/core/boxes/box_graph_nb_ticket_last_x_days.php index 4cf5adba252..9595d264ee4 100644 --- a/htdocs/core/boxes/box_nb_ticket_last_x_days.php +++ b/htdocs/core/boxes/box_graph_nb_ticket_last_x_days.php @@ -157,7 +157,10 @@ class box_nb_ticket_last_x_days extends ModeleBoxes $stringtoshow .= ''; $stringtoshow .= ''; $stringtoshow .= '
'; + + include_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php'; $px1 = new DolGraph(); + $mesg = $px1->isGraphKo(); $totalnb = 0; if (!$mesg) { diff --git a/htdocs/core/boxes/box_nb_tickets_type.php b/htdocs/core/boxes/box_graph_nb_tickets_type.php similarity index 98% rename from htdocs/core/boxes/box_nb_tickets_type.php rename to htdocs/core/boxes/box_graph_nb_tickets_type.php index c73eeac97f3..10eebc05b06 100644 --- a/htdocs/core/boxes/box_nb_tickets_type.php +++ b/htdocs/core/boxes/box_graph_nb_tickets_type.php @@ -151,7 +151,9 @@ class box_nb_tickets_type extends ModeleBoxes $stringtoprint = ''; $stringtoprint .= '
'; if (!empty($dataseries) && count($dataseries) > 0) { + include_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php'; $px1 = new DolGraph(); + $mesg = $px1->isGraphKo(); $totalnb = 0; if (!$mesg) { diff --git a/htdocs/core/boxes/box_new_vs_close_ticket.php b/htdocs/core/boxes/box_graph_new_vs_close_ticket.php similarity index 98% rename from htdocs/core/boxes/box_new_vs_close_ticket.php rename to htdocs/core/boxes/box_graph_new_vs_close_ticket.php index 56544257460..32eb82984e7 100644 --- a/htdocs/core/boxes/box_new_vs_close_ticket.php +++ b/htdocs/core/boxes/box_graph_new_vs_close_ticket.php @@ -131,6 +131,7 @@ class box_new_vs_close_ticket extends ModeleBoxes $stringtoprint = ''; $stringtoprint .= '
'; if (!empty($data) && count($data) > 0) { + include_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php'; $px1 = new DolGraph(); $mesg = $px1->isGraphKo(); if (!$mesg) { diff --git a/htdocs/core/boxes/box_ticket_by_severity.php b/htdocs/core/boxes/box_ticket_by_severity.php index 3f9ef17308c..52c3e938798 100644 --- a/htdocs/core/boxes/box_ticket_by_severity.php +++ b/htdocs/core/boxes/box_ticket_by_severity.php @@ -157,6 +157,7 @@ class box_ticket_by_severity extends ModeleBoxes $stringtoprint = ''; $stringtoprint .= '
'; if (!empty($dataseries) && count($dataseries) > 0) { + include_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php'; $px1 = new DolGraph(); $mesg = $px1->isGraphKo(); $totalnb = 0; diff --git a/htdocs/core/class/infobox.class.php b/htdocs/core/class/infobox.class.php index e18689e3c2f..076dace54f0 100644 --- a/htdocs/core/class/infobox.class.php +++ b/htdocs/core/class/infobox.class.php @@ -40,17 +40,18 @@ class InfoBox if (empty($conf->global->MAIN_FEATURES_LEVEL) || $conf->global->MAIN_FEATURES_LEVEL < 2) { return array( 0 => 'Home', - 1 => 'userhome', - 2 => 'membersindex', - 3 => 'thirdpartiesindex', + 1 => 'UsersHome', + 2 => 'MembersHome', + 3 => 'ThirdpartiesHome', + 11 => 'TicketsHome', 27 => 'AccountancyHome' ); } else { return array( 0 => 'Home', - 1 => 'userhome', - 2 => 'membersindex', - 3 => 'thirdpartiesindex', + 1 => 'UsersHome', + 2 => 'MembersHome', + 3 => 'ThirdpartiesHome', 4 => 'productindex', 5 => 'productindex', 6 => 'mrpindex', @@ -58,7 +59,7 @@ class InfoBox 8 => 'projectsindex', 9 => 'invoiceindex', 10 => 'hrmindex', - 11 => 'ticketsindex', + 11 => 'TicketsHome', 12 => 'stockindex', 13 => 'sendingindex', 14 => 'receptionindex', diff --git a/htdocs/install/mysql/migration/13.0.0-14.0.0.sql b/htdocs/install/mysql/migration/13.0.0-14.0.0.sql index 4a81f5f0d20..29c41cdb7e8 100644 --- a/htdocs/install/mysql/migration/13.0.0-14.0.0.sql +++ b/htdocs/install/mysql/migration/13.0.0-14.0.0.sql @@ -257,7 +257,12 @@ UPDATE llx_payment_salary as ps SET ps.ref = ps.rowid WHERE ps.ref IS NULL; ALTER TABLE llx_salary CHANGE paye paye smallint default 0 NOT NULL; --- VMYSQL4.1 INSERT INTO llx_boxes_def (file, entity) SELECT 'box_ticket_by_severity.php', 1 FROM DUAL WHERE NOT EXISTS (SELECT * FROM llx_boxes_def WHERE file = 'box_ticket_by_severity.php' AND entity = 1); --- VMYSQL4.1 INSERT INTO llx_boxes_def (file, entity) SELECT 'box_nb_ticket_last_x_days.php', 1 FROM DUAL WHERE NOT EXISTS (SELECT * FROM llx_boxes_def WHERE file = 'box_nb_ticket_last_x_days.php' AND entity = 1); --- VMYSQL4.1 INSERT INTO llx_boxes_def (file, entity) SELECT 'box_nb_tickets_type.php', 1 FROM DUAL WHERE NOT EXISTS (SELECT * FROM llx_boxes_def WHERE file = 'box_nb_tickets_type.php' AND entity = 1); --- VMYSQL4.1 INSERT INTO llx_boxes_def (file, entity) SELECT 'box_new_vs_close_ticket.php', 1 FROM DUAL WHERE NOT EXISTS (SELECT * FROM llx_boxes_def WHERE file = 'box_new_vs_close_ticket.php' AND entity = 1); + +DELETE FROM llx_boxes WHERE box_id IN (SELECT rowid FROM llx_boxes_def WHERE file IN ('box_ticket_by_severity.php', 'box_graph_nb_ticket_last_x_days.php', 'box_graph_nb_tickets_type.php', 'box_graph_new_vs_close_ticket.php')); + +DELETE FROM llx_boxes_def WHERE file IN ('box_ticket_by_severity.php', 'box_graph_nb_ticket_last_x_days.php', 'box_graph_nb_tickets_type.php', 'box_graph_new_vs_close_ticket.php'); + +-- VMYSQL4.1 INSERT INTO llx_boxes_def (file, entity) SELECT 'box_graph_ticket_by_severity.php', 1 FROM DUAL WHERE NOT EXISTS (SELECT * FROM llx_boxes_def WHERE file = 'box_ticket_by_severity.php' AND entity = 1); +-- VMYSQL4.1 INSERT INTO llx_boxes_def (file, entity) SELECT 'box_graph_nb_ticket_last_x_days.php', 1 FROM DUAL WHERE NOT EXISTS (SELECT * FROM llx_boxes_def WHERE file = 'box_nb_ticket_last_x_days.php' AND entity = 1); +-- VMYSQL4.1 INSERT INTO llx_boxes_def (file, entity) SELECT 'box_graph_nb_tickets_type.php', 1 FROM DUAL WHERE NOT EXISTS (SELECT * FROM llx_boxes_def WHERE file = 'box_nb_tickets_type.php' AND entity = 1); +-- VMYSQL4.1 INSERT INTO llx_boxes_def (file, entity) SELECT 'box_graph_new_vs_close_ticket.php', 1 FROM DUAL WHERE NOT EXISTS (SELECT * FROM llx_boxes_def WHERE file = 'box_new_vs_close_ticket.php' AND entity = 1); diff --git a/htdocs/langs/en_US/boxes.lang b/htdocs/langs/en_US/boxes.lang index 6e70999fd77..981b63500ac 100644 --- a/htdocs/langs/en_US/boxes.lang +++ b/htdocs/langs/en_US/boxes.lang @@ -111,5 +111,9 @@ BoxTitleLastCustomerShipments=Latest %s customer shipments NoRecordedShipments=No recorded customer shipment BoxCustomersOutstandingBillReached=Customers with oustanding limit reached # Pages -AccountancyHome=Accountancy +UsersHome=Home users and groups +MembersHome=Home Membership +ThirdpartiesHome=Home Thirdparties +TicketsHome=Home Tickets +AccountancyHome=Home Accountancy ValidatedProjects=Validated projects diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index f4a1569c8ce..f9559ecf7a9 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -1845,12 +1845,15 @@ div.fichehalfright { print "margin-top: 10px;\n"; } ?> } -div.firstcolumn div.box { + +/*div.firstcolumn div.box { padding-right: 10px; } div.secondcolumn div.box { padding-left: 10px; -} +}*/ + + /* Force values on one colum for small screen */ @media only screen and (max-width: 1000px) { diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index e602cadb6a6..4d58c4423d4 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -1846,12 +1846,14 @@ div.fichehalfright { print "margin-top: 10px;\n"; } ?> } -div.firstcolumn div.box { + +/*div.firstcolumn div.box { padding-right: 10px; } div.secondcolumn div.box { padding-left: 10px; -} +}*/ + /* Force values on one colum for small screen */ @media only screen and (max-width: 900px) { diff --git a/htdocs/ticket/index.php b/htdocs/ticket/index.php index 1495b597774..31a1efe2481 100644 --- a/htdocs/ticket/index.php +++ b/htdocs/ticket/index.php @@ -114,7 +114,12 @@ $startyear = $endyear - 1; $WIDTH = (($shownb && $showtot) || !empty($conf->dol_optimize_smallscreen)) ? '100%' : '80%'; $HEIGHT = '200'; -print '
'; +print '
'; +print '
'; + +print '
'; + +print '
'; /* * Statistics area @@ -281,8 +286,13 @@ print '
'; // Build graphic number of object $data = $stats->getNbByMonthWithPrevYear($endyear, $startyear); -print '
'; +print '
'."\n"; +print $resultboxes['boxlista']; + +print '
'."\n"; + +print '
'; /* * Latest tickets @@ -400,28 +410,20 @@ if ($result) { dol_print_error($db); } -print '
'; - -/* -* Show boxes -*/ -$boxlist .= '
'; -$boxlist .= '
'; -$boxlist .= $resultboxes['boxlista']; -$boxlist .= '
'; -$boxlist .= '
'; -$boxlist .= $resultboxes['boxlistb']; -$boxlist .= '
'; -$boxlist .= "\n"; -$boxlist .= '
'; -print $boxlist; +print $resultboxes['boxlistb']; print '
'; +print '
'; +print '
'; + + print '
'; $parameters = array('user' => $user); $reshook = $hookmanager->executeHooks('dashboardTickets', $parameters, $object); // Note that $action and $object may have been modified by hook + + // End of page llxFooter(''); $db->close();