forked from Wavyzz/dolibarr
Add on/off button
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
|
||||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||
* Copyright (C) 2004 Andre Cianfarani <acianfa@free.fr>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
||||
* Copyright (C) 2005-2010 Regis Houssin <regis@dolibarr.fr>
|
||||
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -200,7 +200,7 @@ print '<tr class="liste_titre">';
|
||||
print '<td width="100">'.$langs->trans("Name").'</td>';
|
||||
print '<td>'.$langs->trans("Description").'</td>';
|
||||
print '<td>'.$langs->trans("Example").'</td>';
|
||||
print '<td align="center" width="60">'.$langs->trans("Activated").'</td>';
|
||||
print '<td align="center" width="60">'.$langs->trans("Status").'</td>';
|
||||
print '<td align="center" width="16">'.$langs->trans("Infos").'</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
@@ -239,11 +239,13 @@ if ($handle)
|
||||
print '<td align="center">';
|
||||
if ($conf->global->COMMANDE_ADDON == "$file")
|
||||
{
|
||||
print img_tick($langs->trans("Activated"));
|
||||
print img_picto($langs->trans("Activated"),'on');
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmod&value='.$file.'" alt="'.$langs->trans("Default").'">'.$langs->trans("Activate").'</a>';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmod&value='.$file.'">';
|
||||
print img_picto($langs->trans("Disabled"),'off');
|
||||
print '</a>';
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
@@ -317,7 +319,7 @@ print "<table class=\"noborder\" width=\"100%\">\n";
|
||||
print "<tr class=\"liste_titre\">\n";
|
||||
print ' <td width="100">'.$langs->trans("Name")."</td>\n";
|
||||
print " <td>".$langs->trans("Description")."</td>\n";
|
||||
print '<td align="center" width="60">'.$langs->trans("Activated")."</td>\n";
|
||||
print '<td align="center" width="60">'.$langs->trans("Status")."</td>\n";
|
||||
print '<td align="center" width="60">'.$langs->trans("Default")."</td>\n";
|
||||
print '<td align="center" width="32" colspan="2">'.$langs->trans("Infos").'</td>';
|
||||
print "</tr>\n";
|
||||
@@ -344,37 +346,39 @@ while (($file = readdir($handle))!==false)
|
||||
print "</td>\n";
|
||||
|
||||
// Activated
|
||||
print "<td align=\"center\">\n";
|
||||
if (in_array($name, $def))
|
||||
{
|
||||
print "<td align=\"center\">\n";
|
||||
if ($conf->global->COMMANDE_ADDON_PDF != "$name")
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&value='.$name.'">';
|
||||
print img_tick($langs->trans("Disable"));
|
||||
print img_picto($langs->trans("Activated"),'on');
|
||||
print '</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print img_tick($langs->trans("Enabled"));
|
||||
print img_picto($langs->trans("Activated"),'on');
|
||||
}
|
||||
print "</td>";
|
||||
}
|
||||
else
|
||||
{
|
||||
print "<td align=\"center\">\n";
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'">'.$langs->trans("Activate").'</a>';
|
||||
print "</td>";
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'">';
|
||||
print img_picto($langs->trans("Disabled"),'off');
|
||||
print '</a>';
|
||||
}
|
||||
print "</td>";
|
||||
|
||||
// Defaut
|
||||
print "<td align=\"center\">";
|
||||
if ($conf->global->COMMANDE_ADDON_PDF == "$name")
|
||||
{
|
||||
print img_tick($langs->trans("Default"));
|
||||
print img_picto($langs->trans("Yes"),'on');
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&value='.$name.'" alt="'.$langs->trans("Default").'">'.$langs->trans("Default").'</a>';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&value='.$name.'">';
|
||||
print img_picto($langs->trans("No"),'off');
|
||||
print '</a>';
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user