clean code
This commit is contained in:
parent
a224d7c824
commit
1b9f8d46b0
@ -2319,33 +2319,21 @@ class Adherent extends CommonObject
|
||||
}
|
||||
|
||||
$result = '';
|
||||
$label = '';
|
||||
$linkstart = '';
|
||||
$linkend = '';
|
||||
|
||||
if (!empty($this->photo)) {
|
||||
$label .= '<div class="photointooltip floatright">';
|
||||
$label .= Form::showphoto('memberphoto', $this, 80, 0, 0, 'photoref photowithmargin photologintooltip', 'small', 0, 1);
|
||||
$label .= '</div>';
|
||||
//$label .= '<div style="clear: both;"></div>';
|
||||
$classfortooltip = 'classfortooltip';
|
||||
$dataparams = '';
|
||||
$params = [
|
||||
'id' => $this->id,
|
||||
'objecttype' => $this->element,
|
||||
'option' => $option,
|
||||
];
|
||||
if (getDolGlobalInt('MAIN_ENABLE_AJAX_TOOLTIP')) {
|
||||
$classfortooltip = 'classforajaxtooltip';
|
||||
$dataparams = ' data-params='.json_encode($params);
|
||||
// $label = $langs->trans('Loading');
|
||||
}
|
||||
|
||||
$label .= '<div class="centpercent">';
|
||||
$label .= img_picto('', $this->picto).' <u class="paddingrightonly">'.$langs->trans("Member").'</u>';
|
||||
$label .= ' '.$this->getLibStatut(4);
|
||||
if (!empty($this->ref)) {
|
||||
$label .= '<br><b>'.$langs->trans('Ref').':</b> '.$this->ref;
|
||||
}
|
||||
if (!empty($this->login)) {
|
||||
$label .= '<br><b>'.$langs->trans('Login').':</b> '.$this->login;
|
||||
}
|
||||
if (!empty($this->firstname) || !empty($this->lastname)) {
|
||||
$label .= '<br><b>'.$langs->trans('Name').':</b> '.$this->getFullName($langs);
|
||||
}
|
||||
if (!empty($this->company)) {
|
||||
$label .= '<br><b>'.$langs->trans('Company').':</b> '.$this->company;
|
||||
}
|
||||
$label .= '</div>';
|
||||
$label = implode($this->getTooltipContentArray($params));
|
||||
|
||||
$url = DOL_URL_ROOT.'/adherents/card.php?rowid='.((int) $this->id);
|
||||
if ($option == 'subscription') {
|
||||
@ -2365,18 +2353,6 @@ class Adherent extends CommonObject
|
||||
|
||||
$linkstart .= '<a href="'.$url.'"';
|
||||
$linkclose = "";
|
||||
$classfortooltip = 'classfortooltip';
|
||||
$dataparams = '';
|
||||
if (getDolGlobalInt('MAIN_ENABLE_AJAX_TOOLTIP')) {
|
||||
$params = [
|
||||
'id' => $this->id,
|
||||
'objecttype' => $this->element,
|
||||
'option' => $option,
|
||||
];
|
||||
$classfortooltip = 'classforajaxtooltip';
|
||||
$dataparams = ' data-params='.json_encode($params);
|
||||
// $label = $langs->trans('Loading');
|
||||
}
|
||||
if (empty($notooltip)) {
|
||||
if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) {
|
||||
$langs->load("users");
|
||||
|
||||
@ -724,29 +724,24 @@ class AdherentType extends CommonObject
|
||||
global $langs;
|
||||
|
||||
$result = '';
|
||||
|
||||
$label = img_picto('', $this->picto).' <u class="paddingrightonly">'.$langs->trans("MemberType").'</u>';
|
||||
$label .= ' '.$this->getLibStatut(4);
|
||||
$label .= '<br>'.$langs->trans("Label").': '.$this->label;
|
||||
if (isset($this->subscription)) {
|
||||
$label .= '<br>'.$langs->trans("SubscriptionRequired").': '.yn($this->subscription);
|
||||
}
|
||||
|
||||
$option = '';
|
||||
|
||||
$url = DOL_URL_ROOT.'/adherents/type.php?rowid='.((int) $this->id);
|
||||
$classfortooltip = 'classfortooltip';
|
||||
$dataparams = '';
|
||||
$params = [
|
||||
'id' => $this->id,
|
||||
'objecttype' => $this->element,
|
||||
'option' => $option,
|
||||
];
|
||||
if (getDolGlobalInt('MAIN_ENABLE_AJAX_TOOLTIP')) {
|
||||
$params = [
|
||||
'id' => $this->id,
|
||||
'objecttype' => $this->element,
|
||||
'option' => $option,
|
||||
];
|
||||
$classfortooltip = 'classforajaxtooltip';
|
||||
$dataparams = ' data-params='.json_encode($params);
|
||||
$label = $langs->trans('Loading');
|
||||
// $label = $langs->trans('Loading');
|
||||
}
|
||||
|
||||
$label = implode($this->getTooltipContentArray($params));
|
||||
|
||||
$url = DOL_URL_ROOT.'/adherents/type.php?rowid='.((int) $this->id);
|
||||
if ($option != 'nolink') {
|
||||
// Add param to save lastsearch_values or not
|
||||
$add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user