mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-05 09:08:09 +01:00
add links to home info-box (#34803)
This commit is contained in:
@@ -579,8 +579,32 @@ if (!getDolGlobalString('MAIN_DISABLE_GLOBAL_WORKBOARD') && getDolGlobalInt('MAI
|
||||
$groupElement['globalStats'] = array();
|
||||
}
|
||||
|
||||
// Links
|
||||
$arrayLinks = array(
|
||||
'action' => dol_buildpath('/comm/action/card.php?action=create', 1),
|
||||
'project' => dol_buildpath('/projet/card.php?action=create', 1),
|
||||
'propal' => dol_buildpath('/comm/propal/card.php?action=create', 1),
|
||||
'commande' => dol_buildpath('/commande/card.php?action=create', 1),
|
||||
'facture' => dol_buildpath('/compta/facture/card.php?action=create', 1),
|
||||
'supplier_proposal' => dol_buildpath('/supplier_proposal/card.php?action=create', 1),
|
||||
'order_supplier' => dol_buildpath('/fourn/commande/card.php?action=create', 1),
|
||||
'invoice_supplier' => dol_buildpath('/fourn/facture/card.php?action=create', 1),
|
||||
'contrat' => dol_buildpath('/contrat/card.php?action=create', 1),
|
||||
'ticket' => dol_buildpath('/ticket/card.php?action=create', 1),
|
||||
'bank_account' => dol_buildpath('/compta/bank/card.php?action=create', 1),
|
||||
'member' => dol_buildpath('/adherents/card.php?action=create', 1),
|
||||
'expensereport' => dol_buildpath('/expensereport/card.php?action=create', 1),
|
||||
'holiday' => dol_buildpath('/holiday/card.php?action=create', 1),
|
||||
'cubes' => dol_buildpath('/mrp/mo_card.php?action=create', 1),
|
||||
|
||||
);
|
||||
$infoboxMoreCss = '';
|
||||
if (array_key_exists($groupKey, $arrayLinks)) {
|
||||
$infoboxMoreCss = 'infobox-haslink';
|
||||
}
|
||||
|
||||
$openedDashBoard .= '<div class="box-flex-item"><div class="box-flex-item-with-margin">'."\n";
|
||||
$openedDashBoard .= ' <div class="info-box '.$openedDashBoardSize.'">'."\n";
|
||||
$openedDashBoard .= ' <div class="info-box '.$openedDashBoardSize.' '.$infoboxMoreCss.'">'."\n";
|
||||
$openedDashBoard .= ' <span class="info-box-icon bg-infobox-'.$groupKeyLowerCase.'">'."\n";
|
||||
$openedDashBoard .= ' <i class="fa fa-dol-'.$groupKeyLowerCase.'"></i>'."\n";
|
||||
|
||||
@@ -590,6 +614,10 @@ if (!getDolGlobalString('MAIN_DISABLE_GLOBAL_WORKBOARD') && getDolGlobalInt('MAI
|
||||
$openedDashBoard .= '<span class="info-box-icon-text" title="'.$groupElement['globalStats']['text'].'">'.$groupElement['globalStats']['nbTotal'].'</span>';
|
||||
}
|
||||
|
||||
if (array_key_exists($groupKey, $arrayLinks)) {
|
||||
$openedDashBoard .= ' <a href="'.$arrayLinks[$groupKey].'" class="info-box-createlink"><span class="fas fa-plus-circle"></span></a>'."\n";
|
||||
}
|
||||
|
||||
$openedDashBoard .= '</span>'."\n";
|
||||
$openedDashBoard .= '<div class="info-box-content">'."\n";
|
||||
|
||||
|
||||
@@ -318,7 +318,33 @@ a.info-box-text{ text-decoration: none;}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* customize section for home box link */
|
||||
.infobox-haslink .info-box-icon i {
|
||||
transition: opacity 0.2s ease-in-out;
|
||||
}
|
||||
.infobox-haslink .info-box-icon:hover i {
|
||||
opacity: 0.2;
|
||||
}
|
||||
.infobox-haslink .info-box-icon .info-box-createlink {
|
||||
height:100%;
|
||||
width:100%;
|
||||
display:block;
|
||||
position:absolute;
|
||||
top:0;
|
||||
left:0;
|
||||
font-size:0.6em;
|
||||
display: flex;
|
||||
opacity: 0;
|
||||
transition: opacity 0.2s ease-in-out;
|
||||
color:inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
.infobox-haslink .info-box-icon:hover .info-box-createlink {
|
||||
opacity: 1;
|
||||
}
|
||||
.infobox-haslink .info-box-icon .info-box-createlink span.fas {
|
||||
margin:auto;
|
||||
}
|
||||
|
||||
|
||||
/* ICONS INFO BOX */
|
||||
|
||||
@@ -719,3 +719,31 @@ if (GETPOSTISSET('THEME_SATURATE_RATIO')) {
|
||||
width: 250px;
|
||||
}
|
||||
}
|
||||
|
||||
/* customize section for home box link */
|
||||
.infobox-haslink .info-box-icon i {
|
||||
transition: opacity 0.2s ease-in-out;
|
||||
}
|
||||
.infobox-haslink .info-box-icon:hover i {
|
||||
opacity: 0.2;
|
||||
}
|
||||
.infobox-haslink .info-box-icon .info-box-createlink {
|
||||
height:100%;
|
||||
width:100%;
|
||||
display:block;
|
||||
position:absolute;
|
||||
top:0;
|
||||
left:0;
|
||||
font-size:0.6em;
|
||||
display: flex;
|
||||
opacity: 0;
|
||||
transition: opacity 0.2s ease-in-out;
|
||||
color:inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
.infobox-haslink .info-box-icon:hover .info-box-createlink {
|
||||
opacity: 1;
|
||||
}
|
||||
.infobox-haslink .info-box-icon .info-box-createlink span.fas {
|
||||
margin:auto;
|
||||
}
|
||||
Reference in New Issue
Block a user