Merge commit 'origin/platal-0.10.0'
[platal.git] / templates / include / tips.tpl
index f1a0cea..532f461 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2009 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
 {if $full}
 <fieldset id="tod">
 {/if}
-  <legend>{icon name=lightbulb}Astuce&nbsp;: {$tips.titre}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-  {if !$nochange}
-  <a href="" onclick="Ajax.update_html('tod', 'ajax/tips/{$tips.id}'); return false">
-    {icon name=resultset_next title="Astuce suivante"}
-  </a>
+  <legend>{icon name=lightbulb} {if !$tips.special}
+    Astuce&nbsp;: {$tips.titre}
+    {if hasPerm('admin') && !$tips.special && !$nochange}
+    <a href="admin/tips/edit/{$tips.id}">{icon name="page_edit" title="Editer"}</a>
+    {/if}
+  {else}
+    <span style="color: red; font-weight: bold;">{$tips.titre}</span>
   {/if}
   </legend>
   {tidy}
   {$tips.text|nl2br|smarty:nodefaults}
-  {/tidy} 
+  {/tidy}
+  {if !$nochange}
+  <div class="right">
+    <a href="" onclick="Ajax.update_html('tod', 'ajax/tips/{$tips.id}'); return false" style="text-decoration: none">
+      Astuce suivante {icon name=resultset_next title="Astuce suivante"}
+    </a>
+  </div>
+  {/if}
 {if $full}
 </fieldset>
 {/if}
 {/if}
 
-{* vim:set et sw=2 sts=2 sws=2: *}
+{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}