From 9536a59dff97d1ff132517c5b6eadd2020615547 Mon Sep 17 00:00:00 2001 From: Regis Houssin <regis@dolibarr.fr> Date: Sat, 30 Jan 2010 10:43:25 +0000 Subject: [PATCH] Add on/off button --- htdocs/admin/modules.php | 26 ++++++++------------------ htdocs/admin/multicompany.php | 2 +- htdocs/projet/tasks/task.php | 31 +------------------------------ 3 files changed, 10 insertions(+), 49 deletions(-) diff --git a/htdocs/admin/modules.php b/htdocs/admin/modules.php index d6f75c8c7d3..00e2b8817b8 100644 --- a/htdocs/admin/modules.php +++ b/htdocs/admin/modules.php @@ -3,7 +3,7 @@ * Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org> * Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net> * 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> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -335,8 +335,7 @@ 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("Activated")."</td>\n"; -print " <td align=\"center\">".$langs->trans("Action")."</td>\n"; +print " <td align=\"center\">".$langs->trans("Status")."</td>\n"; print " <td>".$langs->trans("SetupShort")."</td>\n"; print "</tr>\n"; @@ -431,19 +430,6 @@ foreach ($orders as $key => $value) print $objMod->getVersion(); print "</td>\n"; - // Tick - print "<td align=\"center\" valign=\"top\">"; - if (! empty($conf->global->$const_name)) - { - print img_tick(); - } - else - { - print " "; - } - - print "</td>\n"; - // Activate/Disable and Setup print "<td align=\"center\" valign=\"top\">"; if (! empty($conf->global->$const_name)) @@ -458,7 +444,9 @@ foreach ($orders as $key => $value) } else { - print "<a href=\"modules.php?id=".$objMod->numero."&action=reset&value=" . $modName . "&mode=" . $mode . "\">" . $langs->trans("Disable") . "</a></td>\n"; + print '<a href="modules.php?id='.$objMod->numero.'&action=reset&value=' . $modName . '&mode=' . $mode . '">'; + print img_picto($langs->trans("Activated"),'on'); + print '</a></td>'."\n"; } if (! empty($objMod->config_page_url) && !$disableSetup) @@ -503,7 +491,9 @@ foreach ($orders as $key => $value) } // Module non actif - print "<a href=\"modules.php?id=".$objMod->numero."&action=set&value=" . $modName . "&mode=" . $mode . "\">" . $langs->trans("Activate") . "</a></td>\n <td> </td>\n"; + print '<a href="modules.php?id='.$objMod->numero.'&action=set&value=' . $modName . '&mode=' . $mode . '">'; + print img_picto($langs->trans("Disabled"),'off'); + print "</a></td>\n <td> </td>\n"; } print "</tr>\n"; diff --git a/htdocs/admin/multicompany.php b/htdocs/admin/multicompany.php index 078b629ecd3..f724dbc6853 100644 --- a/htdocs/admin/multicompany.php +++ b/htdocs/admin/multicompany.php @@ -1,5 +1,5 @@ <?php -/* Copyright (C) 2009 Regis Houssin <regis@dolibarr.fr> +/* Copyright (C) 2010 Regis Houssin <regis@dolibarr.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/htdocs/projet/tasks/task.php b/htdocs/projet/tasks/task.php index 14cc2cf29a4..3dc308602bf 100644 --- a/htdocs/projet/tasks/task.php +++ b/htdocs/projet/tasks/task.php @@ -228,39 +228,10 @@ if ($taskid) print '</td></tr>'; // Description - print '<td>'.$langs->trans("Description").'</td><td colspan="3">'; + print '<td valign="top">'.$langs->trans("Description").'</td><td colspan="3">'; print nl2br($task->description); print '</td></tr>'; - /* List of time spent */ - - $sql = "SELECT t.task_date, t.task_duration, t.fk_user, u.login, u.rowid"; - $sql.= " FROM ".MAIN_DB_PREFIX."projet_task_time as t"; - $sql.= ", ".MAIN_DB_PREFIX."user as u"; - $sql.= " WHERE t.fk_task =".$task->id; - $sql.= " AND t.fk_user = u.rowid"; - $sql.= " ORDER BY t.task_date DESC"; - - $var=true; - $resql = $db->query($sql); - if ($resql) - { - $num = $db->num_rows($resql); - $i = 0; - $tasks = array(); - while ($i < $num) - { - $row = $db->fetch_object($resql); - $tasks[$i] = $row; - $i++; - } - $db->free($resql); - } - else - { - dol_print_error($db); - } - print '</table></form>'; print '</div>'; -- GitLab