Allows to easily come back to the full view once in the main address view
[platal.git] / templates / include / plview.trombi.tpl
index afe6d62..1015f5f 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
 {*                                                                        *}
 {**************************************************************************}
 
+{if $plset_count eq 0}
+<p class="erreur">
+  Aucun des camarades concernĂ©s n'a de photographie sur sa fiche
+</p>
+{else}
 <table cellpadding="8" cellspacing="2" style="width: 100%">
   {iterate from=$set item=p}
   {cycle values="1,2,3" assign="loop"}
@@ -30,7 +35,7 @@
       <a href="{$mainsiteurl}profile/{$p.forlife}" class="popup2">
         <img src="photo/{$p.forlife}" width="110" alt=" [ PHOTO ] " />
       </a>
-      {if $trombi_with_admin && $smarty.session.perms->hasFlag('admin')}
+      {if $trombi_with_admin && hasPerm('admin')}
       <a href="{$mainsiteurl}admin/trombino/{$p.user_id}">{icon name=wrench title="[admin]"}</a>
       {/if}
       <br />
@@ -49,5 +54,6 @@
   <td></td></tr>
   {/if}
 </table>
+{/if}
 
 {* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}