From 1a883d870bdfc685a5c712f2134da1c80ef67633 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 23 Apr 2016 17:35:33 +0200 Subject: [PATCH] Uniformize style --- htdocs/barcode/printsheet.php | 2 +- htdocs/commande/card.php | 8 +------- htdocs/holiday/card.php | 6 +++--- htdocs/holiday/class/holiday.class.php | 14 +++++++++----- htdocs/holiday/define_holiday.php | 12 ++++++++++-- htdocs/holiday/document.php | 6 +++--- htdocs/projet/card.php | 5 ++--- htdocs/projet/element.php | 8 +++++--- htdocs/theme/eldy/style.css.php | 2 +- htdocs/theme/md/style.css.php | 2 +- 10 files changed, 36 insertions(+), 29 deletions(-) diff --git a/htdocs/barcode/printsheet.php b/htdocs/barcode/printsheet.php index bd1fb2156c6..a60ac19d0af 100644 --- a/htdocs/barcode/printsheet.php +++ b/htdocs/barcode/printsheet.php @@ -384,7 +384,7 @@ print ''; print ' '.$langs->trans("FillBarCodeTypeAndValueFromThirdParty").'   '; print '
'; print '
'; -print $form->select_company(GETPOST('socid'), 'socid', '', 1, 0, 0, array(), 0, 'minwidth300'); +print $form->select_company(GETPOST('socid'), 'socid', '', 'SelectThirdParty', 0, 0, array(), 0, 'minwidth300'); print '   '; print '
'; diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index d6fa064df39..08ca0e6b067 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -2587,12 +2587,8 @@ if ($action == 'create' && $user->rights->commande->creer) if ($action != 'presend') { print '
'; - // print '
'; - // print ''; // ancre - /* - * Documents generes - */ + // Documents $comref = dol_sanitizeFileName($object->ref); $file = $conf->commande->dir_output . '/' . $comref . '/' . $comref . '.pdf'; $relativepath = $comref . '/' . $comref . '.pdf'; @@ -2611,14 +2607,12 @@ if ($action == 'create' && $user->rights->commande->creer) print '
'; - // print '
'; // List of actions on element include_once DOL_DOCUMENT_ROOT . '/core/class/html.formactions.class.php'; $formactions = new FormActions($db); $somethingshown = $formactions->showactions($object, 'order', $socid); - // print '
'; print '
'; } diff --git a/htdocs/holiday/card.php b/htdocs/holiday/card.php index 66941d3ded7..50679085f12 100644 --- a/htdocs/holiday/card.php +++ b/htdocs/holiday/card.php @@ -885,7 +885,7 @@ else { print '
'; print $error; - print '

'; + print '

