Update dashboard tab
This commit is contained in:
parent
a1d3e21e77
commit
006481cdff
@ -208,7 +208,7 @@ if ($action == 'update') {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($mode == 'dashboard') {
|
if ($mode == 'dashboard') {
|
||||||
|
dolibarr_set_const($db, "MAIN_MOTD", dol_htmlcleanlastbr(GETPOST("main_motd", 'restricthtml')), 'chaine', 0, '', $conf->entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($mode == 'other') {
|
if ($mode == 'other') {
|
||||||
@ -226,8 +226,6 @@ if ($action == 'update') {
|
|||||||
dolibarr_set_const($db, "MAIN_BUGTRACK_ENABLELINK", GETPOST("MAIN_BUGTRACK_ENABLELINK", 'alpha'), 'chaine', 0, '', $conf->entity);
|
dolibarr_set_const($db, "MAIN_BUGTRACK_ENABLELINK", GETPOST("MAIN_BUGTRACK_ENABLELINK", 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||||
|
|
||||||
dolibarr_set_const($db, "MAIN_FIRSTNAME_NAME_POSITION", GETPOST("MAIN_FIRSTNAME_NAME_POSITION", 'aZ09'), 'chaine', 0, '', $conf->entity);
|
dolibarr_set_const($db, "MAIN_FIRSTNAME_NAME_POSITION", GETPOST("MAIN_FIRSTNAME_NAME_POSITION", 'aZ09'), 'chaine', 0, '', $conf->entity);
|
||||||
|
|
||||||
dolibarr_set_const($db, "MAIN_MOTD", dol_htmlcleanlastbr(GETPOST("main_motd", 'restricthtml')), 'chaine', 0, '', $conf->entity);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($mode == 'login') {
|
if ($mode == 'login') {
|
||||||
@ -337,75 +335,105 @@ if ($mode == 'dashboard') {
|
|||||||
print '<div class="div-table-responsive-no-min">';
|
print '<div class="div-table-responsive-no-min">';
|
||||||
print '<table summary="blockdashboard" class="noborder centpercent editmode tableforfield">';
|
print '<table summary="blockdashboard" class="noborder centpercent editmode tableforfield">';
|
||||||
|
|
||||||
print '<tr class="liste_titre"><th class="titlefieldmiddle" colspan="2">';
|
// Message of the day on home page
|
||||||
print $langs->trans("DashboardEnableBlockToShow");
|
$substitutionarray = getCommonSubstitutionArray($langs, 0, array('object', 'objectamount'));
|
||||||
print '</th></tr>';
|
complete_substitutions_array($substitutionarray, $langs);
|
||||||
|
|
||||||
// Block meteo
|
print '<tr class="oddeven width25p"><td>';
|
||||||
print '<tr class="oddeven"><td>' . $langs->trans('MAIN_DISABLE_METEO') . '</td><td>';
|
$texthelp = $langs->trans("FollowingConstantsWillBeSubstituted") . '<br>';
|
||||||
print ajax_constantonoff("MAIN_DISABLE_METEO", array(), $conf->entity, 0, 0, 1, 0);
|
foreach ($substitutionarray as $key => $val) {
|
||||||
|
$texthelp .= $key . '<br>';
|
||||||
|
}
|
||||||
|
print $form->textwithpicto($langs->trans("MessageOfDay"), $texthelp, 1, 'help', '', 0, 2, 'tooltipmessageofday');
|
||||||
|
|
||||||
|
print '</td><td>';
|
||||||
|
|
||||||
|
$doleditor = new DolEditor('main_motd', (isset($conf->global->MAIN_MOTD) ? $conf->global->MAIN_MOTD : ''), '', 142, 'dolibarr_notes', 'In', false, true, true, ROWS_4, '90%');
|
||||||
|
$doleditor->Create();
|
||||||
|
|
||||||
|
print '</td></tr>' . "\n";
|
||||||
|
|
||||||
|
print '<tr class="oddeven"><td>' . $langs->trans('DashboardDisableGlobal') . '</td><td>';
|
||||||
|
print ajax_constantonoff("MAIN_DISABLE_GLOBAL_WORKBOARD", array(), $conf->entity, 0, 0, 1, 0);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Block agenda
|
print '<tr class="oddeven"><td>' . $langs->trans('BoxstatsDisableGlobal') . '</td><td>';
|
||||||
print '<tr class="oddeven"><td>' . $langs->trans('DashboardDisableBlockAgenda') . '</td><td>';
|
print ajax_constantonoff("MAIN_DISABLE_GLOBAL_BOXSTATS", array(), $conf->entity, 0, 0, 1, 0);
|
||||||
print ajax_constantonoff("MAIN_DISABLE_BLOCK_AGENDA", array(), $conf->entity, 0, 0, 1, 0);
|
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Block agenda
|
if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) {
|
||||||
print '<tr class="oddeven"><td>' . $langs->trans('DashboardDisableBlockProject') . '</td><td>';
|
print '<tr class="liste_titre"><td class="titlefieldmiddle">';
|
||||||
print ajax_constantonoff("MAIN_DISABLE_BLOCK_PROJECT", array(), $conf->entity, 0, 0, 1, 0);
|
print $langs->trans("DashboardDisableBlocks");
|
||||||
print '</td>';
|
print '</td><td class="titlefieldmiddle"></td></tr>';
|
||||||
print '</tr>';
|
|
||||||
|
|
||||||
// Block customer
|
// Block meteo
|
||||||
print '<tr class="oddeven"><td>' . $langs->trans('DashboardDisableBlockCustomer') . '</td><td>';
|
print '<tr class="oddeven"><td>' . $langs->trans('MAIN_DISABLE_METEO') . '</td><td>';
|
||||||
print ajax_constantonoff("MAIN_DISABLE_BLOCK_CUSTOMER", array(), $conf->entity, 0, 0, 1, 0);
|
print ajax_constantonoff("MAIN_DISABLE_METEO", array(), $conf->entity, 0, 0, 1, 0);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Block supplier
|
// Block agenda
|
||||||
print '<tr class="oddeven"><td>' . $langs->trans('DashboardDisableBlockSupplier') . '</td><td>';
|
print '<tr class="oddeven"><td>' . $langs->trans('DashboardDisableBlockAgenda') . '</td><td>';
|
||||||
print ajax_constantonoff("MAIN_DISABLE_BLOCK_SUPPLIER", array(), $conf->entity, 0, 0, 1, 0);
|
print ajax_constantonoff("MAIN_DISABLE_BLOCK_AGENDA", array(), $conf->entity, 0, 0, 1, 0);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Block contract
|
// Block agenda
|
||||||
print '<tr class="oddeven"><td>' . $langs->trans('DashboardDisableBlockContract') . '</td><td>';
|
print '<tr class="oddeven"><td>' . $langs->trans('DashboardDisableBlockProject') . '</td><td>';
|
||||||
print ajax_constantonoff("MAIN_DISABLE_BLOCK_CONTRACT", array(), $conf->entity, 0, 0, 1, 0);
|
print ajax_constantonoff("MAIN_DISABLE_BLOCK_PROJECT", array(), $conf->entity, 0, 0, 1, 0);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Block ticket
|
// Block customer
|
||||||
print '<tr class="oddeven"><td>' . $langs->trans('DashboardDisableBlockTicket') . '</td><td>';
|
print '<tr class="oddeven"><td>' . $langs->trans('DashboardDisableBlockCustomer') . '</td><td>';
|
||||||
print ajax_constantonoff("MAIN_DISABLE_BLOCK_TICKET", array(), $conf->entity, 0, 0, 1, 0);
|
print ajax_constantonoff("MAIN_DISABLE_BLOCK_CUSTOMER", array(), $conf->entity, 0, 0, 1, 0);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Block bank
|
// Block supplier
|
||||||
print '<tr class="oddeven"><td>' . $langs->trans('DashboardDisableBlockBank') . '</td><td>';
|
print '<tr class="oddeven"><td>' . $langs->trans('DashboardDisableBlockSupplier') . '</td><td>';
|
||||||
print ajax_constantonoff("MAIN_DISABLE_BLOCK_BANK", array(), $conf->entity, 0, 0, 1, 0);
|
print ajax_constantonoff("MAIN_DISABLE_BLOCK_SUPPLIER", array(), $conf->entity, 0, 0, 1, 0);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Block adherent
|
// Block contract
|
||||||
print '<tr class="oddeven"><td>' . $langs->trans('DashboardDisableBlockAdherent') . '</td><td>';
|
print '<tr class="oddeven"><td>' . $langs->trans('DashboardDisableBlockContract') . '</td><td>';
|
||||||
print ajax_constantonoff("MAIN_DISABLE_BLOCK_ADHERENT", array(), $conf->entity, 0, 0, 1, 0);
|
print ajax_constantonoff("MAIN_DISABLE_BLOCK_CONTRACT", array(), $conf->entity, 0, 0, 1, 0);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Block expense report
|
// Block ticket
|
||||||
print '<tr class="oddeven"><td>' . $langs->trans('DashboardDisableBlockExpenseReport') . '</td><td>';
|
print '<tr class="oddeven"><td>' . $langs->trans('DashboardDisableBlockTicket') . '</td><td>';
|
||||||
print ajax_constantonoff("MAIN_DISABLE_BLOCK_EXPENSEREPORT", array(), $conf->entity, 0, 0, 1, 0);
|
print ajax_constantonoff("MAIN_DISABLE_BLOCK_TICKET", array(), $conf->entity, 0, 0, 1, 0);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Block holiday
|
// Block bank
|
||||||
print '<tr class="oddeven"><td>' . $langs->trans('DashboardDisableBlockHoliday') . '</td><td>';
|
print '<tr class="oddeven"><td>' . $langs->trans('DashboardDisableBlockBank') . '</td><td>';
|
||||||
print ajax_constantonoff("MAIN_DISABLE_BLOCK_HOLIDAY", array(), $conf->entity, 0, 0, 1, 0);
|
print ajax_constantonoff("MAIN_DISABLE_BLOCK_BANK", array(), $conf->entity, 0, 0, 1, 0);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
|
// Block adherent
|
||||||
|
print '<tr class="oddeven"><td>' . $langs->trans('DashboardDisableBlockAdherent') . '</td><td>';
|
||||||
|
print ajax_constantonoff("MAIN_DISABLE_BLOCK_ADHERENT", array(), $conf->entity, 0, 0, 1, 0);
|
||||||
|
print '</td>';
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
|
// Block expense report
|
||||||
|
print '<tr class="oddeven"><td>' . $langs->trans('DashboardDisableBlockExpenseReport') . '</td><td>';
|
||||||
|
print ajax_constantonoff("MAIN_DISABLE_BLOCK_EXPENSEREPORT", array(), $conf->entity, 0, 0, 1, 0);
|
||||||
|
print '</td>';
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
|
// Block holiday
|
||||||
|
print '<tr class="oddeven"><td>' . $langs->trans('DashboardDisableBlockHoliday') . '</td><td>';
|
||||||
|
print ajax_constantonoff("MAIN_DISABLE_BLOCK_HOLIDAY", array(), $conf->entity, 0, 0, 1, 0);
|
||||||
|
print '</td>';
|
||||||
|
print '</tr>';
|
||||||
|
}
|
||||||
|
|
||||||
print '</table>' . "\n";
|
print '</table>' . "\n";
|
||||||
print '</div>';
|
print '</div>';
|
||||||
@ -515,24 +543,6 @@ if ($mode == 'other') {
|
|||||||
print '<td width="20"> </td>';
|
print '<td width="20"> </td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Message of the day on home page
|
|
||||||
$substitutionarray = getCommonSubstitutionArray($langs, 0, array('object', 'objectamount'));
|
|
||||||
complete_substitutions_array($substitutionarray, $langs);
|
|
||||||
|
|
||||||
print '<tr class="oddeven"><td>';
|
|
||||||
$texthelp = $langs->trans("FollowingConstantsWillBeSubstituted") . '<br>';
|
|
||||||
foreach ($substitutionarray as $key => $val) {
|
|
||||||
$texthelp .= $key . '<br>';
|
|
||||||
}
|
|
||||||
print $form->textwithpicto($langs->trans("MessageOfDay"), $texthelp, 1, 'help', '', 0, 2, 'tooltipmessageofday');
|
|
||||||
|
|
||||||
print '</td><td colspan="2">';
|
|
||||||
|
|
||||||
$doleditor = new DolEditor('main_motd', (isset($conf->global->MAIN_MOTD) ? $conf->global->MAIN_MOTD : ''), '', 142, 'dolibarr_notes', 'In', false, true, true, ROWS_4, '90%');
|
|
||||||
$doleditor->Create();
|
|
||||||
|
|
||||||
print '</td></tr>' . "\n";
|
|
||||||
|
|
||||||
print '</table>' . "\n";
|
print '</table>' . "\n";
|
||||||
print '</div>';
|
print '</div>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2163,7 +2163,9 @@ APIsAreNotEnabled=APIs modules are not enabled
|
|||||||
YouShouldSetThisToOff=You should set this to 0 or off
|
YouShouldSetThisToOff=You should set this to 0 or off
|
||||||
InstallAndUpgradeLockedBy=Install and upgrades are locked by the file <b>%s</b>
|
InstallAndUpgradeLockedBy=Install and upgrades are locked by the file <b>%s</b>
|
||||||
OldImplementation=Old implementation
|
OldImplementation=Old implementation
|
||||||
DashboardEnableBlockToShow=Dashboard - Block to show
|
DashboardDisableGlobal=Disable totally dashboard
|
||||||
|
BoxstatsDisableGlobal=Disable totally box statistics
|
||||||
|
DashboardDisableBlocks=Dashboard - Blocks to disable
|
||||||
DashboardDisableBlockAgenda=Disable block agenda
|
DashboardDisableBlockAgenda=Disable block agenda
|
||||||
DashboardDisableBlockProject=Disable block project
|
DashboardDisableBlockProject=Disable block project
|
||||||
DashboardDisableBlockCustomer=Disable block customer
|
DashboardDisableBlockCustomer=Disable block customer
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user