Show wether wiki pages are cached or not
authorx2003bruneau <x2003bruneau@839d8a87-29fc-0310-9880-83ba4fa771e5>
Thu, 25 Jan 2007 09:53:35 +0000 (09:53 +0000)
committerx2003bruneau <x2003bruneau@839d8a87-29fc-0310-9880-83ba4fa771e5>
Thu, 25 Jan 2007 09:53:35 +0000 (09:53 +0000)
git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@1393 839d8a87-29fc-0310-9880-83ba4fa771e5

modules/admin.php
templates/admin/wiki.tpl

index a635f00..56ae5df 100644 (file)
@@ -904,6 +904,9 @@ class AdminModule extends PLModule
                 while (($file = readdir($dh)) !== false) if (substr($file,0,1) >= 'A' && substr($file,0,1) <= 'Z') {
                     list($read,$edit) = wiki_get_perms($file);
                     $wiki_pages[$file] = array('read' => $perms[$read], 'edit' => $perms[$edit]);
+                    if (is_file($dir . '/cache_' . wiki_filename($file) . '.tpl')) {
+                        $wiki_pages[$file]['cached'] = true;
+                    }
                 }
                 closedir($dh);
             }
index 902c469..2110e2d 100644 (file)
@@ -40,8 +40,7 @@
 {/literal}
 
 <p class="center">
-  {icon name=magnifier"} <a href="Site/RecentChanges">Voir les changements récents</a>
-  (<a href="Site/AllRecentChanges">Version verbeuse</a>)
+  {icon name=magnifier"} <a href="Site/AllRecentChanges">Voir les changements récents</a>
 </p>
 
 <form action="admin/wiki/update" method="post" id="update_pages">
@@ -64,7 +63,7 @@
   <tr class="pair">
     <td colspan="4" style="margin-top: 0; margin-bottom: 0; padding-top: 0; padding-bottom: 0; height: 20px">
       <img src="images/k2.gif" alt="-" width="9" height="21" />
-      {$cat}
+      {$cat} <a href="{$cat}/RecentChanges">{icon name=magnifier title="Changements récents"}</a>
     </td>
   </tr>
 {foreach from=$pages item=perm key=page name=pages}
@@ -75,7 +74,7 @@
       {else}
       <img src="images/T.gif" alt="|" style="width: 12px: height: 21px" />
       {/if}
-      <a href="{$cat}/{$page}">{$page}</a> <a href="{$cat}/{$page}?action=edit" class="indice">{icon name=page_edit title='éditer'}</a>
+      <a href="{$cat}/{$page}">{$page}</a>{if $perm.cached}*{/if} <a href="{$cat}/{$page}?action=edit" class="indice">{icon name=page_edit title='éditer'}</a>
     </td>
     <td class="center" style="margin-top: 0; margin-bottom: 0; padding-top: 0; padding-bottom: 0; height: 20px">
       {$perm.read}
   </tr>
 </table>
 </form>
+
+<p class="smaller">
+  * : les pages marquées d'une astérisque sont actuellement disponibles en cache (accès plus rapide)
+</p>
 {* vim:set et sw=2 sts=2 sws=2: *}