Fix: Label
This commit is contained in:
parent
881d338fca
commit
866b2a7a88
@ -854,7 +854,7 @@ class ActionComm extends CommonObject
|
||||
|
||||
/**
|
||||
* Return URL of event
|
||||
* Use $this->id, $this->type_code and $this->label
|
||||
* Use $this->id, $this->type_code, $this->label and $this->type_label
|
||||
*
|
||||
* @param int $withpicto 0=Pas de picto, 1=Inclut le picto dans le lien, 2=Picto seul
|
||||
* @param int $maxlength Nombre de caracteres max dans libelle
|
||||
@ -884,15 +884,15 @@ class ActionComm extends CommonObject
|
||||
else
|
||||
{
|
||||
$libelle=(empty($this->libelle)?$label:$this->libelle.(($label && $label != $this->libelle)?' '.$label:''));
|
||||
if (! empty($conf->global->AGENDA_USE_EVENT_TYPE) && empty($libelle)) $libelle=$langs->transnoentities("Action".$this->type_code);
|
||||
if (! empty($conf->global->AGENDA_USE_EVENT_TYPE) && empty($libelle)) $libelle=($langs->transnoentities("Action".$this->type_code) != "Action".$this->type_code)?$langs->transnoentities("Action".$this->type_code):$this->type_label;
|
||||
$libelleshort=dol_trunc($libelle,$maxlength);
|
||||
}
|
||||
|
||||
if ($withpicto)
|
||||
{
|
||||
if (! empty($conf->global->AGENDA_USE_EVENT_TYPE))
|
||||
if (! empty($conf->global->AGENDA_USE_EVENT_TYPE)) // Add code into ()
|
||||
{
|
||||
$libelle.=(($this->type_code && $libelle!=$langs->trans("Action".$this->type_code) && $langs->trans("Action".$this->type_code)!="Action".$this->type_code)?' ('.$langs->trans("Action".$this->type_code).')':'');
|
||||
$libelle.=(($this->type_code && $libelle!=$langs->transnoentities("Action".$this->type_code) && $langs->transnoentities("Action".$this->type_code)!="Action".$this->type_code)?' ('.$langs->transnoentities("Action".$this->type_code).')':'');
|
||||
}
|
||||
$result.=$lien.img_object($langs->trans("ShowAction").': '.$libelle,($overwritepicto?$overwritepicto:'action')).$lienfin;
|
||||
}
|
||||
|
||||
@ -414,7 +414,7 @@ $sql.= ' a.percent,';
|
||||
$sql.= ' a.fk_user_author,a.fk_user_action,a.fk_user_done,';
|
||||
$sql.= ' a.transparency, a.priority, a.fulldayevent, a.location,';
|
||||
$sql.= ' a.fk_soc, a.fk_contact,';
|
||||
$sql.= ' ca.code';
|
||||
$sql.= ' ca.code, ca.libelle as type_label';
|
||||
$sql.= ' FROM '.MAIN_DB_PREFIX.'c_actioncomm as ca, '.MAIN_DB_PREFIX."actioncomm as a";
|
||||
if (! $user->rights->societe->client->voir && ! $socid) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON a.fk_soc = sc.fk_soc";
|
||||
if ($usergroup > 0) $sql.= ", ".MAIN_DB_PREFIX."usergroup_user as ugu";
|
||||
@ -496,6 +496,7 @@ if ($resql)
|
||||
$event->datep=$db->jdate($obj->datep); // datep and datef are GMT date
|
||||
$event->datef=$db->jdate($obj->datep2);
|
||||
$event->type_code=$obj->code;
|
||||
$event->type_label=$obj->type_label;
|
||||
$event->libelle=$obj->label;
|
||||
$event->percentage=$obj->percent;
|
||||
$event->authorid=$obj->fk_user_author; // user id of creator
|
||||
|
||||
Loading…
Reference in New Issue
Block a user