From 8356dd1080882fc41fa5b80cfc07b3590962a6ed Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 20 Jun 2016 10:22:08 +0200 Subject: [PATCH] Fix minor --- htdocs/commande/note.php | 1 + htdocs/core/lib/project.lib.php | 4 ++++ htdocs/core/tpl/notes.tpl.php | 1 + htdocs/install/mysql/migration/3.9.0-4.0.0.sql | 1 + htdocs/projet/card.php | 2 +- htdocs/projet/contact.php | 2 +- htdocs/projet/document.php | 2 +- htdocs/projet/element.php | 2 +- htdocs/projet/ganttview.php | 2 +- htdocs/projet/note.php | 4 ++-- htdocs/projet/tasks.php | 8 ++++---- 11 files changed, 18 insertions(+), 11 deletions(-) diff --git a/htdocs/commande/note.php b/htdocs/commande/note.php index 6f3519e9ced..e6bf504bec7 100644 --- a/htdocs/commande/note.php +++ b/htdocs/commande/note.php @@ -105,6 +105,7 @@ if ($id > 0 || ! empty($ref)) print '
'; + $cssclass="titlefield"; include DOL_DOCUMENT_ROOT.'/core/tpl/notes.tpl.php'; print ''; diff --git a/htdocs/core/lib/project.lib.php b/htdocs/core/lib/project.lib.php index 87ef87cfe64..3aa000256ed 100644 --- a/htdocs/core/lib/project.lib.php +++ b/htdocs/core/lib/project.lib.php @@ -44,8 +44,10 @@ function project_prepare_head($object) $head[$h][2] = 'project'; $h++; + $nbContact = count($object->liste_contact(-1,'internal')) + count($object->liste_contact(-1,'external')); $head[$h][0] = DOL_URL_ROOT.'/projet/contact.php?id='.$object->id; $head[$h][1] = $langs->trans("ProjectContact"); + if ($nbContact > 0) $head[$h][1].= ' '.$nbContact.''; $head[$h][2] = 'contact'; $h++; @@ -131,8 +133,10 @@ function task_prepare_head($object) $head[$h][2] = 'task_task'; $h++; + $nbContact = count($object->liste_contact(-1,'internal')) + count($object->liste_contact(-1,'external')); $head[$h][0] = DOL_URL_ROOT.'/projet/tasks/contact.php?id='.$object->id.(GETPOST('withproject')?'&withproject=1':''); $head[$h][1] = $langs->trans("TaskRessourceLinks"); + if ($nbContact > 0) $head[$h][1].= ' '.$nbContact.''; $head[$h][2] = 'task_contact'; $h++; diff --git a/htdocs/core/tpl/notes.tpl.php b/htdocs/core/tpl/notes.tpl.php index c68aa599310..61832720d0e 100644 --- a/htdocs/core/tpl/notes.tpl.php +++ b/htdocs/core/tpl/notes.tpl.php @@ -17,6 +17,7 @@ * along with this program. If not, see . */ +// $cssclass must be defined by caller. For example cssclass='fieldtitle" $module = $object->element; $note_public = 'note_public'; $note_private = 'note_private'; diff --git a/htdocs/install/mysql/migration/3.9.0-4.0.0.sql b/htdocs/install/mysql/migration/3.9.0-4.0.0.sql index 935f8a04917..e939563cf9b 100644 --- a/htdocs/install/mysql/migration/3.9.0-4.0.0.sql +++ b/htdocs/install/mysql/migration/3.9.0-4.0.0.sql @@ -412,6 +412,7 @@ CREATE UNIQUE INDEX uk_bordereau_cheque ON llx_bordereau_cheque (ref, entity); ALTER TABLE llx_societe_rib ADD COLUMN date_rum date after rum; -- Add more action to log +update llx_c_action_trigger set rang = 140 where code = 'PROJECT_CREATE'; insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('PROJECT_MODIFY','Project modified','Executed when a project is modified','project',141); insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('PROJECT_DELETE','Project deleted','Executed when a project is deleted','project',142); insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('ORDER_SUPPLIER_CREATE','Supplier order validated','Executed when a supplier order is validated','order_supplier',11); diff --git a/htdocs/projet/card.php b/htdocs/projet/card.php index b38e322d2d7..e7ce1625aad 100644 --- a/htdocs/projet/card.php +++ b/htdocs/projet/card.php @@ -741,7 +741,7 @@ else $linkback = ''.$langs->trans("BackToList").''; // Ref - print ''.$langs->trans("Ref").''; + print ''.$langs->trans("Ref").''; // Define a complementary filter for search of next/prev ref. if (! $user->rights->projet->all->lire) { diff --git a/htdocs/projet/contact.php b/htdocs/projet/contact.php index 3ef4f777124..6d3dc65903e 100644 --- a/htdocs/projet/contact.php +++ b/htdocs/projet/contact.php @@ -157,7 +157,7 @@ if ($id > 0 || ! empty($ref)) $linkback = ''.$langs->trans("BackToList").''; // Ref - print ''.$langs->trans('Ref').''; + print ''.$langs->trans('Ref').''; // Define a complementary filter for search of next/prev ref. if (! $user->rights->projet->all->lire) { diff --git a/htdocs/projet/document.php b/htdocs/projet/document.php index d75c503445c..d59dec0dc4a 100644 --- a/htdocs/projet/document.php +++ b/htdocs/projet/document.php @@ -111,7 +111,7 @@ if ($object->id > 0) $linkback = ''.$langs->trans("BackToList").''; // Ref - print ''.$langs->trans("Ref").''; + print ''.$langs->trans("Ref").''; // Define a complementary filter for search of next/prev ref. if (! $user->rights->projet->all->lire) { diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php index fe6fe738110..86928cbf2b9 100644 --- a/htdocs/projet/element.php +++ b/htdocs/projet/element.php @@ -121,7 +121,7 @@ print ''; $linkback = ''.$langs->trans("BackToList").''; -print '
'.$langs->trans("Ref").''; +print '
'.$langs->trans("Ref").''; // Define a complementary filter for search of next/prev ref. if (! $user->rights->projet->all->lire) { diff --git a/htdocs/projet/ganttview.php b/htdocs/projet/ganttview.php index 822489b643a..498db12ddc6 100644 --- a/htdocs/projet/ganttview.php +++ b/htdocs/projet/ganttview.php @@ -103,7 +103,7 @@ if ($id > 0 || ! empty($ref)) $linkback = ''.$langs->trans("BackToList").''; // Ref - print '
'; + print '
'; print $langs->trans("Ref"); print ''; // Define a complementary filter for search of next/prev ref. diff --git a/htdocs/projet/note.php b/htdocs/projet/note.php index 47423491930..ef4be16f51e 100644 --- a/htdocs/projet/note.php +++ b/htdocs/projet/note.php @@ -84,7 +84,7 @@ if ($id > 0 || ! empty($ref)) $linkback = ''.$langs->trans("BackToList").''; // Ref - print '
'.$langs->trans("Ref").''; + print '
'.$langs->trans("Ref").''; // Define a complementary filter for search of next/prev ref. if (! $user->rights->projet->all->lire) { @@ -126,7 +126,7 @@ if ($id > 0 || ! empty($ref)) print '
'; - $colwidth=30; + $cssclass="titlefield"; include DOL_DOCUMENT_ROOT.'/core/tpl/notes.tpl.php'; dol_fiche_end(); diff --git a/htdocs/projet/tasks.php b/htdocs/projet/tasks.php index f1400cb4643..ab7e2849330 100644 --- a/htdocs/projet/tasks.php +++ b/htdocs/projet/tasks.php @@ -209,7 +209,7 @@ if ($id > 0 || ! empty($ref)) $linkback = ''.$langs->trans("BackToList").''; // Ref - print '
'; + print '
'; print $langs->trans("Ref"); print ''; // Define a complementary filter for search of next/prev ref. @@ -274,7 +274,8 @@ if ($action == 'create' && $user->rights->projet->creer && (empty($object->third print ''; if (! empty($object->id)) print ''; if (! empty($mode)) print ''; - + print ''; + dol_fiche_head(''); print ''; @@ -291,8 +292,7 @@ if ($action == 'create' && $user->rights->projet->creer && (empty($object->third if (is_numeric($defaultref) && $defaultref <= 0) $defaultref=''; // Ref - print ''; - print ''; + print ''; print '
'.$langs->trans("Ref").''.($_POST["ref"]?$_POST["ref"]:$defaultref).'
'.$langs->trans("Ref").''.($_POST["ref"]?$_POST["ref"]:$defaultref).'
'.$langs->trans("Label").''; print '';