From 699a079ed76d478b7cc6cedbed118bf24e2837e3 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 20 Jan 2014 00:31:32 +0100 Subject: [PATCH] New: Add option MAIN_AUTO_TIMESTAMP_IN_PUBLIC_NOTES and MAIN_AUTO_TIMESTAMP_IN_PRIVATE_NOTES to automatically add timestamp and user line into editionf field when editing a note. --- ChangeLog | 4 ++-- htdocs/comm/propal/note.php | 2 +- htdocs/core/tpl/notes.tpl.php | 6 +++++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index ad9fd2c08f0..63af55eb282 100644 --- a/ChangeLog +++ b/ChangeLog @@ -9,8 +9,8 @@ For users: - New: Add option MAIN_HIDE_INACTIVETAB_ON_PRINT to hide inactive tabs when you use the "print" view on screen. - New: Add menu entry to barcode genration page. -- New: Add option MAIN_AUTO_TIMESTAMP_IN_NOTES to automatically add timestamp - and user line into editionf field when editing a note. +- New: Add option MAIN_AUTO_TIMESTAMP_IN_PUBLIC_NOTES and MAIN_AUTO_TIMESTAMP_IN_PRIVATE_NOTES + to automatically add timestamp and user line into editionf field when editing a note. - New: Add button cancel into edition of notes. - New: Improved Opensurvey module and added options to disable comments and disable public votes diff --git a/htdocs/comm/propal/note.php b/htdocs/comm/propal/note.php index 7e31518d402..2ed0f5e5dad 100644 --- a/htdocs/comm/propal/note.php +++ b/htdocs/comm/propal/note.php @@ -49,7 +49,7 @@ $object = new Propal($db); /* Actions */ /******************************************************************************/ -$permission=$user->rights->propale->creer; // Used by the include of actions_setnotes.inc.php +$permissionnote=$user->rights->propale->creer; // Used by the include of actions_setnotes.inc.php include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not includ_once diff --git a/htdocs/core/tpl/notes.tpl.php b/htdocs/core/tpl/notes.tpl.php index 1a690dd7950..4975f3b0665 100644 --- a/htdocs/core/tpl/notes.tpl.php +++ b/htdocs/core/tpl/notes.tpl.php @@ -26,7 +26,7 @@ $permission=(isset($permission)?$permission:(isset($user->rights->$module->creer $moreparam=(isset($moreparam)?$moreparam:''); $value_public=$object->note_public; $value_private=$object->note_private; -if (! empty($conf->global->MAIN_AUTO_TIMESTAMP_IN_NOTES)) +if (! empty($conf->global->MAIN_AUTO_TIMESTAMP_IN_PUBLIC_NOTES)) { $stringtoadd=dol_print_date(dol_now(), 'dayhour').' '.$user->getFullName($langs).' --'; if (GETPOST('action') == 'edit'.$note_public) @@ -35,6 +35,10 @@ if (! empty($conf->global->MAIN_AUTO_TIMESTAMP_IN_NOTES)) if (dol_textishtml($value_public)) $value_public.="
\n"; else $value_public.="\n"; } +} +if (! empty($conf->global->MAIN_AUTO_TIMESTAMP_IN_PRIVATE_NOTES)) +{ + $stringtoadd=dol_print_date(dol_now(), 'dayhour').' '.$user->getFullName($langs).' --'; if (GETPOST('action') == 'edit'.$note_private) { $value_private=dol_concatdesc($value_private, ($value_private?"\n":"")."-- ".$stringtoadd);