diff --git a/htdocs/admin/modules.php b/htdocs/admin/modules.php index cfaa0c72004c5a9a16b6427c88bfd80d1dd3642f..4aca54817e816483c8530013fd6c5433d7ac2137 100644 --- a/htdocs/admin/modules.php +++ b/htdocs/admin/modules.php @@ -278,17 +278,16 @@ $var=true; if ($mode != 'marketplace') { print "<table summary=\"list_of_modules\" class=\"noborder\" width=\"100%\">\n"; - //print "<tr class=\"liste_titre\">\n"; + + /* print '<tr class="liste_titre">'."\n"; - //print " <td>".$langs->trans("Family")."</td>\n"; print " <td colspan=\"2\">".$langs->trans("Module")."</td>\n"; print " <td>".$langs->trans("Description")."</td>\n"; print " <td align=\"center\">".$langs->trans("Version")."</td>\n"; - //print " <td align=\"center\">".$langs->trans("DbVersion")."</td>\n"; - print " <td align=\"center\">".$langs->trans("Status")."</td>\n"; - print " <td align=\"right\">".$langs->trans("SetupShort")."</td>\n"; + print ' <td align="center">'.$langs->trans("Status").'</td>'."\n"; + print ' <td align="right">'.$langs->trans("SetupShort").'</td>'."\n"; print "</tr>\n"; - + */ // Show list of modules @@ -338,139 +337,143 @@ if ($mode != 'marketplace') // Print a separator if we change family //print "<tr><td>xx".$oldfamily."-".$family."-".$atleastoneforfamily."<br></td><tr>"; //if ($oldfamily && $family!=$oldfamily && $atleastoneforfamily) { - if ($family!=$oldfamily) { - print '<tr class="liste_titre">'."\n <td colspan=\"6\">"; + if ($family!=$oldfamily) + { + print '<tr class="liste_titre">'."\n"; + print '<td colspan="5">'; $familytext=empty($familylib[$family])?$family:$familylib[$family]; print $familytext; - print "</td>\n</tr>\n"; + print "</td>\n"; + print '<td align="right">'.$langs->trans("SetupShort").'</td>'."\n"; + print "</tr>\n"; $atleastoneforfamily=0; //print "<tr><td>yy".$oldfamily."-".$family."-".$atleastoneforfamily."<br></td><tr>"; } - $atleastoneforfamily++; - - if ($family!=$oldfamily) - { - $familytext=empty($familylib[$family])?$family:$familylib[$family]; - //print $familytext; - $oldfamily=$family; - } - - $var=!$var; - - //print "\n<!-- Module ".$objMod->numero." ".$objMod->getName()." found into ".$dirmod[$key]." -->\n"; - print '<tr '.$bc[$var].">\n"; - - // Picto - print ' <td valign="top" width="14" align="center">'; - $alttext=''; - //if (is_array($objMod->need_dolibarr_version)) $alttext.=($alttext?' - ':'').'Dolibarr >= '.join('.',$objMod->need_dolibarr_version); - //if (is_array($objMod->phpmin)) $alttext.=($alttext?' - ':'').'PHP >= '.join('.',$objMod->phpmin); - if (! empty($objMod->picto)) - { - if (preg_match('/^\//i',$objMod->picto)) print img_picto($alttext,$objMod->picto,' width="14px"',1); - else print img_object($alttext,$objMod->picto,' width="14px"'); - } - else - { - print img_object($alttext,'generic'); - } - print '</td>'; - - // Name - print '<td valign="top">'.$objMod->getName(); - print "</td>\n"; + $atleastoneforfamily++; - // Desc - print "<td valign=\"top\">"; - print nl2br($objMod->getDesc()); - print "</td>\n"; + if ($family!=$oldfamily) + { + $familytext=empty($familylib[$family])?$family:$familylib[$family]; + //print $familytext; + $oldfamily=$family; + } - // Version - print "<td align=\"center\" valign=\"top\" nowrap=\"nowrap\">"; - print $objMod->getVersion(); - print "</td>\n"; + $var=!$var; - // Activate/Disable and Setup (2 columns) - if (! empty($conf->global->$const_name)) - { - $disableSetup = 0; - - print "<td align=\"center\" valign=\"middle\">"; - - // Module actif - if (! empty($objMod->always_enabled) || ((! empty($conf->multicompany->enabled) && $objMod->core_enabled) && ($user->entity || $conf->entity!=1))) - { - print $langs->trans("Required"); - if (! empty($conf->multicompany->enabled) && $user->entity) $disableSetup++; - print '</td>'."\n"; - } - else - { - print '<a href="modules.php?id='.$objMod->numero.'&action=reset&value=' . $modName . '&mode=' . $mode . '">'; - print img_picto($langs->trans("Activated"),'switch_on'); - print '</a></td>'."\n"; - } - - if (! empty($objMod->config_page_url) && !$disableSetup) - { - if (is_array($objMod->config_page_url)) - { - print ' <td align="right" valign="top">'; - $i=0; - foreach ($objMod->config_page_url as $page) - { - $urlpage=$page; - if ($i++) - { - print '<a href="'.$urlpage.'" title="'.$langs->trans($page).'">'.img_picto(ucfirst($page),"setup").'</a> '; - // print '<a href="'.$page.'">'.ucfirst($page).'</a> '; - } - else - { - if (preg_match('/^([^@]+)@([^@]+)$/i',$urlpage,$regs)) - { - print '<a href="'.dol_buildpath('/'.$regs[2].'/admin/'.$regs[1],1).'" title="'.$langs->trans("Setup").'">'.img_picto($langs->trans("Setup"),"setup").'</a> '; - } - else - { - print '<a href="'.$urlpage.'" title="'.$langs->trans("Setup").'">'.img_picto($langs->trans("Setup"),"setup").'</a> '; - } - } - } - print "</td>\n"; - } - else if (preg_match('/^([^@]+)@([^@]+)$/i',$objMod->config_page_url,$regs)) - { - print '<td align="right" valign="top"><a href="'.dol_buildpath('/'.$regs[2].'/admin/'.$regs[1],1).'" title="'.$langs->trans("Setup").'">'.img_picto($langs->trans("Setup"),"setup").'</a></td>'; - } - else - { - print '<td align="right" valign="top"><a href="'.$objMod->config_page_url.'" title="'.$langs->trans("Setup").'">'.img_picto($langs->trans("Setup"),"setup").'</a></td>'; - } - } - else - { - print "<td> </td>"; - } - - } - else - { - print "<td align=\"center\" valign=\"middle\">"; - - if (! empty($objMod->always_enabled)) - { - // Ne devrait pas arriver. - } - - // Module non actif - print '<a href="modules.php?id='.$objMod->numero.'&action=set&value=' . $modName . '&mode=' . $mode . '">'; - print img_picto($langs->trans("Disabled"),'switch_off'); - print "</a></td>\n <td> </td>\n"; - } + //print "\n<!-- Module ".$objMod->numero." ".$objMod->getName()." found into ".$dirmod[$key]." -->\n"; + print '<tr '.$bc[$var].">\n"; - print "</tr>\n"; + // Picto + print ' <td valign="top" width="14" align="center">'; + $alttext=''; + //if (is_array($objMod->need_dolibarr_version)) $alttext.=($alttext?' - ':'').'Dolibarr >= '.join('.',$objMod->need_dolibarr_version); + //if (is_array($objMod->phpmin)) $alttext.=($alttext?' - ':'').'PHP >= '.join('.',$objMod->phpmin); + if (! empty($objMod->picto)) + { + if (preg_match('/^\//i',$objMod->picto)) print img_picto($alttext,$objMod->picto,' width="14px"',1); + else print img_object($alttext,$objMod->picto,' width="14px"'); + } + else + { + print img_object($alttext,'generic'); + } + print '</td>'; + + // Name + print '<td valign="top">'.$objMod->getName(); + print "</td>\n"; + + // Desc + print '<td valign="top">'; + print nl2br($objMod->getDesc()); + print "</td>\n"; + + // Version + print '<td align="center" valign="top" class="nowrap">'; + print $objMod->getVersion(); + print "</td>\n"; + + // Activate/Disable and Setup (2 columns) + if (! empty($conf->global->$const_name)) + { + $disableSetup = 0; + + print '<td align="center" valign="middle">'; + + // Module actif + if (! empty($objMod->always_enabled) || ((! empty($conf->multicompany->enabled) && $objMod->core_enabled) && ($user->entity || $conf->entity!=1))) + { + print $langs->trans("Required"); + if (! empty($conf->multicompany->enabled) && $user->entity) $disableSetup++; + print '</td>'."\n"; + } + else + { + print '<a href="modules.php?id='.$objMod->numero.'&action=reset&value=' . $modName . '&mode=' . $mode . '">'; + print img_picto($langs->trans("Activated"),'switch_on'); + print '</a></td>'."\n"; + } + + if (! empty($objMod->config_page_url) && !$disableSetup) + { + if (is_array($objMod->config_page_url)) + { + print ' <td align="right" valign="top">'; + $i=0; + foreach ($objMod->config_page_url as $page) + { + $urlpage=$page; + if ($i++) + { + print '<a href="'.$urlpage.'" title="'.$langs->trans($page).'">'.img_picto(ucfirst($page),"setup").'</a> '; + // print '<a href="'.$page.'">'.ucfirst($page).'</a> '; + } + else + { + if (preg_match('/^([^@]+)@([^@]+)$/i',$urlpage,$regs)) + { + print '<a href="'.dol_buildpath('/'.$regs[2].'/admin/'.$regs[1],1).'" title="'.$langs->trans("Setup").'">'.img_picto($langs->trans("Setup"),"setup").'</a> '; + } + else + { + print '<a href="'.$urlpage.'" title="'.$langs->trans("Setup").'">'.img_picto($langs->trans("Setup"),"setup").'</a> '; + } + } + } + print "</td>\n"; + } + else if (preg_match('/^([^@]+)@([^@]+)$/i',$objMod->config_page_url,$regs)) + { + print '<td align="right" valign="top"><a href="'.dol_buildpath('/'.$regs[2].'/admin/'.$regs[1],1).'" title="'.$langs->trans("Setup").'">'.img_picto($langs->trans("Setup"),"setup").'</a></td>'; + } + else + { + print '<td align="right" valign="top"><a href="'.$objMod->config_page_url.'" title="'.$langs->trans("Setup").'">'.img_picto($langs->trans("Setup"),"setup").'</a></td>'; + } + } + else + { + print "<td> </td>"; + } + + } + else + { + print '<td align="center" valign="middle">'; + + if (! empty($objMod->always_enabled)) + { + // Ne devrait pas arriver. + } + + // Module non actif + print '<a href="modules.php?id='.$objMod->numero.'&action=set&value=' . $modName . '&mode=' . $mode . '">'; + print img_picto($langs->trans("Disabled"),'switch_off'); + print "</a></td>\n <td> </td>\n"; + } + + print "</tr>\n"; } print "</table>\n"; @@ -502,7 +505,7 @@ dol_fiche_end(); // Show warning about external users -if ($mode != 'marketplace') print showModulesExludedForExternal($modules).'<br>'."\n"; +if ($mode != 'marketplace') print '<div class="info">'.showModulesExludedForExternal($modules).'</div><br>'."\n"; llxFooter(); diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index db7500f12cee704f9eefbd8a479b384d263d3e3a..586936c0e7348e29a7e9820e3dd782f0cea306b0 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -614,7 +614,7 @@ li.tmenu, li.tmenusel { li.tmenusel, li.tmenu:hover { background-image: -o-linear-gradient(bottom, rgba(250,250,250,0.3) 0%, rgba(0,0,0,0.3) 100%) !important; background-image: -moz-linear-gradient(bottom, rgba(250,250,250,0.3) 0%, rgba(0,0,0,0.3) 100%) !important; - background-image: -webkit-linear-gradient(bottom, rgba(250,250,250,0.3) 0%, rgba(0,0,0,0.3) 100%) !important; + background-image: -webkit-linear-gradient(bottom, rgba(0,0,0,0.3) 0%, rgba(250,250,250,0) 100%) !important; background-image: -ms-linear-gradient(bottom, rgba(250,250,250,0.3) 0%, rgba(0,0,0,0.3) 100%) !important; background-image: linear-gradient(bottom, rgba(250,250,250,0.3) 0%, rgba(0,0,0,0.3) 100%) !important; background: rgb(<?php echo $colorbackhmenu1 ?>);