Nicer page of widget setup

This commit is contained in:
Laurent Destailleur 2021-04-15 13:22:03 +02:00
parent dd4a5c9f76
commit 09365c29c9
8 changed files with 30 additions and 13 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 172 KiB

View File

@ -316,7 +316,7 @@ print '<div class="div-table-responsive-no-min">';
print '<table class="tagtable liste centpercent">'."\n";
print '<tr class="liste_titre">';
print '<td width="300">'.$langs->trans("Box").'</td>';
print '<td>'.$langs->trans("Box").'</td>';
print '<td>'.$langs->trans("Note").'/'.$langs->trans("Parameters").'</td>';
print '<td>'.$langs->trans("SourceFile").'</td>';
print '<td width="160" class="center">'.$langs->trans("ActivatableOn").'</td>';
@ -333,7 +333,14 @@ foreach ($boxtoadd as $box) {
print '<tr class="oddeven">'."\n";
print '<td>'.img_object("", $logo, 'height="14px"').' '.$langs->transnoentitiesnoconv($box->boxlabel);
if (!empty($box->class) && preg_match('/graph_/', $box->class)) {
print ' ('.$langs->trans("Graph").')';
print img_picto('', 'graph', 'class="paddingleft"');
}
if (!empty($box->version)) {
if ($box->version == 'experimental') {
print ' <span class="opacitymedium">('.$langs->trans("Experimental").')</span>';
} elseif ($box->version == 'development') {
print ' <span class="opacitymedium">('.$langs->trans("Development").')</span>';
}
}
print '</td>'."\n";
print '<td>';
@ -344,7 +351,7 @@ foreach ($boxtoadd as $box) {
print ($box->note ? $box->note : '&nbsp;');
}
print '</td>'."\n";
print '<td>'.$box->sourcefile.'</td>'."\n";
print '<td class="twoverflowmax200" title="'.dol_escape_htmltag($box->sourcefile).'">'.dol_escape_htmltag($box->sourcefile).'</td>'."\n";
// For each possible position, an activation link is displayed if the box is not already active for that position
print '<td class="center">';
@ -375,7 +382,7 @@ print '<div class="div-table-responsive-no-min">';
print '<table class="tagtable liste">'."\n";
print '<tr class="liste_titre">';
print '<td width="300">'.$langs->trans("Box").'</td>';
print '<td>'.$langs->trans("Box").'</td>';
print '<td>'.$langs->trans("Note").'/'.$langs->trans("Parameters").'</td>';
print '<td class="center" width="160">'.$langs->trans("ActivatableOn").'</td>';
print '<td class="center" width="60" colspan="2">'.$langs->trans("PositionByDefault").'</td>';
@ -395,7 +402,14 @@ foreach ($boxactivated as $key => $box) {
print '<tr class="oddeven">';
print '<td>'.img_object("", $logo, 'height="14px"').' '.$langs->transnoentitiesnoconv($box->boxlabel);
if (!empty($box->class) && preg_match('/graph_/', $box->class)) {
print ' ('.$langs->trans("Graph").')';
print img_picto('', 'graph', 'class="paddingleft"');
}
if (!empty($box->version)) {
if ($box->version == 'experimental') {
print ' <span class="opacitymedium">('.$langs->trans("Experimental").')</span>';
} elseif ($box->version == 'development') {
print ' <span class="opacitymedium">('.$langs->trans("Development").')</span>';
}
}
print '</td>';
print '<td>';

View File

@ -33,7 +33,7 @@ include_once DOL_DOCUMENT_ROOT.'/core/boxes/modules_boxes.php';
class box_accountancy_last_manual_entries extends ModeleBoxes
{
public $boxcode = "accountancy_last_manual_entries";
public $boximg = "object_invoice";
public $boximg = "accounting";
public $boxlabel = "BoxLastManualEntries";
public $depends = array("accounting");

View File

@ -33,7 +33,7 @@ include_once DOL_DOCUMENT_ROOT.'/core/boxes/modules_boxes.php';
class box_accountancy_suspense_account extends ModeleBoxes
{
public $boxcode = "accountancy_suspense_account";
public $boximg = "object_invoice";
public $boximg = "accounting";
public $boxlabel = "BoxSuspenseAccount";
public $depends = array("accounting");

View File

@ -36,6 +36,8 @@ class box_funnel_of_prospection extends ModeleBoxes
public $boxlabel = "BoxTitleFunnelOfProspection";
public $depends = array("projet");
public $version = 'development';
/**
* @var DoliDB Database handler.
*/

View File

@ -495,12 +495,12 @@ class ModeleBoxes // Can't be abtract as it is instantiated to build "empty" box
}
// We set info of modules
$widget[$j]['picto'] = $objMod->picto ?img_object('', $objMod->picto) : img_object('', 'generic');
$widget[$j]['picto'] = $objMod->picto ? img_object('', $objMod->picto) : img_object('', 'generic');
$widget[$j]['file'] = $files[$key];
$widget[$j]['fullpath'] = $fullpath[$key];
$widget[$j]['relpath'] = $relpath[$key];
$widget[$j]['iscoreorexternal'] = $iscoreorexternal[$key];
//$widget[$j]['version'] = $objMod->getVersion();
$widget[$j]['version'] = empty($objMod->version) ? '' : $objMod->version;
$widget[$j]['status'] = img_picto($langs->trans("Active"), 'tick');
if ($disabledbyname > 0 || $disabledbymodule > 1) {
$widget[$j]['status'] = '';

View File

@ -3511,7 +3511,8 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
'bank_account', 'barcode', 'bank', 'bill', 'billa', 'billr', 'billd', 'bookmark', 'bom', 'building',
'cash-register', 'category', 'chart', 'check', 'clock', 'close_title', 'cog', 'collab', 'company', 'contact', 'country', 'contract', 'cron', 'cubes',
'delete', 'dolly', 'dollyrevert', 'donation', 'download', 'edit', 'ellipsis-h', 'email', 'eraser', 'establishment', 'external-link-alt', 'external-link-square-alt',
'filter', 'file-code', 'file-export', 'file-import', 'file-upload', 'autofill', 'folder', 'folder-open', 'folder-plus', 'globe', 'globe-americas', 'grip', 'grip_title', 'group',
'filter', 'file-code', 'file-export', 'file-import', 'file-upload', 'autofill', 'folder', 'folder-open', 'folder-plus',
'globe', 'globe-americas', 'graph', 'grip', 'grip_title', 'group',
'help', 'holiday',
'images', 'info', 'intervention', 'inventory', 'intracommreport',
'label', 'language', 'link', 'list', 'listlight', 'loan', 'lot', 'long-arrow-alt-right',
@ -3564,10 +3565,10 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
'chart'=>'chart-line', 'company'=>'building', 'contact'=>'address-book', 'contract'=>'suitcase', 'collab'=>'people-arrows', 'conversation'=>'comments', 'country'=>'globe-americas', 'cron'=>'business-time',
'donation'=>'file-alt', 'dynamicprice'=>'hand-holding-usd',
'setup'=>'cog', 'companies'=>'building', 'products'=>'cube', 'commercial'=>'suitcase', 'invoicing'=>'coins',
'accounting'=>'chart-line', 'category'=>'tag', 'dollyrevert'=>'dolly',
'accounting'=>'search-dollar', 'category'=>'tag', 'dollyrevert'=>'dolly',
'hrm'=>'user-tie', 'margin'=>'calculator', 'members'=>'user-friends', 'ticket'=>'ticket-alt', 'globe'=>'external-link-alt', 'lot'=>'barcode',
'email'=>'at', 'establishment'=>'building',
'edit'=>'pencil-alt', 'grip_title'=>'arrows-alt', 'grip'=>'arrows-alt', 'help'=>'question-circle',
'edit'=>'pencil-alt', 'graph'=>'chart-line', 'grip_title'=>'arrows-alt', 'grip'=>'arrows-alt', 'help'=>'question-circle',
'generic'=>'file', 'holiday'=>'umbrella-beach',
'info'=>'info-circle', 'inventory'=>'boxes', 'intracommreport'=>'globe-europe', 'label'=>'layer-group', 'loan'=>'money-bill-alt',
'member'=>'user-alt', 'meeting'=>'chalkboard-teacher', 'mrp'=>'cubes', 'next'=>'arrow-alt-circle-right',

View File

@ -2607,7 +2607,7 @@ table.login_table_securitycode tr td {
}
div.backgroundsemitransparent {
background:rgba(255,255,255,0.6);
background:rgba(255,255,255,0.68);
padding-left: 10px;
padding-right: 10px;
}