diff --git a/htdocs/adherents/class/subscription.class.php b/htdocs/adherents/class/subscription.class.php index 7b8f453c94c..29f1f94e683 100644 --- a/htdocs/adherents/class/subscription.class.php +++ b/htdocs/adherents/class/subscription.class.php @@ -337,11 +337,14 @@ class Subscription extends CommonObject /** * Return clicable name (with picto eventually) * - * @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto - * @param int $notooltip 1=Disable tooltip - * @return string Chaine avec URL + * @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto + * @param int $notooltip 1=Disable tooltip + * @param string $option Page for link ('', 'nolink', ...) + * @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 Chaine avec URL */ - function getNomUrl($withpicto=0, $notooltip=0) + function getNomUrl($withpicto=0, $notooltip=0, $option='', $morecss='', $save_lastsearch_value=-1) { global $langs; @@ -350,8 +353,18 @@ class Subscription extends CommonObject $langs->load("members"); $label=$langs->trans("ShowSubscription").': '.$this->ref; - $linkstart = ''; - $linkend=''; + $url = DOL_URL_ROOT.'/adherents/subscription/card.php?rowid='.$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'; + } + + $linkstart = ''; + $linkend = ''; $picto='payment'; diff --git a/htdocs/adherents/subscription/card.php b/htdocs/adherents/subscription/card.php index 94950f02b05..e458bf093f6 100644 --- a/htdocs/adherents/subscription/card.php +++ b/htdocs/adherents/subscription/card.php @@ -191,7 +191,7 @@ if ($user->rights->adherent->cotisation->creer && $action == 'edit') dol_fiche_head($head, 'general', $langs->trans("Subscription"), 0, 'payment'); - $linkback = ''.$langs->trans("BackToList").''; + $linkback = ''.$langs->trans("BackToList").''; print "\n"; print '