tri des contacts avec des images
authorPascal Corpet <pascal.corpet@m4x.org>
Sat, 15 Jan 2005 12:38:37 +0000 (12:38 +0000)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Thu, 26 Jun 2008 21:27:37 +0000 (23:27 +0200)
git-archimport-id: opensource@polytechnique.org--2005/platal--mainline--0.9--patch-338

templates/carnet/mescontacts.tpl
templates/carnet/tricontacts.tpl [new file with mode: 0644]

index 1d15a02..c5b6110 100644 (file)
@@ -63,12 +63,7 @@ Pour r
 Pour afficher la liste détaillée de tes contacts: [<a href="{$smarty.server.PHP_SELF}?order={$order}&inv={$inv}"><strong>vue classique</strong></a>]
 </p>
 
-<p>
-Trier par :
-[<a href='?order=nom&trombi=1{if ($order eq 'nom') and not ($inv)}&inv=1'>nom inversé{else}'>nom{/if}</a>]
-[<a href='?order=promo&trombi=1{if ($order eq 'promo') and ($inv)}'>promo croissante{else}&inv=1'>promo{/if}</a>]
-[<a href='?order=last&trombi=1{if ($order eq 'last') and ($inv)}'>dernière modification inversée{else}&inv=1'>dernière modification{/if}</a>]
-</p>
+{include file=carnet/tricontacts.tpl order=$order}
 
 {$trombi->show()|smarty:nodefaults}
 
@@ -82,12 +77,7 @@ Trier par :
 Pour afficher le trombi de tes contacts : [<a href="?trombi=1&order={$order}&inv={$inv}"><strong>vue sous forme de trombi</strong></a>]
 </p>
 
-<p>
-Trier par :
-[<a href='?order=nom{if ($order eq 'nom') and not ($inv)}&inv=1'>nom inversé{else}'>nom{/if}</a>]
-[<a href='?order=promo{if ($order eq 'promo') and ($inv)}'>promo croissante{else}&inv=1'>promo{/if}</a>]
-[<a href='?order=last{if ($order eq 'last') and ($inv)}'>dernière modification inversée{else}&inv=1'>dernière modification{/if}</a>]
-</p>
+{include file=carnet/tricontacts.tpl order=$order}
 
 <br />
 
diff --git a/templates/carnet/tricontacts.tpl b/templates/carnet/tricontacts.tpl
new file mode 100644 (file)
index 0000000..3a3eaf1
--- /dev/null
@@ -0,0 +1,41 @@
+{***************************************************************************
+ *  Copyright (C) 2003-2004 Polytechnique.org                              *
+ *  http://opensource.polytechnique.org/                                   *
+ *                                                                         *
+ *  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   *
+ *  the Free Software Foundation; either version 2 of the License, or      *
+ *  (at your option) any later version.                                    *
+ *                                                                         *
+ *  This program is distributed in the hope that it will be useful,        *
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of         *
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
+ *  GNU General Public License for more details.                           *
+ *                                                                         *
+ *  You should have received a copy of the GNU General Public License      *
+ *  along with this program; if not, write to the Free Software            *
+ *  Foundation, Inc.,                                                      *
+ *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
+ ***************************************************************************}
+
+
+<p>
+Trier par :
+{if ($order eq 'nom') and not($smarty.request.inv)}
+[<a href='?order=nom&trombi={$smarty.request.trombi}&inv=1'><strong>nom <img src='{rel}/images/dn.png'></strong></a>]
+{else}
+[<a href='?order=nom&trombi={$smarty.request.trombi}'>{if ($order eq 'nom')}<strong>nom <img src='{rel}/images/up.png'></strong>{else}nom{/if}</a>]
+{/if}
+{if ($order eq 'promo') and ($smarty.request.inv)}
+[<a href='?order=promo&trombi={$smarty.request.trombi}'><strong>promo <img src='{rel}/images/up.png'></strong></a>]
+{else}
+[<a href='?order=promo&trombi={$smarty.request.trombi}&inv=1'>{if ($order eq 'promo')}<strong>promo <img src='{rel}/images/dn.png'></strong>{else}promo{/if}</a>]
+{/if}
+{if ($order eq 'last') and ($smarty.request.inv)}
+[<a href='?order=last&trombi={$smarty.request.trombi}'><strong>dernière modification <img src='{rel}/images/up.png'></strong></a>]
+{else}
+[<a href='?order=last&trombi={$smarty.request.trombi}&inv=1'>{if ($order eq 'last')}<strong>dernière modification <img src='{rel}/images/dn.png'></strong>{else}dernière modification{/if}</a>]
+{/if}
+</p>
+
+{* vim:set et sw=2 sts=2 sws=2: *}