From 2da50f1eca2aa36fb56f540e93c8e0068e6b7417 Mon Sep 17 00:00:00 2001
From: Laurent Destailleur <eldy@destailleur.fr>
Date: Tue, 23 May 2017 01:32:19 +0200
Subject: [PATCH] Look and feel v6

---
 htdocs/comm/card.php        |  2 +-
 htdocs/contact/agenda.php   |  2 +-
 htdocs/contact/card.php     |  2 +-
 htdocs/contact/document.php |  2 +-
 htdocs/contact/info.php     |  2 +-
 htdocs/contact/ldap.php     |  2 +-
 htdocs/contact/note.php     | 50 +------------------------------------
 htdocs/contact/perso.php    |  2 +-
 htdocs/fourn/card.php       |  2 +-
 htdocs/societe/card.php     |  8 +++---
 10 files changed, 14 insertions(+), 60 deletions(-)

diff --git a/htdocs/comm/card.php b/htdocs/comm/card.php
index b26ce4fa7ac..7599cce4cfd 100644
--- a/htdocs/comm/card.php
+++ b/htdocs/comm/card.php
@@ -204,7 +204,7 @@ if ($id > 0)
 {
 	$head = societe_prepare_head($object);
 
-	dol_fiche_head($head, 'customer', $langs->trans("ThirdParty"),0,'company');
+	dol_fiche_head($head, 'customer', $langs->trans("ThirdParty"), -1, 'company');
 
 	$linkback = '<a href="'.DOL_URL_ROOT.'/societe/list.php">'.$langs->trans("BackToList").'</a>';
 	
diff --git a/htdocs/contact/agenda.php b/htdocs/contact/agenda.php
index e97263ebf00..f57e088e00e 100644
--- a/htdocs/contact/agenda.php
+++ b/htdocs/contact/agenda.php
@@ -208,7 +208,7 @@ else
 
         dol_htmloutput_errors($error,$errors);
 
-        dol_fiche_head($head, 'agenda', $title, 0, 'contact');
+        dol_fiche_head($head, 'agenda', $title, -1, 'contact');
 
         $linkback = '<a href="'.DOL_URL_ROOT.'/contact/list.php">'.$langs->trans("BackToList").'</a>';
         
diff --git a/htdocs/contact/card.php b/htdocs/contact/card.php
index dfa6eec515c..fde2e428169 100644
--- a/htdocs/contact/card.php
+++ b/htdocs/contact/card.php
@@ -1021,7 +1021,7 @@ else
 
         dol_htmloutput_errors($error,$errors);
 
-        dol_fiche_head($head, 'card', $title, 0, 'contact');
+        dol_fiche_head($head, 'card', $title, -1, 'contact');
 
         if ($action == 'create_user')
         {
diff --git a/htdocs/contact/document.php b/htdocs/contact/document.php
index 5d70ba7b4e1..da8ef616a4f 100644
--- a/htdocs/contact/document.php
+++ b/htdocs/contact/document.php
@@ -96,7 +96,7 @@ if ($object->id)
     $head = contact_prepare_head($object);
 	$title = (! empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("Contacts") : $langs->trans("ContactsAddresses"));
 
-    dol_fiche_head($head, 'documents', $title, 0, 'contact');
+    dol_fiche_head($head, 'documents', $title, -1, 'contact');
 
 
     // Construit liste des fichiers
diff --git a/htdocs/contact/info.php b/htdocs/contact/info.php
index 0250691e88d..20d379b50d0 100644
--- a/htdocs/contact/info.php
+++ b/htdocs/contact/info.php
@@ -59,7 +59,7 @@ if ($id > 0)
 
 	$head = contact_prepare_head($object);
 
-	dol_fiche_head($head, 'info', $title, 0, 'contact');
+	dol_fiche_head($head, 'info', $title, -1, 'contact');
 
 	$linkback = '<a href="'.DOL_URL_ROOT.'/contact/list.php">'.$langs->trans("BackToList").'</a>';
 
diff --git a/htdocs/contact/ldap.php b/htdocs/contact/ldap.php
index 3e998b43ec5..16c00bf92cb 100644
--- a/htdocs/contact/ldap.php
+++ b/htdocs/contact/ldap.php
@@ -88,7 +88,7 @@ $form = new Form($db);
 
 $head = contact_prepare_head($object);
 
-dol_fiche_head($head, 'ldap', $title, 0, 'contact');
+dol_fiche_head($head, 'ldap', $title, -1, 'contact');
 
 dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', '');
     
diff --git a/htdocs/contact/note.php b/htdocs/contact/note.php
index c49dbc9f787..b52f9bf8727 100644
--- a/htdocs/contact/note.php
+++ b/htdocs/contact/note.php
@@ -73,7 +73,7 @@ if ($id > 0)
 
     $head = contact_prepare_head($object);
 
-    dol_fiche_head($head, 'note', $title,0,'contact');
+    dol_fiche_head($head, 'note', $title, -1, 'contact');
     
     $linkback = '<a href="'.DOL_URL_ROOT.'/contact/list.php">'.$langs->trans("BackToList").'</a>';
 
@@ -100,61 +100,13 @@ if ($id > 0)
 
 	print '<table class="border centpercent">';
 
-    // Company
-    if (empty($conf->global->SOCIETE_DISABLE_CONTACTS))
-    {
-    	if ($object->socid > 0)
-    	{
-    		$objsoc = new Societe($db);
-    		$objsoc->fetch($object->socid);
-
-    		print '<tr><td class="'.$cssclass.'">'.$langs->trans("ThirdParty").'</td><td>'.$objsoc->getNomUrl(1).'</td></tr>';
-    	}
-
-    	else
-    	{
-    		print '<tr><td class="'.$cssclass.'">'.$langs->trans("ThirdParty").'</td><td>';
-    		print $langs->trans("ContactNotLinkedToCompany");
-    		print '</td></tr>';
-    	}
-    }
-
     // Civility
     print '<tr><td class="'.$cssclass.'">'.$langs->trans("UserTitle").'</td><td>';
     print $object->getCivilityLabel();
     print '</td></tr>';
 
-    // Date To Birth
-    print '<tr>';
-    if (! empty($object->birthday))
-    {
-    	include_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
-
-    	print '<td>'.$langs->trans("DateToBirth").'</td><td>'.dol_print_date($object->birthday,"day");
-
-    	print ' &nbsp; ';
-    	//var_dump($birthdatearray);
-    	$ageyear=convertSecondToTime($now-$object->birthday,'year')-1970;
-    	$agemonth=convertSecondToTime($now-$object->birthday,'month')-1;
-    	if ($ageyear >= 2) print '('.$ageyear.' '.$langs->trans("DurationYears").')';
-    	else if ($agemonth >= 2) print '('.$agemonth.' '.$langs->trans("DurationMonths").')';
-    	else print '('.$agemonth.' '.$langs->trans("DurationMonth").')';
-
-
-    	print ' &nbsp; - &nbsp; ';
-    	if ($object->birthday_alert) print $langs->trans("BirthdayAlertOn");
-    	else print $langs->trans("BirthdayAlertOff");
-    	print '</td>';
-    }
-    else
-    {
-    	print '<td>'.$langs->trans("DateToBirth").'</td><td>'.$langs->trans("Unknown")."</td>";
-    }
-    print "</tr>";
-
     print "</table>";
 
-    print '<br>';
     
 	$cssclass="titlefield";
 	include DOL_DOCUMENT_ROOT.'/core/tpl/notes.tpl.php';
diff --git a/htdocs/contact/perso.php b/htdocs/contact/perso.php
index bc4443dd8bf..30fa10b5ddc 100644
--- a/htdocs/contact/perso.php
+++ b/htdocs/contact/perso.php
@@ -229,7 +229,7 @@ else
 {
     // View mode
     
-    dol_fiche_head($head, 'perso', $title, 0, 'contact');
+    dol_fiche_head($head, 'perso', $title, -1, 'contact');
     
     $linkback = '<a href="'.DOL_URL_ROOT.'/contact/list.php">'.$langs->trans("BackToList").'</a>';
     
diff --git a/htdocs/fourn/card.php b/htdocs/fourn/card.php
index 6243a9e3a16..cfa88b187f0 100644
--- a/htdocs/fourn/card.php
+++ b/htdocs/fourn/card.php
@@ -130,7 +130,7 @@ if ($object->id > 0)
 	 */
 	$head = societe_prepare_head($object);
 
-	dol_fiche_head($head, 'supplier', $langs->trans("ThirdParty"),0,'company');
+	dol_fiche_head($head, 'supplier', $langs->trans("ThirdParty"), -1, 'company');
 
 	$linkback = '<a href="'.DOL_URL_ROOT.'/societe/list.php">'.$langs->trans("BackToList").'</a>';
 	
diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php
index 14e8e4b4679..346f4ea38dc 100644
--- a/htdocs/societe/card.php
+++ b/htdocs/societe/card.php
@@ -1544,7 +1544,7 @@ else
 
             dol_fiche_head($head, 'card', $langs->trans("ThirdParty"), 0, 'company');
 
-
+            print '<div class="fichecenter2">'; 
             print '<table class="border" width="100%">';
 
             // Ref/ID
@@ -1934,7 +1934,8 @@ else
             print '</tr>';
 
             print '</table>';
-
+            print '</div>';
+            
 	        dol_fiche_end();
 
             print '<div align="center">';
@@ -1951,13 +1952,14 @@ else
         /*
          * View
          */
+        
         if (!empty($object->id)) $res=$object->fetch_optionals($object->id,$extralabels);
         //if ($res < 0) { dol_print_error($db); exit; }
 
 
         $head = societe_prepare_head($object);
 
-        dol_fiche_head($head, 'card', $langs->trans("ThirdParty"), 0, 'company');
+        dol_fiche_head($head, 'card', $langs->trans("ThirdParty"), -1, 'company');
 
         // Confirm delete third party
         if ($action == 'delete' || ($conf->use_javascript_ajax && empty($conf->dol_use_jmobile)))
-- 
GitLab