From 1e6a55745c0800841936f18088a0cae35eeed53b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 6 Mar 2018 11:54:05 +0100 Subject: [PATCH 1/8] CSS --- htdocs/admin/company.php | 25 +++++++++++++------ htdocs/comm/action/list.php | 6 ++--- htdocs/compta/facture/list.php | 8 +++--- htdocs/core/boxes/box_commandes.php | 2 +- htdocs/core/boxes/box_contracts.php | 2 +- htdocs/core/boxes/box_produits.php | 4 +-- .../core/boxes/box_produits_alerte_stock.php | 2 +- htdocs/core/boxes/box_propales.php | 4 +-- htdocs/core/boxes/box_services_contracts.php | 4 +-- htdocs/core/boxes/box_services_expired.php | 2 +- htdocs/core/boxes/modules_boxes.php | 2 +- htdocs/core/class/html.formcompany.class.php | 5 ++-- htdocs/core/class/html.formother.class.php | 10 +++++--- htdocs/core/tpl/contacts.tpl.php | 8 +++--- htdocs/theme/eldy/style.css.php | 4 ++- htdocs/theme/md/style.css.php | 2 ++ 16 files changed, 54 insertions(+), 36 deletions(-) diff --git a/htdocs/admin/company.php b/htdocs/admin/company.php index b2b7efc3a1c..1a0680363a9 100644 --- a/htdocs/admin/company.php +++ b/htdocs/admin/company.php @@ -313,10 +313,9 @@ if ($action == 'edit' || $action == 'updateedit') print '
'; print ''; print ''; - $var=true; print ''; - print ''."\n"; + print ''."\n"; // Name @@ -411,7 +410,6 @@ if ($action == 'edit' || $action == 'updateedit') // IDs of the company (country-specific) print '
'.$langs->trans("CompanyInfo").''.$langs->trans("Value").'
'.$langs->trans("CompanyInfo").''.$langs->trans("Value").'
'; print ''; - $var=true; $langs->load("companies"); @@ -697,11 +695,12 @@ else //print ''.$langs->trans("Modify").''; //print '
'; + print '
'; print '
'.$langs->trans("CompanyIds").''.$langs->trans("Value").'
'; print ''; - print ''; @@ -791,7 +790,7 @@ else print ''; print '
'.$langs->trans("CompanyInfo").''.$langs->trans("Value").'
'.$langs->trans("CompanyName").''; + print '
'.$langs->trans("CompanyName").''; if (! empty($conf->global->MAIN_INFO_SOCIETE_NOM)) print $conf->global->MAIN_INFO_SOCIETE_NOM; else print img_warning().' '.$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("CompanyName")).''; print '
'.$langs->trans("Note").'' . (! empty($conf->global->MAIN_INFO_SOCIETE_NOTE) ? nl2br($conf->global->MAIN_INFO_SOCIETE_NOTE) : '') . '
'; - + print ""; print '
'; @@ -799,8 +798,10 @@ else // IDs of the company (country-specific) print ''; print ''; + + print '
'; print ''; - print ''; + print ''; // Managing Director(s) @@ -956,12 +957,16 @@ else print ''; print '
'.$langs->trans("CompanyIds").''.$langs->trans("Value").'
'.$langs->trans("CompanyIds").''.$langs->trans("Value").'
'.$langs->trans("CompanyObject").'' . (! empty($conf->global->MAIN_INFO_SOCIETE_OBJECT) ? nl2br($conf->global->MAIN_INFO_SOCIETE_OBJECT) : '') . '
'; + print "
"; + print '
'; /* * fiscal year beginning */ print '
'; + + print '
'; print ''; print ''; print ''; @@ -973,11 +978,13 @@ else print dol_print_date(dol_mktime(12,0,0,$monthstart,1,2000,1),'%B','gm') . ''; print "
'.$langs->trans("FiscalYearInformation").''.$langs->trans("Value").'
"; + print "
"; /* * tax options */ print '
'; + print '
'; print ''; print ''; print ''; @@ -1005,7 +1012,7 @@ else print "\n"; print "
'.$langs->trans("VATManagement").''.$langs->trans("Description").'
"; - + print "
"; /* * Local Taxes @@ -1014,6 +1021,7 @@ else { // Local Tax 1 print '
'; + print '
'; print ''; print ''; print ''; @@ -1061,11 +1069,13 @@ else print "\n"; print "
'.$langs->transcountry("LocalTax1Management",$mysoc->country_code).''.$langs->trans("Description").'
"; + print "
"; } if ($mysoc->useLocalTax(2)) // True if we found at least on vat with a setup adding a localtax 1 { // Local Tax 2 print '
'; + print '
'; print ''; print ''; print ''; @@ -1113,6 +1123,7 @@ else print "\n"; print "
'.$langs->transcountry("LocalTax2Management",$mysoc->country_code).''.$langs->trans("Description").'
"; + print "
"; } diff --git a/htdocs/comm/action/list.php b/htdocs/comm/action/list.php index 33f9b86a1df..54da96d7be0 100644 --- a/htdocs/comm/action/list.php +++ b/htdocs/comm/action/list.php @@ -430,12 +430,12 @@ if ($resql) if (! empty($arrayfields['c.libelle']['checked'])) print ''; if (! empty($arrayfields['a.label']['checked'])) print ''; if (! empty($arrayfields['a.datep']['checked'])) { - print ''; + print ''; print $form->select_date($datestart, 'datestart', 0, 0, 1, '', 1, 0, 1); print ''; } if (! empty($arrayfields['a.datep2']['checked'])) { - print ''; + print ''; print $form->select_date($dateend, 'dateend', 0, 0, 1, '', 1, 0, 1); print ''; } @@ -517,8 +517,8 @@ if ($resql) print ''; + // Ref if (! empty($arrayfields['a.id']['checked'])) { - // Ref print ''; print $actionstatic->getNomUrl(1,-1); print ''; diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index 8d3f8971ef4..880a18d501a 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -701,19 +701,19 @@ if ($resql) // Date invoice if (! empty($arrayfields['f.date']['checked'])) { - print ''; + print ''; if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print ''; print ''; - $formother->select_year($year?$year:-1,'year',1, 20, 5); + $formother->select_year($year?$year:-1,'year',1, 20, 5, 0, 0, '', 'width75'); print ''; } // Date due if (! empty($arrayfields['f.date_lim_reglement']['checked'])) { - print ''; + print ''; if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print ''; print ''; - $formother->select_year($year_lim?$year_lim:-1,'year_lim',1, 20, 5); + $formother->select_year($year_lim?$year_lim:-1,'year_lim',1, 20, 5, 0, 0, '', 'width75'); print '
'.$langs->trans("Late"); print ''; } diff --git a/htdocs/core/boxes/box_commandes.php b/htdocs/core/boxes/box_commandes.php index 9e1e89d60fc..9bbde140dbe 100644 --- a/htdocs/core/boxes/box_commandes.php +++ b/htdocs/core/boxes/box_commandes.php @@ -136,7 +136,7 @@ class box_commandes extends ModeleBoxes ); $this->info_box_contents[$line][] = array( - 'td' => 'class="tdoverflowmax100"', + 'td' => 'class="tdoverflowmax150 maxwidth150onsmartphone"', 'text' => $societestatic->getNomUrl(1), 'asis' => 1, ); diff --git a/htdocs/core/boxes/box_contracts.php b/htdocs/core/boxes/box_contracts.php index 59db96b08aa..49d6df67d7f 100644 --- a/htdocs/core/boxes/box_contracts.php +++ b/htdocs/core/boxes/box_contracts.php @@ -128,7 +128,7 @@ class box_contracts extends ModeleBoxes ); $this->info_box_contents[$line][] = array( - 'td' => 'class="tdoverflowmax100 maxwidth100onsmartphone"', + 'td' => 'class="tdoverflowmax150 maxwidth150onsmartphone"', 'text' => $thirdpartytmp->getNomUrl(1), 'asis'=>1 ); diff --git a/htdocs/core/boxes/box_produits.php b/htdocs/core/boxes/box_produits.php index 3261572460e..53449afceeb 100644 --- a/htdocs/core/boxes/box_produits.php +++ b/htdocs/core/boxes/box_produits.php @@ -131,13 +131,13 @@ class box_produits extends ModeleBoxes $productstatic->entity = $objp->entity; $this->info_box_contents[$line][] = array( - 'td' => 'class="tdoverflowmax100 maxwidth100onsmartphone"', + 'td' => 'class="tdoverflowmax150 maxwidth150onsmartphone"', 'text' => $productstatic->getNomUrl(1), 'asis' => 1, ); $this->info_box_contents[$line][] = array( - 'td' => 'class="tdoverflowmax100 maxwidth100onsmartphone"', + 'td' => 'class="tdoverflowmax150 maxwidth150onsmartphone"', 'text' => $objp->label, ); diff --git a/htdocs/core/boxes/box_produits_alerte_stock.php b/htdocs/core/boxes/box_produits_alerte_stock.php index 9dc75612773..ee49e9e4534 100644 --- a/htdocs/core/boxes/box_produits_alerte_stock.php +++ b/htdocs/core/boxes/box_produits_alerte_stock.php @@ -144,7 +144,7 @@ class box_produits_alerte_stock extends ModeleBoxes ); $this->info_box_contents[$line][] = array( - 'td' => 'class="tdoverflowmax100 maxwidth100onsmartphone"', + 'td' => 'class="tdoverflowmax150 maxwidth150onsmartphone"', 'text' => $objp->label, ); diff --git a/htdocs/core/boxes/box_propales.php b/htdocs/core/boxes/box_propales.php index a94ee0c1f08..8dad41f64a1 100644 --- a/htdocs/core/boxes/box_propales.php +++ b/htdocs/core/boxes/box_propales.php @@ -131,13 +131,13 @@ class box_propales extends ModeleBoxes ); $this->info_box_contents[$line][] = array( - 'td' => 'class="tdoverflowmax100"', + 'td' => 'class="tdoverflowmax150 maxwidth150onsmartphone"', 'text' => $societestatic->getNomUrl(1), 'asis' => 1, ); $this->info_box_contents[$line][] = array( - 'td' => 'class="right"', + 'td' => 'class="right nowraponall"', 'text' => price($objp->total_ht, 0, $langs, 0, -1, -1, $conf->currency), ); diff --git a/htdocs/core/boxes/box_services_contracts.php b/htdocs/core/boxes/box_services_contracts.php index 0cc4e68682b..44a1ca020b5 100644 --- a/htdocs/core/boxes/box_services_contracts.php +++ b/htdocs/core/boxes/box_services_contracts.php @@ -177,7 +177,7 @@ class box_services_contracts extends ModeleBoxes } - $this->info_box_contents[$i][] = array('td' => 'class="tdoverflowmax100 maxwidth100onsmartphone"', + $this->info_box_contents[$i][] = array('td' => 'class="tdoverflowmax150 maxwidth150onsmartphone"', 'text' => $s, 'asis' => 1 ); @@ -187,7 +187,7 @@ class box_services_contracts extends ModeleBoxes 'asis' => 1 ); - $this->info_box_contents[$i][] = array('td' => 'class="tdoverflowmax100 maxwidth100onsmartphone"', + $this->info_box_contents[$i][] = array('td' => 'class="tdoverflowmax150 maxwidth150onsmartphone"', 'text' => $thirdpartytmp->getNomUrl(1), 'asis' => 1 ); diff --git a/htdocs/core/boxes/box_services_expired.php b/htdocs/core/boxes/box_services_expired.php index f123872b85b..72d4390a2e2 100644 --- a/htdocs/core/boxes/box_services_expired.php +++ b/htdocs/core/boxes/box_services_expired.php @@ -126,7 +126,7 @@ class box_services_expired extends ModeleBoxes 'asis' => 1 ); - $this->info_box_contents[$i][] = array('td' => 'class="tdoverflowmax100 maxwidth100onsmartphone" align="left"', + $this->info_box_contents[$i][] = array('td' => 'class="tdoverflowmax150 maxwidth150onsmartphone" align="left"', 'text' => $thirdpartytmp->getNomUrl(1, 'customer'), 'asis' => 1 ); diff --git a/htdocs/core/boxes/modules_boxes.php b/htdocs/core/boxes/modules_boxes.php index 025cfba71a5..74f0ffc9d9d 100644 --- a/htdocs/core/boxes/modules_boxes.php +++ b/htdocs/core/boxes/modules_boxes.php @@ -248,7 +248,7 @@ class ModeleBoxes // Can't be abtract as it is instantiated to build "empty" $out.= '>'; if ($conf->use_javascript_ajax) { - $out.= '
'; + $out.= ''; + if ($modecompta != 'BOOKKEEPING') print ''; + print ''; if ($annee != $year_end) print ''; } print ''; @@ -336,7 +334,9 @@ for ($mois = 1+$nb_mois_decalage ; $mois <= 12+$nb_mois_decalage ; $mois++) if ($cum[$case]) { $now_show_delta=1; // On a trouve le premier mois de la premiere annee generant du chiffre. - print ''.price($cum[$case],1).''; + if ($modecompta != 'BOOKKEEPING') print ''; + print price($cum[$case], 1); + if ($modecompta != 'BOOKKEEPING') print ''; } else { diff --git a/htdocs/langs/en_US/compta.lang b/htdocs/langs/en_US/compta.lang index 632ef67feb9..d1413fb0454 100644 --- a/htdocs/langs/en_US/compta.lang +++ b/htdocs/langs/en_US/compta.lang @@ -157,6 +157,7 @@ RulesResultDue=- It includes outstanding invoices, expenses, VAT, donations whet RulesResultInOut=- It includes the real payments made on invoices, expenses, VAT and salaries.
- It is based on the payment dates of the invoices, expenses, VAT and salaries. The donation date for donation. RulesCADue=- It includes the client's due invoices whether they are paid or not.
- It is based on the validation date of these invoices.
RulesCAIn=- It includes all the effective payments of invoices received from clients.
- It is based on the payment date of these invoices
+RulesCATotalSaleJournal=It includes all credit lines from the Sale journal. RulesAmountOnInOutBookkeepingRecord=It includes record in your Ledger with accounting accounts that has the group "EXPENSE" or "INCOME" RulesResultBookkeepingPredefined=It includes record in your Ledger with accounting accounts that has the group "EXPENSE" or "INCOME" RulesResultBookkeepingPersonalized=It show record in your Ledger with accounting accounts grouped by personalized groups From 23a4a609704b594a837acc05ee8414cd3372c415 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 6 Mar 2018 21:51:43 +0100 Subject: [PATCH 6/8] Fix status of task --- htdocs/core/lib/functions.lib.php | 26 ++++++++++++------ htdocs/langs/en_US/main.lang | 3 +++ htdocs/projet/class/task.class.php | 42 ++++++++++++++++-------------- htdocs/projet/tasks/contact.php | 2 +- htdocs/projet/tasks/document.php | 2 +- htdocs/projet/tasks/note.php | 2 +- htdocs/projet/tasks/task.php | 6 ++--- htdocs/projet/tasks/time.php | 8 ++++-- 8 files changed, 56 insertions(+), 35 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 99aa4ccc84f..9d824b98abe 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -1077,11 +1077,12 @@ function dol_syslog($message, $level = LOG_INFO, $ident = 0, $suffixinfilename=' * @param string $picto Add a picto on tab title * @param int $pictoisfullpath If 1, image path is a full path. If you set this to 1, you can use url returned by dol_buildpath('/mymodyle/img/myimg.png',1) for $picto. * @param string $morehtmlright Add more html content on right of tabs title + * @param string $morecss More Css * @return void */ -function dol_fiche_head($links=array(), $active='0', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='') +function dol_fiche_head($links=array(), $active='0', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='') { - print dol_get_fiche_head($links, $active, $title, $notab, $picto, $pictoisfullpath, $morehtmlright); + print dol_get_fiche_head($links, $active, $title, $notab, $picto, $pictoisfullpath, $morehtmlright, $morecss); } /** @@ -1094,9 +1095,10 @@ function dol_fiche_head($links=array(), $active='0', $title='', $notab=0, $picto * @param string $picto Add a picto on tab title * @param int $pictoisfullpath If 1, image path is a full path. If you set this to 1, you can use url returned by dol_buildpath('/mymodyle/img/myimg.png',1) for $picto. * @param string $morehtmlright Add more html content on right of tabs title + * @param string $morecss More Css * @return string */ -function dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='') +function dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='') { global $conf, $langs, $hookmanager; @@ -1161,7 +1163,7 @@ function dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $pi { if (!empty($links[$i][0])) { - $out.=''.$links[$i][1].''."\n"; + $out.=''.$links[$i][1].''."\n"; } else { @@ -1173,13 +1175,13 @@ function dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $pi //print "x $i $active ".$links[$i][2]." z"; if ($isactive) { - $out.=''; + $out.=''; $out.=$links[$i][1]; $out.=''."\n"; } else { - $out.=''; + $out.=''; $out.=$links[$i][1]; $out.=''."\n"; } @@ -1198,14 +1200,14 @@ function dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $pi if (isset($links[$i][2]) && $links[$i][2] == 'image') { if (!empty($links[$i][0])) - $outmore.=''.$links[$i][1].''."\n"; + $outmore.=''.$links[$i][1].''."\n"; else $outmore.=''.$links[$i][1].''."\n"; } else if (! empty($links[$i][1])) { - $outmore.=''; + $outmore.=''; $outmore.=preg_replace('/([a-z])\/([a-z])/i', '\\1 / \\2', $links[$i][1]); // Replace x/y with x / y to allow wrap on long composed texts. $outmore.=''."\n"; } @@ -1489,6 +1491,14 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r if ($object->frequency == 0) $morehtmlstatus.=$object->getLibStatut(2); else $morehtmlstatus.=$object->getLibStatut(5); } + elseif ($object->element == 'project_task') + { + $object->fk_statut = 1; + if ($object->progress > 0) $object->fk_statut = 2; + if ($object->progress >= 100) $object->fk_statut = 3; + $tmptxt=$object->getLibStatut(5); + $morehtmlstatus.=$tmptxt; // No status on task + } else { // Generic case $tmptxt=$object->getLibStatut(6); if (empty($tmptxt) || $tmptxt == $object->getLibStatut(3) || $conf->browser->layout=='phone') $tmptxt=$object->getLibStatut(5); diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index 19c7967e43a..6806e648823 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -429,6 +429,9 @@ ActionsOnCompany=Events about this third party ActionsOnMember=Events about this member ActionsOnProduct=Events about this product NActionsLate=%s late +ToDo=To do +Completed=Completed +Running=In progress RequestAlreadyDone=Request already recorded Filter=Filter FilterOnInto=Search criteria '%s' into fields %s diff --git a/htdocs/projet/class/task.class.php b/htdocs/projet/class/task.class.php index e694b3c7bfd..83de25b21ad 100644 --- a/htdocs/projet/class/task.class.php +++ b/htdocs/projet/class/task.class.php @@ -1695,7 +1695,7 @@ class Task extends CommonObject */ function getLibStatut($mode=0) { - return $this->LibStatut($this->fk_statut,$mode); + return $this->LibStatut($this->fk_statut, $mode); } /** @@ -1705,18 +1705,18 @@ class Task extends CommonObject * @param integer $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto * @return string Label */ - function LibStatut($statut,$mode=0) + function LibStatut($statut, $mode=0) { // list of Statut of the task $this->statuts[0]='Draft'; - $this->statuts[1]='Validated'; + $this->statuts[1]='ToDo'; $this->statuts[2]='Running'; $this->statuts[3]='Finish'; $this->statuts[4]='Transfered'; $this->statuts_short[0]='Draft'; - $this->statuts_short[1]='Validated'; + $this->statuts_short[1]='ToDo'; $this->statuts_short[2]='Running'; - $this->statuts_short[3]='Finish'; + $this->statuts_short[3]='Completed'; $this->statuts_short[4]='Transfered'; global $langs; @@ -1734,7 +1734,7 @@ class Task extends CommonObject if ($statut==0) return img_picto($langs->trans($this->statuts_short[$statut]),'statut0').' '.$langs->trans($this->statuts_short[$statut]); if ($statut==1) return img_picto($langs->trans($this->statuts_short[$statut]),'statut1').' '.$langs->trans($this->statuts_short[$statut]); if ($statut==2) return img_picto($langs->trans($this->statuts_short[$statut]),'statut3').' '.$langs->trans($this->statuts_short[$statut]); - if ($statut==3) return img_picto($langs->trans($this->statuts_short[$statut]),'statut4').' '.$langs->trans($this->statuts_short[$statut]); + if ($statut==3) return img_picto($langs->trans($this->statuts_short[$statut]),'statut6').' '.$langs->trans($this->statuts_short[$statut]); if ($statut==4) return img_picto($langs->trans($this->statuts_short[$statut]),'statut6').' '.$langs->trans($this->statuts_short[$statut]); if ($statut==5) return img_picto($langs->trans($this->statuts_short[$statut]),'statut5').' '.$langs->trans($this->statuts_short[$statut]); } @@ -1743,7 +1743,7 @@ class Task extends CommonObject if ($statut==0) return img_picto($langs->trans($this->statuts_short[$statut]),'statut0'); if ($statut==1) return img_picto($langs->trans($this->statuts_short[$statut]),'statut1'); if ($statut==2) return img_picto($langs->trans($this->statuts_short[$statut]),'statut3'); - if ($statut==3) return img_picto($langs->trans($this->statuts_short[$statut]),'statut4'); + if ($statut==3) return img_picto($langs->trans($this->statuts_short[$statut]),'statut6'); if ($statut==4) return img_picto($langs->trans($this->statuts_short[$statut]),'statut6'); if ($statut==5) return img_picto($langs->trans($this->statuts_short[$statut]),'statut5'); } @@ -1752,27 +1752,31 @@ class Task extends CommonObject if ($statut==0) return img_picto($langs->trans($this->statuts_short[$statut]),'statut0').' '.$langs->trans($this->statuts[$statut]); if ($statut==1) return img_picto($langs->trans($this->statuts_short[$statut]),'statut1').' '.$langs->trans($this->statuts[$statut]); if ($statut==2) return img_picto($langs->trans($this->statuts_short[$statut]),'statut3').' '.$langs->trans($this->statuts[$statut]); - if ($statut==3) return img_picto($langs->trans($this->statuts_short[$statut]),'statut4').' '.$langs->trans($this->statuts[$statut]); + if ($statut==3) return img_picto($langs->trans($this->statuts_short[$statut]),'statut6').' '.$langs->trans($this->statuts[$statut]); if ($statut==4) return img_picto($langs->trans($this->statuts_short[$statut]),'statut6').' '.$langs->trans($this->statuts[$statut]); if ($statut==5) return img_picto($langs->trans($this->statuts_short[$statut]),'statut5').' '.$langs->trans($this->statuts[$statut]); } if ($mode == 5) - { - if ($statut==0) return $langs->trans($this->statuts_short[$statut]).' '.img_picto($langs->trans($this->statuts_short[$statut]),'statut0'); - if ($statut==1) return $langs->trans($this->statuts_short[$statut]).' '.img_picto($langs->trans($this->statuts_short[$statut]),'statut1'); - if ($statut==2) return $langs->trans($this->statuts_short[$statut]).' '.img_picto($langs->trans($this->statuts_short[$statut]),'statut3'); - if ($statut==3) return $langs->trans($this->statuts_short[$statut]).' '.img_picto($langs->trans($this->statuts_short[$statut]),'statut4'); - if ($statut==4) return $langs->trans($this->statuts_short[$statut]).' '.img_picto($langs->trans($this->statuts_short[$statut]),'statut6'); - if ($statut==5) return $langs->trans($this->statuts_short[$statut]).' '.img_picto($langs->trans($this->statuts_short[$statut]),'statut5'); - } - if ($mode == 6) { /*if ($statut==0) return $langs->trans($this->statuts_short[$statut]).' '.img_picto($langs->trans($this->statuts_short[$statut]),'statut0'); if ($statut==1) return $langs->trans($this->statuts_short[$statut]).' '.img_picto($langs->trans($this->statuts_short[$statut]),'statut1'); if ($statut==2) return $langs->trans($this->statuts_short[$statut]).' '.img_picto($langs->trans($this->statuts_short[$statut]),'statut3'); - if ($statut==3) return $langs->trans($this->statuts_short[$statut]).' '.img_picto($langs->trans($this->statuts_short[$statut]),'statut4'); + if ($statut==3) return $langs->trans($this->statuts_short[$statut]).' '.img_picto($langs->trans($this->statuts_short[$statut]),'statut6'); if ($statut==4) return $langs->trans($this->statuts_short[$statut]).' '.img_picto($langs->trans($this->statuts_short[$statut]),'statut6'); - if ($statut==5) return $langs->trans($this->statuts_short[$statut]).' '.img_picto($langs->trans($this->statuts_short[$statut]),'statut5');*/ + if ($statut==5) return $langs->trans($this->statuts_short[$statut]).' '.img_picto($langs->trans($this->statuts_short[$statut]),'statut5'); + */ + //return $this->progress.' %'; + return ' '; + } + if ($mode == 6) + { + /*if ($statut==0) return $langs->trans($this->statuts[$statut]).' '.img_picto($langs->trans($this->statuts_short[$statut]),'statut0'); + if ($statut==1) return $langs->trans($this->statuts[$statut]).' '.img_picto($langs->trans($this->statuts_short[$statut]),'statut1'); + if ($statut==2) return $langs->trans($this->statuts[$statut]).' '.img_picto($langs->trans($this->statuts_short[$statut]),'statut3'); + if ($statut==3) return $langs->trans($this->statuts[$statut]).' '.img_picto($langs->trans($this->statuts_short[$statut]),'statut6'); + if ($statut==4) return $langs->trans($this->statuts[$statut]).' '.img_picto($langs->trans($this->statuts_short[$statut]),'statut6'); + if ($statut==5) return $langs->trans($this->statuts[$statut]).' '.img_picto($langs->trans($this->statuts_short[$statut]),'statut5'); + */ //return $this->progress.' %'; return ' '; } diff --git a/htdocs/projet/tasks/contact.php b/htdocs/projet/tasks/contact.php index a2bb784c062..a2db82fc0ed 100644 --- a/htdocs/projet/tasks/contact.php +++ b/htdocs/projet/tasks/contact.php @@ -285,7 +285,7 @@ if ($id > 0 || ! empty($ref)) //$arrayofuseridoftask=$object->getListContactId('internal'); $head = task_prepare_head($object); - dol_fiche_head($head, 'task_contact', $langs->trans("Task"), -1, 'projecttask'); + dol_fiche_head($head, 'task_contact', $langs->trans("Task"), -1, 'projecttask', 0, '', 'reposition'); $param=(GETPOST('withproject')?'&withproject=1':''); diff --git a/htdocs/projet/tasks/document.php b/htdocs/projet/tasks/document.php index 7fc0b981902..1cb5acb73b5 100644 --- a/htdocs/projet/tasks/document.php +++ b/htdocs/projet/tasks/document.php @@ -224,7 +224,7 @@ if ($object->id > 0) } $head = task_prepare_head($object); - dol_fiche_head($head, 'task_document', $langs->trans("Task"), -1, 'projecttask'); + dol_fiche_head($head, 'task_document', $langs->trans("Task"), -1, 'projecttask', 0, '', 'reposition'); // Files list constructor $filearray=dol_dir_list($upload_dir,"files",0,'','(\.meta|_preview.*\.png)$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1); diff --git a/htdocs/projet/tasks/note.php b/htdocs/projet/tasks/note.php index da33b8b7607..f915aaf836a 100644 --- a/htdocs/projet/tasks/note.php +++ b/htdocs/projet/tasks/note.php @@ -202,7 +202,7 @@ if ($object->id > 0) } $head = task_prepare_head($object); - dol_fiche_head($head, 'task_notes', $langs->trans('Task'), -1, 'projecttask'); + dol_fiche_head($head, 'task_notes', $langs->trans('Task'), -1, 'projecttask', 0, '', 'reposition'); $param=(GETPOST('withproject')?'&withproject=1':''); diff --git a/htdocs/projet/tasks/task.php b/htdocs/projet/tasks/task.php index e115c51d635..10b7c35ea41 100644 --- a/htdocs/projet/tasks/task.php +++ b/htdocs/projet/tasks/task.php @@ -221,7 +221,7 @@ if ($id > 0 || ! empty($ref)) // Tabs for project $tab='tasks'; $head=project_prepare_head($projectstatic); - dol_fiche_head($head, $tab, $langs->trans("Project"), -1, ($projectstatic->public?'projectpub':'project')); + dol_fiche_head($head, $tab, $langs->trans("Project"), -1, ($projectstatic->public?'projectpub':'project'), 0, '', ''); $param=($mode=='mine'?'&mode=mine':''); @@ -352,7 +352,7 @@ if ($id > 0 || ! empty($ref)) print ''; print ''; - dol_fiche_head($head, 'task_task', $langs->trans("Task"),0,'projecttask'); + dol_fiche_head($head, 'task_task', $langs->trans("Task"), 0, 'projecttask', 0, '', ''); print '
'; } if (! empty($head['text'])) { diff --git a/htdocs/core/class/html.formcompany.class.php b/htdocs/core/class/html.formcompany.class.php index c434202ba2e..fbf77080de2 100644 --- a/htdocs/core/class/html.formcompany.class.php +++ b/htdocs/core/class/html.formcompany.class.php @@ -545,9 +545,10 @@ class FormCompany * @param array $limitto Disable answers that are not id in this array list * @param int $forceid This is to force another object id than object->id * @param string $moreparam String with more param to add into url when noajax search is used. + * @param string $morecss More CSS on select component * @return int The selected third party ID */ - function selectCompaniesForNewContact($object, $var_id, $selected='', $htmlname='newcompany', $limitto='', $forceid=0, $moreparam='') + function selectCompaniesForNewContact($object, $var_id, $selected='', $htmlname='newcompany', $limitto='', $forceid=0, $moreparam='', $morecss='') { global $conf, $langs; @@ -649,7 +650,7 @@ class FormCompany $resql = $this->db->query($sql); if ($resql) { - print ''; + $out.= ''; else print ''; - print ''; + if ($modecompta != 'BOOKKEEPING') print ''; print $annee; if ($conf->global->SOCIETE_FISCAL_MONTH_START > 1) print '-'.($annee+1); - print ' 
'; @@ -437,7 +437,7 @@ if ($id > 0 || ! empty($ref)) $param=($withproject?'&withproject=1':''); $linkback=$withproject?''.$langs->trans("BackToList").'':''; - dol_fiche_head($head, 'task_task', $langs->trans("Task"), -1, 'projecttask'); + dol_fiche_head($head, 'task_task', $langs->trans("Task"), -1, 'projecttask', 0, '', 'reposition'); if ($action == 'delete') { diff --git a/htdocs/projet/tasks/time.php b/htdocs/projet/tasks/time.php index 73e9f5ec311..cbfdc48eae9 100644 --- a/htdocs/projet/tasks/time.php +++ b/htdocs/projet/tasks/time.php @@ -434,7 +434,7 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0) if (empty($projectidforalltimes)) { $head=task_prepare_head($object); - dol_fiche_head($head, 'task_time', $langs->trans("Task"), -1, 'projecttask'); + dol_fiche_head($head, 'task_time', $langs->trans("Task"), -1, 'projecttask', 0, '', 'reposition'); if ($action == 'deleteline') { @@ -541,6 +541,7 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0) print ''; print ''; + print '
'; print '
'; print ''; @@ -595,7 +596,10 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0) print ''; print ''; - print '
'; + print '
'; + print ''; + + print ''; print '
'; } From f3fd5f4cfaedaf88710ffca243157984119434e9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 7 Mar 2018 11:03:35 +0100 Subject: [PATCH 7/8] FIX Label of event show twice --- htdocs/comm/action/index.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index efdad6a3738..a28f01481b7 100644 --- a/htdocs/comm/action/index.php +++ b/htdocs/comm/action/index.php @@ -1475,10 +1475,12 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa if ($event->type_code == 'ICALEVENT') print $titletoshow; else { - $savlabel=$event->libelle; - $event->libelle=$titletoshow; - print $event->getNomUrl(0,$maxnbofchar,'cal_event','',0,1); - $event->libelle=$savlabel; + $savlabel=$event->label?$event->label:$event->libelle; + $event->label=$titletoshow; + $event->libelle=$titletoshow; + print $event->getNomUrl(0,$maxnbofchar,'cal_event','',0,1); + $event->label=$savlabel; + $event->libelle=$savlabel; } // Loop on each assigned user From a0a9e121788f53aca8fcdfbc5c938d59f08bcfb7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 7 Mar 2018 11:29:50 +0100 Subject: [PATCH 8/8] Fix css --- htdocs/comm/action/index.php | 2 +- htdocs/theme/eldy/style.css.php | 11 ++++++----- htdocs/theme/md/style.css.php | 11 ++++++----- htdocs/user/class/user.class.php | 6 +++--- 4 files changed, 16 insertions(+), 14 deletions(-) diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index a28f01481b7..2c28f85f887 100644 --- a/htdocs/comm/action/index.php +++ b/htdocs/comm/action/index.php @@ -1497,7 +1497,7 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa $cacheusers[$tmpid]=$newuser; } - $listofusertoshow.=$cacheusers[$tmpid]->getNomUrl(-3, '', 0, 0, 0, 0, '', 'valigntextbottom'); + $listofusertoshow.=$cacheusers[$tmpid]->getNomUrl(-3, '', 0, 0, 0, 0, '', 'paddingright valigntextbottom'); } print $listofusertoshow; diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index f03d92ce24f..8d0936d7d80 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -1896,7 +1896,7 @@ img.login, img.printer, img.entity { color: white; font-weight: bold; } -.userimgatoplogin img.userphoto { /* size for user photo in login bar */ +.userimg.atoplogin img.userphoto, .userimgatoplogin img.userphoto { /* size for user photo in login bar */ width: 16px; height: 16px; border-radius: 8px; @@ -3617,10 +3617,11 @@ table.cal_event { border: none; border-collapse: collapse; margin-bottom: 1px table.cal_event td { border: none; padding-: 2px; padding-: 2px; padding-top: 0px; padding-bottom: 0px; } table.cal_event td.cal_event { padding: 4px 4px !important; } table.cal_event td.cal_event_right { padding: 4px 4px !important; } -.cal_event a:link { color: #111111; font-size: 11px; font-weight: normal !important; } -.cal_event a:visited { color: #111111; font-size: 11px; font-weight: normal !important; } -.cal_event a:active { color: #111111; font-size: 11px; font-weight: normal !important; } -.cal_event_busy a:hover { color: #111111; font-size: 11px; font-weight: normal !important; color:rgba(255,255,255,.75); } +.cal_event { font-size: 12px; } +.cal_event a:link { color: #111111; font-weight: normal !important; } +.cal_event a:visited { color: #111111; font-weight: normal !important; } +.cal_event a:active { color: #111111; font-weight: normal !important; } +.cal_event_busy a:hover { color: #111111; font-weight: normal !important; color:rgba(255,255,255,.75); } .cal_event_busy { } .cal_peruserviewname { max-width: 140px; height: 22px; } diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index aafdd58f59c..b27cf3e5034 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -1918,7 +1918,7 @@ img.login, img.printer, img.entity { color: white; font-weight: bold; } -.userimgatoplogin img.userphoto { /* size for user photo in login bar */ +.userimg.atoplogin img.userphoto, .userimgatoplogin img.userphoto { /* size for user photo in login bar */ border-radius: 8px; width: 16px; height: 16px; @@ -3667,10 +3667,11 @@ table.cal_event { border: none; border-collapse: collapse; margin-bottom: 1px table.cal_event td { border: none; padding-: 2px; padding-: 2px; padding-top: 0px; padding-bottom: 0px; } table.cal_event td.cal_event { padding: 4px 4px !important; } table.cal_event td.cal_event_right { padding: 4px 4px !important; } -.cal_event a:link { color: #111111; font-size: 11px; font-weight: normal !important; } -.cal_event a:visited { color: #111111; font-size: 11px; font-weight: normal !important; } -.cal_event a:active { color: #111111; font-size: 11px; font-weight: normal !important; } -.cal_event_busy a:hover { color: #111111; font-size: 11px; font-weight: normal !important; color:rgba(255,255,255,.75); } +.cal_event { font-size: 12px; } +.cal_event a:link { color: #111111; font-weight: normal !important; } +.cal_event a:visited { color: #111111; font-weight: normal !important; } +.cal_event a:active { color: #111111; font-weight: normal !important; } +.cal_event_busy a:hover { color: #111111; font-weight: normal !important; color:rgba(255,255,255,.75); } .cal_event_busy { } .cal_peruserviewname { max-width: 140px; height: 22px; } diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index 6a2a1b774e7..386b814da6f 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -2224,14 +2224,14 @@ class User extends CommonObject $paddafterimage=''; if (abs($withpictoimg) == 1) $paddafterimage='style="margin-right: 3px;"'; // Only picto - if ($withpictoimg > 0) $picto='
'.img_object('', 'user', $paddafterimage.' '.($notooltip?'':'class="classfortooltip"'), 0, 0, $notooltip?0:1).'
'; + if ($withpictoimg > 0) $picto='
'.img_object('', 'user', $paddafterimage.' '.($notooltip?'':'class="classfortooltip"'), 0, 0, $notooltip?0:1).'
'; // Picto must be a photo - else $picto='
'.Form::showphoto('userphoto', $this, 0, 0, 0, 'userphoto'.($withpictoimg==-3?'small':''), 'mini', 0, 1).'
'; + else $picto='
'.Form::showphoto('userphoto', $this, 0, 0, 0, 'userphoto'.($withpictoimg==-3?'small':''), 'mini', 0, 1).'
'; $result.=$picto; } if ($withpictoimg > -2 && $withpictoimg != 2) { - if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) $result.='
'; + if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) $result.='
'; if ($mode == 'login') $result.=dol_trunc($this->login, $maxlen); else $result.=$this->getFullName($langs,'',($mode == 'firstname' ? 2 : -1),$maxlen); if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) $result.='
';