From fb966b5503021c6863916c4bd1e1ec1f00fdd847 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 30 Jul 2007 13:47:56 +0000 Subject: [PATCH] Qual: Suite mutualisation solution generique de navigation fichier suivante-precedente --- htdocs/adherents/card_subscriptions.php | 10 +--------- htdocs/adherents/index.php | 4 ++-- htdocs/adherents/note.php | 9 +-------- 3 files changed, 4 insertions(+), 19 deletions(-) diff --git a/htdocs/adherents/card_subscriptions.php b/htdocs/adherents/card_subscriptions.php index c7fbe35af09..5fd8a37f6e9 100644 --- a/htdocs/adherents/card_subscriptions.php +++ b/htdocs/adherents/card_subscriptions.php @@ -185,21 +185,13 @@ $head = member_prepare_head($adh); dolibarr_fiche_head($head, 'subscription', $langs->trans("Member")); - -$result=$adh->load_previous_next_id($adh->next_prev_filter); -if ($result < 0) dolibarr_print_error($db,$adh->error); -$previous_id = $adh->id_previous?''.img_previous().'':''; -$next_id = $adh->id_next?''.img_next().'':''; - print '
'; print ''; // Ref print ''; print ''; // Nom diff --git a/htdocs/adherents/index.php b/htdocs/adherents/index.php index 16f77aecd06..4ce09b04c4a 100644 --- a/htdocs/adherents/index.php +++ b/htdocs/adherents/index.php @@ -1,7 +1,7 @@ * Copyright (C) 2003 Jean-Louis Bergamo - * Copyright (C) 2004-2006 Laurent Destailleur + * Copyright (C) 2004-2007 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -283,7 +283,7 @@ foreach ($Total as $key=>$value) } // Total -print '\n"; +print '\n"; print "
'.$langs->trans("Ref").''; -if ($previous_id || $next_id) print '
'; -print $adh->id; -if ($previous_id || $next_id) print ''.$previous_id.''.$next_id.'
'; +print $html->showrefnav($adh,'rowid'); print '
'.$langs->trans("Total").''.price($tot)."".$numb."".price($numb>0?($tot/$numb):0)."
'.$langs->trans("Total").''.price($tot)."".$numb."".price(price2num($numb>0?($tot/$numb):0,'MT'))."

\n"; print ''; diff --git a/htdocs/adherents/note.php b/htdocs/adherents/note.php index f5ca13e3a17..68f4d9de7d7 100644 --- a/htdocs/adherents/note.php +++ b/htdocs/adherents/note.php @@ -86,11 +86,6 @@ if ($id) if ($msg) print '
'.$msg.'
'; - $result=$adh->load_previous_next_id($adh->next_prev_filter); - if ($result < 0) dolibarr_print_error($db,$adh->error); - $previous_id = $adh->id_previous?''.img_previous().'':''; - $next_id = $adh->id_next?''.img_next().'':''; - print ""; print ''; @@ -98,9 +93,7 @@ if ($id) // Reference print ''; print ''; print '';
'.$langs->trans('Ref').''; - if ($previous_id || $next_id) print '
'; - print $adh->id; - if ($previous_id || $next_id) print ''.$previous_id.''.$next_id.'
'; + print $html->showrefnav($adh,'id'); print '