{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2007 Polytechnique.org *}
+{* Copyright (C) 2003-2010 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
}
return false;
}
- function replie() {
- var cat=$.trim($(this).parent().text().replace(/(.*)\([0-9]+\)/, "$1"));
- $("tr[@id^=row/"+cat+"/]").hide();
- $(this).attr('src', 'images/k1.gif').unbind("click", replie).click(deplie);
+ var toggle = 0;
+ function replie(me, cat) {
+ if (toggle == 1) return;
+ toggle = 2;
+ $("tr[@id^=row_"+cat+"_]").hide();
+ $(me).attr('src', 'images/k1.gif');
}
- function deplie(image) {
- var cat=$.trim($(this).parent().text().replace(/(.*)\([0-9]+\)/, "$1"));
- $("tr[@id^=row/"+cat+"/]").show();
- $(this).attr('src', 'images/k2.gif').unbind("click", deplie).click(replie);
+ function deplie(me, cat) {
+ if (toggle == 2) return;
+ toggle = 1;
+ $("tr[@id^=row_"+cat+"_]").show();
+ $(me).attr('src', 'images/k2.gif');
+ }
+ function toggle_folder() {
+ me = this;
+ if ($(this).attr("class") == "wiki_category")
+ me = $("../img.wiki_root", me)[0];
+ var cat=$.trim($(me).parent().text().replace(/(.*)\([0-9]+\)/, "$1"));
+ if ($(me).attr('src') == "images/k1.gif") {
+ deplie(me, cat);
+ }
+ replie(me, cat);
+ setTimeout("toggle = 0;", 10);
}
$(document).ready(function() {
- $("tr.pair img[@alt=-]").css("cursor","pointer").each(replie);
+ $("tr.pair img[@alt=-]").css("cursor","pointer").click(toggle_folder).each(toggle_folder);
+ $(".wiki_category").css("cursor","pointer").click(toggle_folder);
});
// -->
</script>
{/literal}
<p class="center">
- {icon name=magnifier"} <a href="Site/AllRecentChanges">Voir les changements récents</a>
+ <a href="Site/AllRecentChanges?action=rss&user={$smarty.session.hruid}&hash={$smarty.session.user->token}" style="display:block;float:right" title="Changements">{icon name=feed title='fil rss'}</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">
+{xsrf_token_field}
<table class="bicol">
<tr>
<th>
{foreach from=$wiki_pages key=cat item=pages}
<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} ({$pages|@count}) <a href="{$cat}/RecentChanges">{icon name=magnifier title="Changements récents"}</a>
+ <img class="wiki_root" src="images/k2.gif" alt="-" width="9" height="21" />
+ <span class="wiki_category">{$cat}</span> ({$pages|@count}) <a href="{$cat}/RecentChanges">{icon name=magnifier title="Changements récents"}</a>
</td>
</tr>
{foreach from=$pages item=perm key=page name=pages}
- <tr id="row/{$cat}/{$page}" class="impair" onmouseover="this.className='pair';" onmouseout="this.className='impair';">
+ <tr id="row_{$cat}_{$page}" class="impair" onmouseover="this.className='pair';" onmouseout="this.className='impair';">
<td style="margin-top: 0; margin-bottom: 0; padding-top: 0; padding-bottom: 0; height: 20px">
{if $smarty.foreach.pages.last}
<img src="images/L.gif" alt="L" width="12" height="21" />
{$perm.edit}
</td>
<td class="action" style="margin-top: 0; margin-bottom: 0; padding-top: 0; padding-bottom: 0; height: 20px">
+ <a href="admin/wiki/rename/{$cat}.{$page}" onclick="var newname=prompt('Déplacer la page {$cat}.{$page} vers :', '{$cat}.{$page}'); if (!newname) return false; this.href += '/' + newname + '?token={xsrf_token}';">{icon name=book_next title='déplacer'}</a>
+ <a href="admin/wiki/delete/{$cat}.{$page}?token={xsrf_token}" onclick="return confirm('Supprimer la page {$cat}.{$page} ?');">{icon name=cross title='supprimer'}</a>
<input type="checkbox" name="{$cat}/{$page}"/>
</td>
</tr>
</tr>
<tr class="pair">
<td>
- Attribue les permissions aux pages cochées :
+ Attribue les permissions aux pages cochées :
</td>
<td>
<select name="read">
</form>
<p class="smaller">
- * : les pages marquées d'une astérisque sont actuellement disponibles en cache (accès plus rapide)
+ * : 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 enc=utf-8: *}