'; print '
'; } else @@ -994,10 +994,10 @@ else print ''; print ''; - $linkback=''; + $linkback=''.$langs->trans("BackToList").''; print ''; - print ''; + print ''; print ''; diff --git a/htdocs/holiday/class/holiday.class.php b/htdocs/holiday/class/holiday.class.php index fb791d84ee6..03ffcf2b465 100644 --- a/htdocs/holiday/class/holiday.class.php +++ b/htdocs/holiday/class/holiday.class.php @@ -1219,7 +1219,7 @@ class Holiday extends CommonObject // List for Dolibarr users if ($type) { - $sql = "SELECT u.rowid, u.lastname, u.firstname"; + $sql = "SELECT u.rowid, u.lastname, u.firstname, u.gender, u.photo, u.employee, u.statut"; $sql.= " FROM ".MAIN_DB_PREFIX."user as u"; if (! empty($conf->multicompany->enabled) && ! empty($conf->multicompany->transverse_mode)) @@ -1250,11 +1250,15 @@ class Holiday extends CommonObject $obj = $this->db->fetch_object($resql); $tab_result[$i]['rowid'] = $obj->rowid; - $tab_result[$i]['name'] = $obj->lastname; + $tab_result[$i]['name'] = $obj->lastname; // deprecated $tab_result[$i]['lastname'] = $obj->lastname; $tab_result[$i]['firstname'] = $obj->firstname; - $tab_result[$i]['type'] = $obj->type; - $tab_result[$i]['nb_holiday'] = $obj->nb_holiday; + $tab_result[$i]['gender'] = $obj->gender; + $tab_result[$i]['status'] = $obj->statut; + $tab_result[$i]['employee'] = $obj->employee; + $tab_result[$i]['photo'] = $obj->photo; + //$tab_result[$i]['type'] = $obj->type; + //$tab_result[$i]['nb_holiday'] = $obj->nb_holiday; $i++; } @@ -1264,7 +1268,7 @@ class Holiday extends CommonObject else { // Erreur SQL - $this->error="Error ".$this->db->lasterror(); + $this->errors[]="Error ".$this->db->lasterror(); return -1; } } diff --git a/htdocs/holiday/define_holiday.php b/htdocs/holiday/define_holiday.php index 52876b1d1cd..6af57716648 100644 --- a/htdocs/holiday/define_holiday.php +++ b/htdocs/holiday/define_holiday.php @@ -181,6 +181,10 @@ if ($result < 0) } $listUsers = $holiday->fetchUsers(false,true); +if (is_numeric($listUsers) && $listUsers < 0) +{ + setEventMessages($holiday->error, $holiday->errors, 'errors'); +} $var=true; $i = 0; @@ -260,9 +264,13 @@ else print ''; print ''; if (count($typeleaves)) diff --git a/htdocs/holiday/document.php b/htdocs/holiday/document.php index ab588812c32..e2554cffffb 100644 --- a/htdocs/holiday/document.php +++ b/htdocs/holiday/document.php @@ -108,12 +108,12 @@ if ($object->id) } - print '
'.$langs->trans("Ref").''.$langs->trans("Ref").''; print $form->showrefnav($cp, 'id', $linkback, 1, 'rowid', 'ref'); print '
'; $userstatic->id=$users['rowid']; - $userstatic->lastname=$users['name']; + $userstatic->lastname=$users['lastname']; $userstatic->firstname=$users['firstname']; - print $userstatic->getNomUrl(1); + $userstatic->gender=$users['gender']; + $userstatic->photo=$users['photo']; + $userstatic->statut=$users['status']; + $userstatic->employee=$users['employee']; + print $userstatic->getNomUrl(-1); print '
'; + print '
'; - $linkback=''; + $linkback=''.$langs->trans("BackToList").''; print ''; - print ''; + print ''; print ''; diff --git a/htdocs/projet/card.php b/htdocs/projet/card.php index f6937cff239..5ef9b0e1ce4 100644 --- a/htdocs/projet/card.php +++ b/htdocs/projet/card.php @@ -991,7 +991,6 @@ else } print ""; - print "
\n"; if ($action != 'presend') { @@ -1011,7 +1010,7 @@ else $somethingshown=$formfile->show_documents('project',$filename,$filedir,$urlsource,$genallowed,$delallowed,$object->modelpdf); - print ''; + print '
'; if (!empty($object->id)) { @@ -1021,7 +1020,7 @@ else $somethingshown=$formactions->showactions($object,'project',$socid); } - print '
'; + print '
'; } // Hook to add more things on page diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php index cf8d5c3665f..fe6fe738110 100644 --- a/htdocs/projet/element.php +++ b/htdocs/projet/element.php @@ -378,10 +378,11 @@ $showdatefilter=0; // Show the filter on date on top of element list if (! $showdatefilter) { - print ''; + print '
'; + print ''; print ''; print ''; - print '
'.$langs->trans("Ref").''.$langs->trans("Ref").''; print $form->showrefnav($object, 'id', $linkback, 1, 'rowid', 'ref'); print '
'; + print '
'; print ''; @@ -393,7 +394,8 @@ if (! $showdatefilter) print ''; print '
'.$langs->trans("From").' '; print $form->select_date($dates,'dates',0,0,1,'',1,0,1); print '
'; print ''; - + print ''; + $showdatefilter++; } diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index ca27d42c995..59238e786f1 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -2205,7 +2205,7 @@ table.liste, table.noborder, table.formdoc, div.noborder { -webkit-border-radius: 0.2em; border-radius: 0.2em;*/ } -#tablelines tr.liste_titre td, form.formnoborder div, tr.liste_titre.trnoborder td { +#tablelines tr.liste_titre:first-child td, form.formnoborder div, tr.liste_titre.trnoborder td { border-top-width: 1px; border-top-color: rgb(); border-top-style: solid; diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 5cb3995c6ba..c45055a96f5 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -2075,7 +2075,7 @@ table.liste, table.noborder, table.formdoc, div.noborder { -webkit-border-radius: 0.1em; border-radius: 0.1em; } -#tablelines tr.liste_titre td, form.formnoborder, tr.liste_titre.trnoborder td { +#tablelines tr.liste_titre:first-child td, form.formnoborder, tr.liste_titre.trnoborder td { border-top-width: 1px; border-top-color: rgb(); border-top-style: solid;