diff --git a/htdocs/compta/facture/prelevement.php b/htdocs/compta/facture/prelevement.php index 2ba9e775687..1fa2749190d 100644 --- a/htdocs/compta/facture/prelevement.php +++ b/htdocs/compta/facture/prelevement.php @@ -226,7 +226,7 @@ if ($object->id > 0) print '
'; print '
'; - print ''; + print '
'; // Type print '
'.$langs->trans('Type').''; @@ -282,7 +282,7 @@ if ($object->id > 0) // Date invoice print '
'; - print '
'; + print ''; if ($object->type != Facture::TYPE_CREDIT_NOTE && $action != 'editinvoicedate' && !empty($object->brouillon) && $user->rights->facture->creer) print ''; @@ -309,7 +309,7 @@ if ($object->id > 0) // Payment condition print '
'; print $langs->trans('DateInvoice'); print 'id.'">'.img_edit($langs->trans('SetDate'), 1).'
'; - print '
'; + print ''; if ($object->type != Facture::TYPE_CREDIT_NOTE && $action != 'editconditions' && !empty($object->brouillon) && $user->rights->facture->creer) print ''; @@ -334,7 +334,7 @@ if ($object->id > 0) // Date payment term print '
'; print $langs->trans('PaymentConditionsShort'); print 'id.'">'.img_edit($langs->trans('SetConditions'), 1).'
'; - print '
'; + print ''; if ($object->type != Facture::TYPE_CREDIT_NOTE && $action != 'editpaymentterm' && !empty($object->brouillon) && $user->rights->facture->creer) print ''; @@ -362,7 +362,7 @@ if ($object->id > 0) // Payment mode print '
'; print $langs->trans('DateMaxPayment'); print 'id.'">'.img_edit($langs->trans('SetDate'), 1).'
'; - print '
'; + print ''; if ($action != 'editmode' && !empty($object->brouillon) && $user->rights->facture->creer) print ''; @@ -409,7 +409,7 @@ if ($object->id > 0) print '
'; print '
'; - print '
'; print $langs->trans('PaymentMode'); print 'id.'">'.img_edit($langs->trans('SetMode'), 1).'
'; + print '
'; if (!empty($conf->multicurrency->enabled) && ($object->multicurrency_code != $conf->currency)) { diff --git a/htdocs/resource/card.php b/htdocs/resource/card.php index 975dd564a31..152a572a737 100644 --- a/htdocs/resource/card.php +++ b/htdocs/resource/card.php @@ -306,7 +306,7 @@ if ($action == 'create' || $object->fetch($id, $ref) > 0) print $formconfirm; - $linkback = ''.$langs->trans("BackToList").''; + $linkback = ''.$langs->trans("BackToList").''; $morehtmlref = '
'; diff --git a/htdocs/resource/class/dolresource.class.php b/htdocs/resource/class/dolresource.class.php index 2b3b0613092..7e2f11e1bf5 100644 --- a/htdocs/resource/class/dolresource.class.php +++ b/htdocs/resource/class/dolresource.class.php @@ -938,29 +938,58 @@ class Dolresource extends CommonObject /** * Return clicable link of object (with eventually picto) * - * @param int $withpicto Add picto into link - * @param string $option Where point the link ('compta', 'expedition', 'document', ...) - * @param string $get_params Parametres added to url - * @param int $notooltip 1=Disable tooltip - * @return string String with URL + * @param int $withpicto Add picto into link + * @param string $option Where point the link ('compta', 'expedition', 'document', ...) + * @param string $get_params Parametres added to url + * @param int $notooltip 1=Disable tooltip + * @param string $morecss Add more css on link + * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking + * @return string String with URL */ - public function getNomUrl($withpicto = 0, $option = '', $get_params = '', $notooltip = 0) + public function getNomUrl($withpicto = 0, $option = '', $get_params = '', $notooltip = 0, $morecss = '', $save_lastsearch_value = -1) { global $langs; $result = ''; - $label = $langs->trans("ShowResource").': '.$this->ref; - - $linkstart = ''; - $linkend = ''; - if ($option == '') - { - $linkstart = ''; - $picto = 'resource'; - $label = $langs->trans("ShowResource").': '.$this->ref; - $linkend = ''; + $label = ''.$langs->trans("ShowResource").''; + $label .= '
'; + $label .= ''.$langs->trans('Ref').': '.$this->ref; + /*if (isset($this->status)) { + $label.= '
' . $langs->trans("Status").": ".$this->getLibStatut(5); + }*/ + if (isset($this->type_label)) { + $label.= '
' . $langs->trans("ResourceType").": ".$this->type_label; } + $url = DOL_URL_ROOT.'/resource/card.php?id='.$this->id; + + if ($option != 'nolink') + { + // Add param to save lastsearch_values or not + $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); + if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) $add_save_lastsearch_values = 1; + if ($add_save_lastsearch_values) $url .= '&save_lastsearch_values=1'; + } + + $linkclose = ''; + if (empty($notooltip)) + { + if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) + { + $label = $langs->trans("ShowMyObject"); + $linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"'; + } + $linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"'; + $linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"'; + } + else $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); + + $linkstart = ''; + $linkend = ''; + /*$linkstart = ''; + $linkend = '';*/ + $result .= $linkstart; if ($withpicto) $result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1); if ($withpicto != 2) $result .= $this->ref;