From c21390ab836cd9e8e68ac4ffd5b2ec85d96be9e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a?= Date: Sat, 4 May 2013 20:08:17 +0200 Subject: [PATCH 1/2] New: [ task #858 ] Holiday module: note on manual holiday assignation --- ChangeLog | 2 +- htdocs/holiday/define_holiday.php | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index ea8c4b39b6a..e7e9a17f089 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,7 +5,7 @@ English Dolibarr ChangeLog ***** ChangeLog for 3.5 compared to 3.4 ***** For users: - New: [ task #877 ] Reorganize menus - +- New: [ task #858 ] Holiday module: note on manual holiday assignation ***** ChangeLog for 3.4 compared to 3.3.2 ***** diff --git a/htdocs/holiday/define_holiday.php b/htdocs/holiday/define_holiday.php index 36e93d84271..ce9e6d4854f 100644 --- a/htdocs/holiday/define_holiday.php +++ b/htdocs/holiday/define_holiday.php @@ -67,7 +67,10 @@ if ($action == 'update' && isset($_POST['update_cp'])) } // On ajoute la modification dans le LOG - $holiday->addLogCP($user->id,$userID, $langs->trans('Event').': '.$langs->trans('ManualUpdate'),$userValue); + //If the user set a comment, we add it to the log comment + $comment = (isset($_POST['note_holiday'][$userID]) ? ' ('.$_POST['note_holiday'][$userID].')' : ''); + + $holiday->addLogCP($user->id,$userID, $langs->trans('Event').': '.$langs->trans('ManualUpdate').$comment,$userValue); // Mise à jour des congés de l'utilisateur $holiday->updateSoldeCP($userID,$userValue); @@ -145,8 +148,9 @@ print ''; print ''; print ""; print ''; -print ''; +print ''; print ''; +print ''; print ''; print ''; @@ -166,6 +170,7 @@ foreach($listUsers as $users) print ''."\n"; + print ''; print ''."\n"; print ''; From 3eb6d3edb166528af1d0600bb63a73131f795d2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a?= Date: Sat, 4 May 2013 20:09:39 +0200 Subject: [PATCH 2/2] Translated some comments --- htdocs/holiday/define_holiday.php | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/htdocs/holiday/define_holiday.php b/htdocs/holiday/define_holiday.php index ce9e6d4854f..a1cacebc74c 100644 --- a/htdocs/holiday/define_holiday.php +++ b/htdocs/holiday/define_holiday.php @@ -1,17 +1,18 @@ * Copyright (C) 2011 Dimitri Mouillard -* -* 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 -* the Free Software Foundation; either version 3 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* + * Copyright (C) 2013 Marcos García + * + * 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 + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ @@ -31,7 +32,7 @@ require_once DOL_DOCUMENT_ROOT.'/holiday/common.inc.php'; // Protection if external user if ($user->societe_id > 0) accessforbidden(); -// Si l'utilisateur n'a pas le droit de lire cette page +// If the user does not have perm to read the page if(!$user->rights->holiday->define_holiday) accessforbidden(); $action=GETPOST('action'); @@ -66,16 +67,16 @@ if ($action == 'update' && isset($_POST['update_cp'])) $userValue = 0; } - // On ajoute la modification dans le LOG //If the user set a comment, we add it to the log comment $comment = (isset($_POST['note_holiday'][$userID]) ? ' ('.$_POST['note_holiday'][$userID].')' : ''); + // We add the modification to the log $holiday->addLogCP($user->id,$userID, $langs->trans('Event').': '.$langs->trans('ManualUpdate').$comment,$userValue); - // Mise à jour des congés de l'utilisateur + // Update of the days of the employee $holiday->updateSoldeCP($userID,$userValue); - // If it first update of sold, we set date to havoid to have sold incremented by new month + // If it first update of sold, we set date to avoid to have sold incremented by new month $now=dol_now(); $sql = "UPDATE ".MAIN_DB_PREFIX."holiday_config SET"; $sql.= " value = '".dol_print_date($now,'%Y%m%d%H%M%S')."'";
'.$langs->trans('ID').''.$langs->trans('UserName').''.$langs->trans('UserName').''.$langs->trans('Available').''.$langs->trans('Note').''.$langs->trans('UpdateButtonCP').'
'; print ''; print ' '.$langs->trans('days').'