$smarty.session.promo not accessible anymore, use $smarty.session.user->profile(...
[platal.git] / templates / stats / index.tpl
index cf2de05..a8e629c 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2006 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2010 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -30,9 +30,12 @@ Quelques statistiques sur l'utilisation des services de Polytechnique.org ainsi
 </p>
 
 <ul>
-<li><a href="{rel}/stats/evolution">Nombre d'inscrits au cours du temps</a></li>
-<li><a href="{rel}/stats/promos/{$smarty.session.promo}">Nombre d'inscrits dans ta promotion</a></li>
-<li><a href="{rel}/stats/promos">Nombre d'inscrits par promotion</a></li>
+<li><a href="stats/evolution">Nombre d'inscrits au cours du temps</a></li>
+{assign var="profile" value=$smarty.session.user->profile()}
+{if $profile}
+<li><a href="stats/promos/{$profile->yearpromo()}">Nombre d'inscrits dans ta promotion</a></li>
+{/if}
+<li><a href="stats/promos">Nombre d'inscrits par promotion</a></li>
 </ul>
 
-{* vim:set et sw=2 sts=2 sws=2: *}
+{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}