Merge remote-tracking branch 'origin/3.6' into develop
Conflicts: .travis.yml htdocs/fichinter/fiche.php
This commit is contained in:
commit
ad4babb154
@ -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
|
||||
|
||||
|
||||
@ -78,4 +78,3 @@ if (!empty($_SESSION["CASHDESK_ID_WAREHOUSE"]) && ! empty($conf->stock->enabled)
|
||||
}
|
||||
print '</li></ul>';
|
||||
print '</div>';
|
||||
?>
|
||||
@ -153,4 +153,5 @@ echo '<tr><th class="nowrap">'.$langs->trans("TotalTTC").'</th><td class="nowrap
|
||||
<a class="lien" href="#"
|
||||
onclick="javascript: window.close(); return(false);"><?php echo $langs->trans("Close"); ?></a>
|
||||
|
||||
</body>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@ -229,5 +229,3 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
@ -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');
|
||||
}
|
||||
|
||||
?>
|
||||
@ -1301,7 +1301,8 @@ else if ($id > 0 || ! empty($ref))
|
||||
}
|
||||
}
|
||||
|
||||
print "</table>";
|
||||
print "</table><br>";
|
||||
|
||||
print '</form>';
|
||||
|
||||
if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB))
|
||||
|
||||
@ -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))
|
||||
{
|
||||
|
||||
@ -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');
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user