Merge pull request #18509 from aspangaro/15a8
NEW IHM - Include new options to manage dashboard
This commit is contained in:
commit
b7f5b5f7ed
@ -4,6 +4,7 @@
|
|||||||
* Copyright (C) 2005-2017 Regis Houssin <regis.houssin@inodbox.com>
|
* Copyright (C) 2005-2017 Regis Houssin <regis.houssin@inodbox.com>
|
||||||
* Copyright (C) 2016 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2016 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2018 Ferran Marcet <fmarcet@2byte.es>
|
* Copyright (C) 2018 Ferran Marcet <fmarcet@2byte.es>
|
||||||
|
* Copyright (C) 2021 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -43,7 +44,7 @@ if (!$user->admin) {
|
|||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'aZ09');
|
||||||
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'adminihm'; // To manage different context of search
|
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'adminihm'; // To manage different context of search
|
||||||
|
|
||||||
$mode = GETPOST('mode', 'aZ09') ? GETPOST('mode', 'aZ09') : 'language'; // 'language', 'template', 'login', 'other'
|
$mode = GETPOST('mode', 'aZ09') ? GETPOST('mode', 'aZ09') : 'language'; // 'language', 'template', 'dashboard', 'login', 'other'
|
||||||
|
|
||||||
if (!defined("MAIN_MOTD")) {
|
if (!defined("MAIN_MOTD")) {
|
||||||
define("MAIN_MOTD", "");
|
define("MAIN_MOTD", "");
|
||||||
@ -206,6 +207,10 @@ if ($action == 'update') {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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') {
|
||||||
dolibarr_set_const($db, "MAIN_SIZE_LISTE_LIMIT", GETPOST("main_size_liste_limit", 'int'), 'chaine', 0, '', $conf->entity);
|
dolibarr_set_const($db, "MAIN_SIZE_LISTE_LIMIT", GETPOST("main_size_liste_limit", 'int'), 'chaine', 0, '', $conf->entity);
|
||||||
dolibarr_set_const($db, "MAIN_SIZE_SHORTLIST_LIMIT", GETPOST("main_size_shortliste_limit", 'int'), 'chaine', 0, '', $conf->entity);
|
dolibarr_set_const($db, "MAIN_SIZE_SHORTLIST_LIMIT", GETPOST("main_size_shortliste_limit", 'int'), 'chaine', 0, '', $conf->entity);
|
||||||
@ -221,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') {
|
||||||
@ -328,6 +331,114 @@ if ($mode == 'template') {
|
|||||||
showSkins(null, 1);
|
showSkins(null, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($mode == 'dashboard') {
|
||||||
|
print '<div class="div-table-responsive-no-min">';
|
||||||
|
print '<table summary="blockdashboard" class="noborder centpercent editmode tableforfield">';
|
||||||
|
|
||||||
|
// Message of the day on home page
|
||||||
|
$substitutionarray = getCommonSubstitutionArray($langs, 0, array('object', 'objectamount'));
|
||||||
|
complete_substitutions_array($substitutionarray, $langs);
|
||||||
|
|
||||||
|
print '<tr class="oddeven width25p"><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>';
|
||||||
|
|
||||||
|
$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 '</tr>';
|
||||||
|
|
||||||
|
print '<tr class="oddeven"><td>' . $langs->trans('BoxstatsDisableGlobal') . '</td><td>';
|
||||||
|
print ajax_constantonoff("MAIN_DISABLE_GLOBAL_BOXSTATS", array(), $conf->entity, 0, 0, 1, 0);
|
||||||
|
print '</td>';
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
|
if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) {
|
||||||
|
print '<tr class="liste_titre"><td class="titlefieldmiddle">';
|
||||||
|
print $langs->trans("DashboardDisableBlocks");
|
||||||
|
print '</td><td class="titlefieldmiddle"></td></tr>';
|
||||||
|
|
||||||
|
// Block meteo
|
||||||
|
print '<tr class="oddeven"><td>' . $langs->trans('MAIN_DISABLE_METEO') . '</td><td>';
|
||||||
|
print ajax_constantonoff("MAIN_DISABLE_METEO", array(), $conf->entity, 0, 0, 1, 0);
|
||||||
|
print '</td>';
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
|
// Block agenda
|
||||||
|
print '<tr class="oddeven"><td>' . $langs->trans('DashboardDisableBlockAgenda') . '</td><td>';
|
||||||
|
print ajax_constantonoff("MAIN_DISABLE_BLOCK_AGENDA", array(), $conf->entity, 0, 0, 1, 0);
|
||||||
|
print '</td>';
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
|
// Block agenda
|
||||||
|
print '<tr class="oddeven"><td>' . $langs->trans('DashboardDisableBlockProject') . '</td><td>';
|
||||||
|
print ajax_constantonoff("MAIN_DISABLE_BLOCK_PROJECT", array(), $conf->entity, 0, 0, 1, 0);
|
||||||
|
print '</td>';
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
|
// Block customer
|
||||||
|
print '<tr class="oddeven"><td>' . $langs->trans('DashboardDisableBlockCustomer') . '</td><td>';
|
||||||
|
print ajax_constantonoff("MAIN_DISABLE_BLOCK_CUSTOMER", array(), $conf->entity, 0, 0, 1, 0);
|
||||||
|
print '</td>';
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
|
// Block supplier
|
||||||
|
print '<tr class="oddeven"><td>' . $langs->trans('DashboardDisableBlockSupplier') . '</td><td>';
|
||||||
|
print ajax_constantonoff("MAIN_DISABLE_BLOCK_SUPPLIER", array(), $conf->entity, 0, 0, 1, 0);
|
||||||
|
print '</td>';
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
|
// Block contract
|
||||||
|
print '<tr class="oddeven"><td>' . $langs->trans('DashboardDisableBlockContract') . '</td><td>';
|
||||||
|
print ajax_constantonoff("MAIN_DISABLE_BLOCK_CONTRACT", array(), $conf->entity, 0, 0, 1, 0);
|
||||||
|
print '</td>';
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
|
// Block ticket
|
||||||
|
print '<tr class="oddeven"><td>' . $langs->trans('DashboardDisableBlockTicket') . '</td><td>';
|
||||||
|
print ajax_constantonoff("MAIN_DISABLE_BLOCK_TICKET", array(), $conf->entity, 0, 0, 1, 0);
|
||||||
|
print '</td>';
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
|
// Block bank
|
||||||
|
print '<tr class="oddeven"><td>' . $langs->trans('DashboardDisableBlockBank') . '</td><td>';
|
||||||
|
print ajax_constantonoff("MAIN_DISABLE_BLOCK_BANK", array(), $conf->entity, 0, 0, 1, 0);
|
||||||
|
print '</td>';
|
||||||
|
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 '</div>';
|
||||||
|
}
|
||||||
|
|
||||||
if ($mode == 'other') {
|
if ($mode == 'other') {
|
||||||
// Other
|
// Other
|
||||||
print '<div class="div-table-responsive-no-min">';
|
print '<div class="div-table-responsive-no-min">';
|
||||||
@ -432,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>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -685,6 +685,11 @@ function ihm_prepare_head()
|
|||||||
$head[$h][2] = 'template';
|
$head[$h][2] = 'template';
|
||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
|
$head[$h][0] = DOL_URL_ROOT."/admin/ihm.php?mode=dashboard";
|
||||||
|
$head[$h][1] = $langs->trans("Dashboard");
|
||||||
|
$head[$h][2] = 'dashboard';
|
||||||
|
$h++;
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT."/admin/ihm.php?mode=login";
|
$head[$h][0] = DOL_URL_ROOT."/admin/ihm.php?mode=login";
|
||||||
$head[$h][1] = $langs->trans("LoginPage");
|
$head[$h][1] = $langs->trans("LoginPage");
|
||||||
$head[$h][2] = 'login';
|
$head[$h][2] = 'login';
|
||||||
|
|||||||
@ -156,28 +156,28 @@ if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) {
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/workboardresponse.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/workboardresponse.class.php';
|
||||||
|
|
||||||
// Number of actions to do (late)
|
// Number of actions to do (late)
|
||||||
if (!empty($conf->agenda->enabled) && $user->rights->agenda->myactions->read) {
|
if (!empty($conf->agenda->enabled) && empty($conf->global->MAIN_DISABLE_BLOCK_AGENDA) && $user->rights->agenda->myactions->read) {
|
||||||
include_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php';
|
||||||
$board = new ActionComm($db);
|
$board = new ActionComm($db);
|
||||||
$dashboardlines[$board->element] = $board->load_board($user);
|
$dashboardlines[$board->element] = $board->load_board($user);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Number of project opened
|
// Number of project opened
|
||||||
if (!empty($conf->projet->enabled) && $user->rights->projet->lire) {
|
if (!empty($conf->projet->enabled) && empty($conf->global->MAIN_DISABLE_BLOCK_PROJECT) && $user->rights->projet->lire) {
|
||||||
include_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
||||||
$board = new Project($db);
|
$board = new Project($db);
|
||||||
$dashboardlines[$board->element] = $board->load_board($user);
|
$dashboardlines[$board->element] = $board->load_board($user);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Number of tasks to do (late)
|
// Number of tasks to do (late)
|
||||||
if (!empty($conf->projet->enabled) && empty($conf->global->PROJECT_HIDE_TASKS) && $user->rights->projet->lire) {
|
if (!empty($conf->projet->enabled) && empty($conf->global->MAIN_DISABLE_BLOCK_PROJECT) && empty($conf->global->PROJECT_HIDE_TASKS) && $user->rights->projet->lire) {
|
||||||
include_once DOL_DOCUMENT_ROOT.'/projet/class/task.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/projet/class/task.class.php';
|
||||||
$board = new Task($db);
|
$board = new Task($db);
|
||||||
$dashboardlines[$board->element] = $board->load_board($user);
|
$dashboardlines[$board->element] = $board->load_board($user);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Number of commercial proposals open (expired)
|
// Number of commercial customer proposals open (expired)
|
||||||
if (!empty($conf->propal->enabled) && $user->rights->propale->lire) {
|
if (!empty($conf->propal->enabled) && empty($conf->global->MAIN_DISABLE_BLOCK_CUSTOMER) && $user->rights->propale->lire) {
|
||||||
include_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
|
||||||
$board = new Propal($db);
|
$board = new Propal($db);
|
||||||
$dashboardlines[$board->element.'_opened'] = $board->load_board($user, "opened");
|
$dashboardlines[$board->element.'_opened'] = $board->load_board($user, "opened");
|
||||||
@ -186,7 +186,7 @@ if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Number of supplier proposals open (expired)
|
// Number of supplier proposals open (expired)
|
||||||
if (!empty($conf->supplier_proposal->enabled) && $user->rights->supplier_proposal->lire) {
|
if (!empty($conf->supplier_proposal->enabled) && empty($conf->global->MAIN_DISABLE_BLOCK_SUPPLIER) && $user->rights->supplier_proposal->lire) {
|
||||||
$langs->load("supplier_proposal");
|
$langs->load("supplier_proposal");
|
||||||
include_once DOL_DOCUMENT_ROOT.'/supplier_proposal/class/supplier_proposal.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/supplier_proposal/class/supplier_proposal.class.php';
|
||||||
$board = new SupplierProposal($db);
|
$board = new SupplierProposal($db);
|
||||||
@ -196,14 +196,14 @@ if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Number of customer orders a deal
|
// Number of customer orders a deal
|
||||||
if (!empty($conf->commande->enabled) && $user->rights->commande->lire) {
|
if (!empty($conf->commande->enabled) && empty($conf->global->MAIN_DISABLE_BLOCK_CUSTOMER) && $user->rights->commande->lire) {
|
||||||
include_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
|
||||||
$board = new Commande($db);
|
$board = new Commande($db);
|
||||||
$dashboardlines[$board->element] = $board->load_board($user);
|
$dashboardlines[$board->element] = $board->load_board($user);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Number of suppliers orders a deal
|
// Number of suppliers orders a deal
|
||||||
if (!empty($conf->supplier_order->enabled) && $user->rights->fournisseur->commande->lire) {
|
if (!empty($conf->supplier_order->enabled) && empty($conf->global->MAIN_DISABLE_BLOCK_SUPPLIER) && $user->rights->fournisseur->commande->lire) {
|
||||||
include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php';
|
||||||
$board = new CommandeFournisseur($db);
|
$board = new CommandeFournisseur($db);
|
||||||
$dashboardlines[$board->element.'_opened'] = $board->load_board($user, "opened");
|
$dashboardlines[$board->element.'_opened'] = $board->load_board($user, "opened");
|
||||||
@ -211,7 +211,7 @@ if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Number of contract / services enabled (delayed)
|
// Number of contract / services enabled (delayed)
|
||||||
if (!empty($conf->contrat->enabled) && $user->rights->contrat->lire) {
|
if (!empty($conf->contrat->enabled) && empty($conf->global->MAIN_DISABLE_BLOCK_CONTRACT) && $user->rights->contrat->lire) {
|
||||||
include_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php';
|
||||||
$board = new Contrat($db);
|
$board = new Contrat($db);
|
||||||
$dashboardlines[$board->element.'_inactive'] = $board->load_board($user, "inactive");
|
$dashboardlines[$board->element.'_inactive'] = $board->load_board($user, "inactive");
|
||||||
@ -220,7 +220,7 @@ if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Number of tickets open
|
// Number of tickets open
|
||||||
if (!empty($conf->ticket->enabled) && $user->rights->ticket->read) {
|
if (!empty($conf->ticket->enabled) && empty($conf->global->MAIN_DISABLE_BLOCK_TICKET) && $user->rights->ticket->read) {
|
||||||
include_once DOL_DOCUMENT_ROOT.'/ticket/class/ticket.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/ticket/class/ticket.class.php';
|
||||||
$board = new Ticket($db);
|
$board = new Ticket($db);
|
||||||
$dashboardlines[$board->element.'_opened'] = $board->load_board($user, "opened");
|
$dashboardlines[$board->element.'_opened'] = $board->load_board($user, "opened");
|
||||||
@ -229,21 +229,21 @@ if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Number of invoices customers (paid)
|
// Number of invoices customers (paid)
|
||||||
if (!empty($conf->facture->enabled) && $user->rights->facture->lire) {
|
if (!empty($conf->facture->enabled) && empty($conf->global->MAIN_DISABLE_BLOCK_CUSTOMER) && $user->rights->facture->lire) {
|
||||||
include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||||
$board = new Facture($db);
|
$board = new Facture($db);
|
||||||
$dashboardlines[$board->element] = $board->load_board($user);
|
$dashboardlines[$board->element] = $board->load_board($user);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Number of supplier invoices (paid)
|
// Number of supplier invoices (paid)
|
||||||
if (!empty($conf->supplier_invoice->enabled) && !empty($user->rights->fournisseur->facture->lire)) {
|
if (!empty($conf->supplier_invoice->enabled) && empty($conf->global->MAIN_DISABLE_BLOCK_SUPPLIER) && !empty($user->rights->fournisseur->facture->lire)) {
|
||||||
include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
|
||||||
$board = new FactureFournisseur($db);
|
$board = new FactureFournisseur($db);
|
||||||
$dashboardlines[$board->element] = $board->load_board($user);
|
$dashboardlines[$board->element] = $board->load_board($user);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Number of transactions to conciliate
|
// Number of transactions to conciliate
|
||||||
if (!empty($conf->banque->enabled) && $user->rights->banque->lire && !$user->socid) {
|
if (!empty($conf->banque->enabled) && empty($conf->global->MAIN_DISABLE_BLOCK_BANK) && $user->rights->banque->lire && !$user->socid) {
|
||||||
include_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||||
$board = new Account($db);
|
$board = new Account($db);
|
||||||
$nb = $board->countAccountToReconcile(); // Get nb of account to reconciliate
|
$nb = $board->countAccountToReconcile(); // Get nb of account to reconciliate
|
||||||
@ -253,14 +253,14 @@ if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Number of cheque to send
|
// Number of cheque to send
|
||||||
if (!empty($conf->banque->enabled) && $user->rights->banque->lire && !$user->socid && empty($conf->global->BANK_DISABLE_CHECK_DEPOSIT)) {
|
if (!empty($conf->banque->enabled) && empty($conf->global->MAIN_DISABLE_BLOCK_BANK) && $user->rights->banque->lire && !$user->socid && empty($conf->global->BANK_DISABLE_CHECK_DEPOSIT)) {
|
||||||
include_once DOL_DOCUMENT_ROOT.'/compta/paiement/cheque/class/remisecheque.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/compta/paiement/cheque/class/remisecheque.class.php';
|
||||||
$board = new RemiseCheque($db);
|
$board = new RemiseCheque($db);
|
||||||
$dashboardlines[$board->element] = $board->load_board($user);
|
$dashboardlines[$board->element] = $board->load_board($user);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Number of foundation members
|
// Number of foundation members
|
||||||
if (!empty($conf->adherent->enabled) && $user->rights->adherent->lire && !$user->socid) {
|
if (!empty($conf->adherent->enabled) && empty($conf->global->MAIN_DISABLE_BLOCK_ADHERENT) && $user->rights->adherent->lire && !$user->socid) {
|
||||||
include_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
|
||||||
$board = new Adherent($db);
|
$board = new Adherent($db);
|
||||||
$dashboardlines[$board->element.'_shift'] = $board->load_board($user, 'shift');
|
$dashboardlines[$board->element.'_shift'] = $board->load_board($user, 'shift');
|
||||||
@ -268,21 +268,21 @@ if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Number of expense reports to approve
|
// Number of expense reports to approve
|
||||||
if (!empty($conf->expensereport->enabled) && $user->rights->expensereport->approve) {
|
if (!empty($conf->expensereport->enabled) && empty($conf->global->MAIN_DISABLE_BLOCK_EXPENSEREPORT) && $user->rights->expensereport->approve) {
|
||||||
include_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php';
|
||||||
$board = new ExpenseReport($db);
|
$board = new ExpenseReport($db);
|
||||||
$dashboardlines[$board->element.'_toapprove'] = $board->load_board($user, 'toapprove');
|
$dashboardlines[$board->element.'_toapprove'] = $board->load_board($user, 'toapprove');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Number of expense reports to pay
|
// Number of expense reports to pay
|
||||||
if (!empty($conf->expensereport->enabled) && $user->rights->expensereport->to_paid) {
|
if (!empty($conf->expensereport->enabled) && empty($conf->global->MAIN_DISABLE_BLOCK_EXPENSEREPORT) && $user->rights->expensereport->to_paid) {
|
||||||
include_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php';
|
||||||
$board = new ExpenseReport($db);
|
$board = new ExpenseReport($db);
|
||||||
$dashboardlines[$board->element.'_topay'] = $board->load_board($user, 'topay');
|
$dashboardlines[$board->element.'_topay'] = $board->load_board($user, 'topay');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Number of holidays to approve
|
// Number of holidays to approve
|
||||||
if (!empty($conf->holiday->enabled) && $user->rights->holiday->approve) {
|
if (!empty($conf->holiday->enabled) && empty($conf->global->MAIN_DISABLE_BLOCK_HOLIDAY) && $user->rights->holiday->approve) {
|
||||||
include_once DOL_DOCUMENT_ROOT.'/holiday/class/holiday.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/holiday/class/holiday.class.php';
|
||||||
$board = new Holiday($db);
|
$board = new Holiday($db);
|
||||||
$dashboardlines[$board->element] = $board->load_board($user);
|
$dashboardlines[$board->element] = $board->load_board($user);
|
||||||
|
|||||||
@ -2164,6 +2164,19 @@ 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
|
||||||
PDF_SHOW_LINK_TO_ONLINE_PAYMENT=If some online payment modules are enabled (Paypal, Stripe, ...), add a link on the PDF to make the online payment
|
PDF_SHOW_LINK_TO_ONLINE_PAYMENT=If some online payment modules are enabled (Paypal, Stripe, ...), add a link on the PDF to make the online payment
|
||||||
|
DashboardDisableGlobal=Disable totally dashboard
|
||||||
|
BoxstatsDisableGlobal=Disable totally box statistics
|
||||||
|
DashboardDisableBlocks=Dashboard - Blocks to disable
|
||||||
|
DashboardDisableBlockAgenda=Disable block agenda
|
||||||
|
DashboardDisableBlockProject=Disable block project
|
||||||
|
DashboardDisableBlockCustomer=Disable block customer
|
||||||
|
DashboardDisableBlockSupplier=Disable block supplier
|
||||||
|
DashboardDisableBlockContract=Disable block contract
|
||||||
|
DashboardDisableBlockTicket=Disable block ticket
|
||||||
|
DashboardDisableBlockBank=Disable block bank
|
||||||
|
DashboardDisableBlockAdherent=Disable block adherent
|
||||||
|
DashboardDisableBlockExpenseReport=Disable block expense report
|
||||||
|
DashboardDisableBlockHoliday=Disable block holiday
|
||||||
EnabledCondition=Condition to have field enabled (if not enabled, visibility will always be off)
|
EnabledCondition=Condition to have field enabled (if not enabled, visibility will always be off)
|
||||||
IfYouUseASecondTaxYouMustSetYouUseTheMainTax=If you want to use a second tax, you must enable also the first sale tax
|
IfYouUseASecondTaxYouMustSetYouUseTheMainTax=If you want to use a second tax, you must enable also the first sale tax
|
||||||
IfYouUseAThirdTaxYouMustSetYouUseTheMainTax=If you want to use a third tax, you must enable also the first sale tax
|
IfYouUseAThirdTaxYouMustSetYouUseTheMainTax=If you want to use a third tax, you must enable also the first sale tax
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user