diff --git a/htdocs/core/lib/resource.lib.php b/htdocs/core/lib/resource.lib.php
index 621cf800d99..58fffbae5b7 100644
--- a/htdocs/core/lib/resource.lib.php
+++ b/htdocs/core/lib/resource.lib.php
@@ -42,8 +42,10 @@ function resource_prepare_head($object)
if (empty($conf->global->MAIN_DISABLE_CONTACTS_TAB))
{
- $head[$h][0] = DOL_URL_ROOT.'/resource/contact.php?id='.$object->id;
- $head[$h][1] = $langs->trans('Contact');
+ $nbContact = count($object->liste_contact(-1,'internal')) + count($object->liste_contact(-1,'external'));
+ $head[$h][0] = DOL_URL_ROOT.'/resource/contact.php?id='.$object->id;
+ $head[$h][1] = $langs->trans('ContactsAddresses');
+ if ($nbContact > 0) $head[$h][1].= ' '.$nbContact.' ';
$head[$h][2] = 'contact';
$h++;
}
diff --git a/htdocs/core/lib/sendings.lib.php b/htdocs/core/lib/sendings.lib.php
index 52e0b9b9e96..2c362a42c2c 100644
--- a/htdocs/core/lib/sendings.lib.php
+++ b/htdocs/core/lib/sendings.lib.php
@@ -62,11 +62,16 @@ function shipping_prepare_head($object)
}
}
- $head[$h][0] = DOL_URL_ROOT."/expedition/contact.php?id=".$object->id;
- $head[$h][1] = $langs->trans("ContactsAddresses");
- $head[$h][2] = 'contact';
- $h++;
-
+ if (empty($conf->global->MAIN_DISABLE_CONTACTS_TAB))
+ {
+ $nbContact = count($object->liste_contact(-1,'internal')) + count($object->liste_contact(-1,'external'));
+ $head[$h][0] = DOL_URL_ROOT."/expedition/contact.php?id=".$object->id;
+ $head[$h][1] = $langs->trans("ContactsAddresses");
+ if ($nbContact > 0) $head[$h][1].= ' '.$nbContact.' ';
+ $head[$h][2] = 'contact';
+ $h++;
+ }
+
$nbNote = 0;
if (!empty($object->note_private)) $nbNote++;
if (!empty($object->note_public)) $nbNote++;
diff --git a/htdocs/install/mysql/data/llx_c_type_contact.sql b/htdocs/install/mysql/data/llx_c_type_contact.sql
index 4acc8e467c5..a0b36634ce1 100644
--- a/htdocs/install/mysql/data/llx_c_type_contact.sql
+++ b/htdocs/install/mysql/data/llx_c_type_contact.sql
@@ -64,11 +64,14 @@ insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) v
insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (130, 'fichinter','external', 'BILLING', 'Contact client facturation intervention', 1);
insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (131, 'fichinter','external', 'CUSTOMER', 'Contact client suivi de l''intervention', 1);
-insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (140,'order_supplier','internal', 'SALESREPFOLL', 'Responsable suivi de la commande', 1);
-insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (141,'order_supplier','internal', 'SHIPPING', 'Responsable réception de la commande', 1);
-insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (142,'order_supplier','external', 'BILLING', 'Contact fournisseur facturation commande', 1);
-insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (143,'order_supplier','external', 'CUSTOMER', 'Contact fournisseur suivi commande', 1);
-insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (145,'order_supplier','external', 'SHIPPING', 'Contact fournisseur livraison commande', 1);
+insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (140, 'order_supplier','internal', 'SALESREPFOLL', 'Responsable suivi de la commande', 1);
+insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (141, 'order_supplier','internal', 'SHIPPING', 'Responsable réception de la commande', 1);
+insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (142, 'order_supplier','external', 'BILLING', 'Contact fournisseur facturation commande', 1);
+insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (143, 'order_supplier','external', 'CUSTOMER', 'Contact fournisseur suivi commande', 1);
+insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (145, 'order_supplier','external', 'SHIPPING', 'Contact fournisseur livraison commande', 1);
+
+insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (150, 'dolresource','internal', 'USERINCHARGE', 'In charge of resource', 1);
+insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (151, 'dolresource','external', 'THIRDINCHARGE', 'In charge of resource', 1);
-- All project code must start with 'PROJECT'
insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (160, 'project', 'internal', 'PROJECTLEADER', 'Chef de Projet', 1);
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 4aae6de71e6..1ddc7479bcb 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
@@ -39,6 +39,9 @@ ALTER TABLE llx_opensurvey_sondage ADD COLUMN status integer DEFAULT 1 after dat
ALTER TABLE llx_expedition ADD COLUMN billed smallint DEFAULT 0;
+insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (150, 'dolresource','internal', 'USERINCHARGE', 'In charge of resource', 1);
+insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (151, 'dolresource','external', 'THIRDINCHARGE', 'In charge of resource', 1);
+
-- DROP TABLE llx_product_lot;
CREATE TABLE llx_product_lot (
rowid integer AUTO_INCREMENT PRIMARY KEY,
diff --git a/htdocs/resource/card.php b/htdocs/resource/card.php
index 163eeab13ce..d803ec774fd 100644
--- a/htdocs/resource/card.php
+++ b/htdocs/resource/card.php
@@ -173,17 +173,17 @@ if ( $object->fetch($id) > 0 )
print '
';
// Ref
- print ''.$langs->trans("ResourceFormLabel_ref").' ';
+ print ''.$langs->trans("ResourceFormLabel_ref").' ';
print ' ';
// Type
- print ''.$langs->trans("ResourceType").' ';
+ print ''.$langs->trans("ResourceType").' ';
print '';
$ret = $formresource->select_types_resource($object->fk_code_type_resource,'fk_code_type_resource','',2);
print ' ';
// Description
- print ''.$langs->trans("Description").' ';
+ print ''.$langs->trans("Description").' ';
print '';
print '';
print ' ';
@@ -215,7 +215,7 @@ if ( $object->fetch($id) > 0 )
*/
print '';
- print ''.$langs->trans("ResourceFormLabel_ref").' ';
+ print ' '.$langs->trans("ResourceFormLabel_ref").' ';
$linkback = $objet->ref.' '.$langs->trans("BackToList").' ';
print $form->showrefnav($object, 'id', $linkback,1,"rowid");
print ' ';
diff --git a/htdocs/resource/contact.php b/htdocs/resource/contact.php
index d635ee2e1e6..cadde67eba3 100644
--- a/htdocs/resource/contact.php
+++ b/htdocs/resource/contact.php
@@ -127,7 +127,7 @@ if ($id > 0 || ! empty($ref))
*/
print '';
- print ''.$langs->trans("ResourceFormLabel_ref").' ';
+ print ' '.$langs->trans("ResourceFormLabel_ref").' ';
$linkback = $objet->ref.' '.$langs->trans("BackToList").' ';
print $form->showrefnav($object, 'id', $linkback,1,"rowid");
print ' ';
diff --git a/htdocs/resource/document.php b/htdocs/resource/document.php
index a21bc88c319..8e39c64e2c9 100644
--- a/htdocs/resource/document.php
+++ b/htdocs/resource/document.php
@@ -89,7 +89,7 @@ if ($object->id)
$head=resource_prepare_head($object);
- dol_fiche_head($head, 'documents', $langs->trans("ResourceSingular"), 0, 'resource');
+ dol_fiche_head($head, 'documents', $langs->trans("ResourceSingular"), 0, 'resource@resource');
// Construit liste des fichiers
@@ -104,7 +104,7 @@ if ($object->id)
print '';
- print ''.$langs->trans("ResourceFormLabel_ref").' ';
+ print ' '.$langs->trans("ResourceFormLabel_ref").' ';
$linkback = $objet->ref.' '.$langs->trans("BackToList").' ';
print $form->showrefnav($object, 'id', $linkback,1,"rowid");
print ' ';
diff --git a/htdocs/resource/note.php b/htdocs/resource/note.php
index e404a3bdef8..1f277688957 100644
--- a/htdocs/resource/note.php
+++ b/htdocs/resource/note.php
@@ -1,8 +1,9 @@
* Copyright (C) 2011-2012 Juanjo Menent
+ * Copyright (C) 2016 Laurent Destailleur
* Copyright (C) 2013 Florian Henry
- * Copyright (C) 2016 Gilles Poirier
+ * Copyright (C) 2016 Gilles Poirier
*
* 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
@@ -44,6 +45,7 @@ $object->fetch($id,$ref);
$permissionnote=$user->rights->resource->write; // Used by the include of actions_setnotes.inc.php
+
/*
* Actions
*/