Look and feel v13

This commit is contained in:
Laurent Destailleur 2020-09-14 21:55:25 +02:00
parent cf423add2e
commit 7712b277a6
4 changed files with 70 additions and 11 deletions

View File

@ -1614,13 +1614,17 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM
$langs->load("stocks");
if (empty($conf->global->MAIN_USE_ADVANCED_PERMS))
{
$newmenu->add("/product/inventory/list.php?leftmenu=stock", $langs->trans("Inventory"), 0, $user->rights->stock->lire, '', $mainmenu, 'stock');
$newmenu->add("/product/inventory/card.php?action=create", $langs->trans("NewInventory"), 1, $user->rights->stock->creer);
$newmenu->add("/product/inventory/list.php", $langs->trans("List"), 1, $user->rights->stock->lire);
$newmenu->add("/product/inventory/list.php?leftmenu=stock_inventories", $langs->trans("Inventories"), 0, $user->rights->stock->lire, '', $mainmenu, 'stock');
if ($usemenuhider || empty($leftmenu) || $leftmenu == "stock_inventories") {
$newmenu->add("/product/inventory/card.php?action=create&leftmenu=stock_inventories", $langs->trans("NewInventory"), 1, $user->rights->stock->creer);
$newmenu->add("/product/inventory/list.php?leftmenu=stock_inventories", $langs->trans("List"), 1, $user->rights->stock->lire);
}
} else {
$newmenu->add("/product/inventory/list.php?leftmenu=stock", $langs->trans("Inventory"), 0, $user->rights->stock->inventory_advance->read, '', $mainmenu, 'stock');
$newmenu->add("/product/inventory/card.php?action=create", $langs->trans("NewInventory"), 1, $user->rights->stock->inventory_advance->write);
$newmenu->add("/product/inventory/list.php", $langs->trans("List"), 1, $user->rights->stock->inventory_advance->read);
$newmenu->add("/product/inventory/list.php?leftmenu=stock_inventories", $langs->trans("Inventories"), 0, $user->rights->stock->inventory_advance->read, '', $mainmenu, 'stock');
if ($usemenuhider || empty($leftmenu) || $leftmenu == "stock_inventories") {
$newmenu->add("/product/inventory/card.php?action=create&leftmenu=stock_inventories", $langs->trans("NewInventory"), 1, $user->rights->stock->inventory_advance->write);
$newmenu->add("/product/inventory/list.php?leftmenu=stock_inventories", $langs->trans("List"), 1, $user->rights->stock->inventory_advance->read);
}
}
}
}

View File

@ -217,18 +217,20 @@ if ($result || empty($id))
// Choice of stats mode (byunit or bynumber)
if (!empty($conf->dol_use_jmobile)) print "\n".'<div class="fichecenter"><div class="nowrap">'."\n";
if ($mode == 'bynumber') print '<a href="'.$_SERVER["PHP_SELF"].'?id='.(GETPOST('id') ?GETPOST('id') : $object->id).($type != '' ? '&type='.$type : '').'&mode=byunit&search_year='.$search_year.'">';
else print img_picto('', 'tick').' ';
if ($mode == 'bynumber') print '<a class="a-mesure-disabled" href="'.$_SERVER["PHP_SELF"].'?id='.(GETPOST('id') ?GETPOST('id') : $object->id).($type != '' ? '&type='.$type : '').'&mode=byunit&search_year='.$search_year.'">';
else print '<span class="a-mesure">';
print $langs->trans("StatsByNumberOfUnits");
if ($mode == 'bynumber') print '</a>';
else print '</span>';
if (!empty($conf->dol_use_jmobile)) print '</div>'."\n".'<div class="nowrap">'."\n";
else print ' &nbsp; / &nbsp; ';
else print ' &nbsp; ';
if ($mode == 'byunit') print '<a href="'.$_SERVER["PHP_SELF"].'?id='.(GETPOST('id') ?GETPOST('id') : $object->id).($type != '' ? '&type='.$type : '').'&mode=bynumber&search_year='.$search_year.'">';
else print img_picto('', 'tick').' ';
if ($mode == 'byunit') print '<a class="a-mesure-disabled" href="'.$_SERVER["PHP_SELF"].'?id='.(GETPOST('id') ?GETPOST('id') : $object->id).($type != '' ? '&type='.$type : '').'&mode=bynumber&search_year='.$search_year.'">';
else print '<span class="a-mesure">';
print $langs->trans("StatsByNumberOfEntities");
if ($mode == 'byunit') print '</a>';
else print '</span>';
if (!empty($conf->dol_use_jmobile)) print '</div></div>';
else print '<br>';

View File

@ -832,6 +832,31 @@ div.divsearchfield {
padding: 3px;
}
.a-filter, .a-mesure {
border-radius: 50px;
background: var(--colortexttitlenotab);
color: #fff;
padding: 8px 10px 8px 6px;
}
.a-filter:before {
content: "\f0b0";
}
.a-mesure:before {
content: "\f080";
}
.a-filter:before, .a-mesure:before {
font-family: "Font Awesome 5 Free";
font-weight: 600;
padding-right: 5px;
padding-left: 5px;
}
.a-filter-disabled, .a-mesure-disabled {
border-radius: 50px;
background: var(--colorbacktitle1);
padding: 8px;
opacity: 0.6;
}
<?php
// Add a nowrap on smartphone, so long list of field used for filter are overflowed with clip

View File

@ -885,6 +885,34 @@ if ($conf->browser->layout == 'phone') {
white-space: nowrap;
}
<?php } ?>
.a-filter, .a-mesure {
border-radius: 50px;
background: var(--colortexttitlenotab);
color: #fff;
padding: 8px 10px 8px 6px;
}
.a-filter:before {
content: "\f0b0";
}
.a-mesure:before {
content: "\f080";
}
.a-filter:before, .a-mesure:before {
font-family: "Font Awesome 5 Free";
font-weight: 600;
padding-right: 5px;
padding-left: 5px;
}
.a-filter-disabled, .a-mesure-disabled {
border-radius: 50px;
background: var(--colorbacktitle1);
padding: 8px;
opacity: 0.6;
}
div.confirmmessage {
padding-top: 6px;
}