diff --git a/.travis.yml b/.travis.yml index 24862950d7b..85b0342670c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -100,7 +100,7 @@ script: # - phpunit -d memory_limit=-1 --configuration test/phpunit/phpunittest.xml --coverage-text test/phpunit/BuildDocTest.php # - phpunit -d memory_limit=-1 --configuration test/phpunit/phpunittest.xml test/phpunit/WebservicesOtherTest.php # - phpcs -p --warning-severity=0 -s --report-checkstyle --report-summary --standard=dev/codesniffer/ruleset.xml --tab-width=4 --ignore=/build/html/,/documents/,/includes/,/test/report/ htdocs/core/class/dolgraph.class.php - - phpcs -p --extensions=php --warning-severity=0 -s --report-checkstyle --report-summary --standard=dev/codesniffer/ruleset.xml --tab-width=4 --ignore=/build/html/,/documents/,/includes/,/test/report/ . 2>&1 + - phpcs -p --warning-severity=0 -s --report-checkstyle --report-summary --standard=dev/codesniffer/ruleset.xml --tab-width=4 --ignore=/build/html/,/documents/,/includes/,/test/report/ . 2>&1 # - phpcs -p --warning-severity=0 -s --report-summary --standard=dev/codesniffer/ruleset.xml --tab-width=4 --ignore=/build/html/,/documents/,/includes/,/test/report/ . - phpunit -d memory_limit=-1 --configuration test/phpunit/phpunittest.xml test/phpunit/AllTests.php diff --git a/htdocs/cashdesk/tpl/menu.tpl.php b/htdocs/cashdesk/tpl/menu.tpl.php index 59800fb57c1..4ee52ce0da6 100644 --- a/htdocs/cashdesk/tpl/menu.tpl.php +++ b/htdocs/cashdesk/tpl/menu.tpl.php @@ -78,4 +78,3 @@ if (!empty($_SESSION["CASHDESK_ID_WAREHOUSE"]) && ! empty($conf->stock->enabled) } print ''; print ''; -?> \ No newline at end of file diff --git a/htdocs/cashdesk/tpl/ticket.tpl.php b/htdocs/cashdesk/tpl/ticket.tpl.php index 54e82c3ded7..9ea8cb70943 100644 --- a/htdocs/cashdesk/tpl/ticket.tpl.php +++ b/htdocs/cashdesk/tpl/ticket.tpl.php @@ -153,4 +153,5 @@ echo ''.$langs->trans("TotalTTC").'trans("Close"); ?> - \ No newline at end of file + + diff --git a/htdocs/core/actions_sendmails.inc.php b/htdocs/core/actions_sendmails.inc.php index f13113487c1..3af164abfab 100644 --- a/htdocs/core/actions_sendmails.inc.php +++ b/htdocs/core/actions_sendmails.inc.php @@ -229,5 +229,3 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO } } - -?> \ No newline at end of file diff --git a/htdocs/core/actions_setnotes.inc.php b/htdocs/core/actions_setnotes.inc.php index 3b2bbef75bb..74f576cf852 100644 --- a/htdocs/core/actions_setnotes.inc.php +++ b/htdocs/core/actions_setnotes.inc.php @@ -43,5 +43,3 @@ else if ($action == 'setnote_private' && ! empty($permissionnote) && ! GETPOST(' $result=$object->update_note(dol_html_entity_decode(GETPOST('note_private'), ENT_QUOTES),'_private'); if ($result < 0) setEventMessage($object->error,'errors'); } - -?> \ No newline at end of file diff --git a/htdocs/fichinter/fiche.php b/htdocs/fichinter/fiche.php index 1ef819ae349..1c69741b6a8 100644 --- a/htdocs/fichinter/fiche.php +++ b/htdocs/fichinter/fiche.php @@ -1301,7 +1301,8 @@ else if ($id > 0 || ! empty($ref)) } } - print ""; + print "
"; + print ''; if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB)) diff --git a/htdocs/product/fiche.php b/htdocs/product/fiche.php index 9d71e9cdc4c..2473c0cbd46 100644 --- a/htdocs/product/fiche.php +++ b/htdocs/product/fiche.php @@ -1014,8 +1014,6 @@ else else if ($object->id > 0) { - $res=$object->fetch_optionals($object->id,$extralabels); - // Fiche en mode edition if ($action == 'edit' && ($user->rights->produit->creer || $user->rights->service->creer)) { diff --git a/htdocs/projet/class/task.class.php b/htdocs/projet/class/task.class.php index c5b75d2aaff..e610ab18dc6 100644 --- a/htdocs/projet/class/task.class.php +++ b/htdocs/projet/class/task.class.php @@ -1230,4 +1230,83 @@ class Task extends CommonObject } } + + /** + * \brief Return status label of object + * \param 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 getLibStatut($mode=0) + { + return $this->LibStatut($this->fk_statut,$mode); + } + + /** + * \brief Renvoi status label for a status + * \param statut id statut + * \param 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) + { + // list of Statut of the task + $this->statuts[0]='Draft'; + $this->statuts[1]='Validated'; + $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[2]='Running'; + $this->statuts_short[3]='Finish'; + $this->statuts_short[4]='Transfered'; + + global $langs; + + if ($mode == 0) + { + return $langs->trans($this->statuts[$statut]); + } + if ($mode == 1) + { + return $langs->trans($this->statuts_short[$statut]); + } + if ($mode == 2) + { + 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==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]); + } + if ($mode == 3) + { + 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==4) return img_picto($langs->trans($this->statuts_short[$statut]),'statut6'); + if ($statut==5) return img_picto($langs->trans($this->statuts_short[$statut]),'statut5'); + } + if ($mode == 4) + { + 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==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'); + } + } + }