Add on/off button
This commit is contained in:
parent
fd033a34e1
commit
4709d8deb6
@ -4,7 +4,7 @@
|
|||||||
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
|
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
|
||||||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||||
* Copyright (C) 2004 Andre Cianfarani <acianfa@free.fr>
|
* 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>
|
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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 width="100">'.$langs->trans("Name").'</td>';
|
||||||
print '<td>'.$langs->trans("Description").'</td>';
|
print '<td>'.$langs->trans("Description").'</td>';
|
||||||
print '<td>'.$langs->trans("Example").'</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 '<td align="center" width="16">'.$langs->trans("Infos").'</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
@ -239,11 +239,13 @@ if ($handle)
|
|||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
if ($conf->global->COMMANDE_ADDON == "$file")
|
if ($conf->global->COMMANDE_ADDON == "$file")
|
||||||
{
|
{
|
||||||
print img_tick($langs->trans("Activated"));
|
print img_picto($langs->trans("Activated"),'on');
|
||||||
}
|
}
|
||||||
else
|
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>';
|
print '</td>';
|
||||||
|
|
||||||
@ -317,7 +319,7 @@ print "<table class=\"noborder\" width=\"100%\">\n";
|
|||||||
print "<tr class=\"liste_titre\">\n";
|
print "<tr class=\"liste_titre\">\n";
|
||||||
print ' <td width="100">'.$langs->trans("Name")."</td>\n";
|
print ' <td width="100">'.$langs->trans("Name")."</td>\n";
|
||||||
print " <td>".$langs->trans("Description")."</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="60">'.$langs->trans("Default")."</td>\n";
|
||||||
print '<td align="center" width="32" colspan="2">'.$langs->trans("Infos").'</td>';
|
print '<td align="center" width="32" colspan="2">'.$langs->trans("Infos").'</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
@ -344,37 +346,39 @@ while (($file = readdir($handle))!==false)
|
|||||||
print "</td>\n";
|
print "</td>\n";
|
||||||
|
|
||||||
// Activated
|
// Activated
|
||||||
|
print "<td align=\"center\">\n";
|
||||||
if (in_array($name, $def))
|
if (in_array($name, $def))
|
||||||
{
|
{
|
||||||
print "<td align=\"center\">\n";
|
|
||||||
if ($conf->global->COMMANDE_ADDON_PDF != "$name")
|
if ($conf->global->COMMANDE_ADDON_PDF != "$name")
|
||||||
{
|
{
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&value='.$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>';
|
print '</a>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print img_tick($langs->trans("Enabled"));
|
print img_picto($langs->trans("Activated"),'on');
|
||||||
}
|
}
|
||||||
print "</td>";
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print "<td align=\"center\">\n";
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'">';
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'">'.$langs->trans("Activate").'</a>';
|
print img_picto($langs->trans("Disabled"),'off');
|
||||||
print "</td>";
|
print '</a>';
|
||||||
}
|
}
|
||||||
|
print "</td>";
|
||||||
|
|
||||||
// Defaut
|
// Defaut
|
||||||
print "<td align=\"center\">";
|
print "<td align=\"center\">";
|
||||||
if ($conf->global->COMMANDE_ADDON_PDF == "$name")
|
if ($conf->global->COMMANDE_ADDON_PDF == "$name")
|
||||||
{
|
{
|
||||||
print img_tick($langs->trans("Default"));
|
print img_picto($langs->trans("Yes"),'on');
|
||||||
}
|
}
|
||||||
else
|
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>';
|
print '</td>';
|
||||||
|
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
|
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
|
||||||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||||
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
||||||
* 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>
|
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -203,7 +203,7 @@ print '<tr class="liste_titre">';
|
|||||||
print '<td>'.$langs->trans("Name")."</td>\n";
|
print '<td>'.$langs->trans("Name")."</td>\n";
|
||||||
print '<td>'.$langs->trans("Description")."</td>\n";
|
print '<td>'.$langs->trans("Description")."</td>\n";
|
||||||
print '<td nowrap>'.$langs->trans("Example")."</td>\n";
|
print '<td nowrap>'.$langs->trans("Example")."</td>\n";
|
||||||
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 '<td align="center" width="16">'.$langs->trans("Infos").'</td>';
|
||||||
print '</tr>'."\n";
|
print '</tr>'."\n";
|
||||||
|
|
||||||
@ -246,11 +246,13 @@ foreach ($conf->file->dol_document_root as $dirroot)
|
|||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
if ($conf->global->PROPALE_ADDON == "$file")
|
if ($conf->global->PROPALE_ADDON == "$file")
|
||||||
{
|
{
|
||||||
print img_tick($langs->trans("Activated"));
|
print img_picto($langs->trans("Activated"),'on');
|
||||||
}
|
}
|
||||||
else
|
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>';
|
print '</td>';
|
||||||
|
|
||||||
@ -325,7 +327,7 @@ print "<table class=\"noborder\" width=\"100%\">\n";
|
|||||||
print "<tr class=\"liste_titre\">\n";
|
print "<tr class=\"liste_titre\">\n";
|
||||||
print " <td width=\"140\">".$langs->trans("Name")."</td>\n";
|
print " <td width=\"140\">".$langs->trans("Name")."</td>\n";
|
||||||
print " <td>".$langs->trans("Description")."</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="60">'.$langs->trans("Default")."</td>\n";
|
||||||
print '<td align="center" width="32" colspan="2">'.$langs->trans("Infos").'</td>';
|
print '<td align="center" width="32" colspan="2">'.$langs->trans("Infos").'</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
@ -352,37 +354,39 @@ while (($file = readdir($handle))!==false)
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Activate
|
// Activate
|
||||||
|
print "<td align=\"center\">\n";
|
||||||
if (in_array($name, $def))
|
if (in_array($name, $def))
|
||||||
{
|
{
|
||||||
print "<td align=\"center\">\n";
|
|
||||||
if ($conf->global->PROPALE_ADDON_PDF != "$name")
|
if ($conf->global->PROPALE_ADDON_PDF != "$name")
|
||||||
{
|
{
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&value='.$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>';
|
print '</a>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print img_tick($langs->trans("Enabled"));
|
print img_picto($langs->trans("Activated"),'on');
|
||||||
}
|
}
|
||||||
print "</td>";
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print "<td align=\"center\">\n";
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'">';
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'">'.$langs->trans("Activate").'</a>';
|
print img_picto($langs->trans("Disabled"),'off');
|
||||||
print "</td>";
|
print '</a>';
|
||||||
}
|
}
|
||||||
|
print "</td>";
|
||||||
|
|
||||||
// Default
|
// Default
|
||||||
print "<td align=\"center\">";
|
print "<td align=\"center\">";
|
||||||
if ($conf->global->PROPALE_ADDON_PDF == "$name")
|
if ($conf->global->PROPALE_ADDON_PDF == "$name")
|
||||||
{
|
{
|
||||||
print img_tick($langs->trans("Default"));
|
print img_picto($langs->trans("Yes"),'on');
|
||||||
}
|
}
|
||||||
else
|
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>';
|
print '</td>';
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user