{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* Copyright (C) 2003-2006 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
<h1>
Gestion des événements :
- {if $arch}
- [ <a href="{$smarty.server.PHP_SELF}?arch=0">Actualités</a> | Archives ]
+ [
+ {if $arch || $action eq 'edit'}
+ <a href="admin/events">Actualités</a>
{else}
- [ Actualités | <a href="{$smarty.server.PHP_SELF}?arch=1">Archives</a> ]
+ Actualités
{/if}
+ |
+ {if !$arch || $action eq 'edit'}
+ <a href="admin/events/archives">Archives</a>
+ {else}
+ Archives
+ {/if}
+ ]
</h1>
-{if $mode}
+{if $action eq 'edit'}
{include file="include/form.evenement.tpl"}
{else}
-{iterate from=$evs item=ev}
<table class="bicol">
<tr>
- <th>
- Posté par <a href="{rel}/fiche.php?user={$ev.forlife}" class='popup2'>{$ev.prenom} {$ev.nom} (X{$ev.promo})</a>
- </th>
+ <th>Titre</th>
+ <th>Péremption</th>
+ <th></th>
</tr>
- <tr class="{if $ev.fvalide}impair{else}pair{/if}">
+ {iterate from=$evs item=ev}
+ {cycle values="impair,pair" assign=class}
+ <tr class="{$class}">
<td>
- <strong>{$ev.titre}</strong>
+ <a id="{$ev.id}"></a>
+ {if !$ev.fvalide}<strong>{/if}
+ <a href="admin/events/preview/{$ev.id}#{$ev.id}">{$ev.titre}</a><br />
+ {if !$ev.fvalide}</strong>{/if}
+ <small>
+ Proposée par <a href="profile/{$ev.forlife}" class='popup2'>{$ev.prenom} {$ev.nom} (X{$ev.promo})</a>
+ </small>
</td>
- </tr>
- <tr class="{if $ev.fvalide}impair{else}pair{/if}">
- <td>
- {tidy}{$ev.texte|nl2br}{/tidy}
+ <td class="right">{if !$ev.fvalide}<strong>{/if}{$ev.peremption}{if !$ev.fvalide}</strong>{/if}</td>
+ <td class="right" style="width: 42px">
+ {if $arch}
+ <a href="admin/events/unarchive/{$ev.id}">{icon name=package_delete title="Désarchiver"}</a><br />
+ {else}
+ {if $ev.fvalide}
+ <a href="admin/events/unvalid/{$ev.id}">{icon name=thumb_down title="Invalider"}</a>
+ <a href="admin/events/archive/{$ev.id}">{icon name=package_add title="Archiver"}</a><br />
+ {else}
+ <a href="admin/events/valid/{$ev.id}">{icon name=thumb_up title="Valider"}</a><br />
+ {/if}
+ {/if}
+ <a href="admin/events/edit/{$ev.id}">{icon name=page_edit title="Editer"}</a>
+ <a href="admin/events/delete/{$ev.id}">{icon name=delete title="Supprimer"}</a>
</td>
</tr>
- <tr class="{if $ev.fvalide}impair{else}pair{/if}">
- <td>
- Création : {$ev.creation_date}<br />
- Péremption : {$ev.peremption}<br />
- Promos : {$ev.promo_min} - {$ev.promo_max}<br />
+ {if $ev.preview}
+ <tr class="{$class}">
+ <td colspan="3" style="border-top: 1px dotted #777">
+ {$ev.texte|hde|nl2br}
</td>
</tr>
- <tr>
- <th>
- <form action="{$smarty.server.PHP_SELF}" method="post">
- <div>
- <input type="hidden" name="evt_id" value="{$ev.id}" />
- <input type="hidden" name="arch" value="{$ev.arch}" />
- {if $ev.farch}
- <input type="submit" name="action" value="Desarchiver" />
- {else}
- <input type="submit" name="action" value="Editer" />
- {if $ev.fvalide}
- <input type="submit" name="action" value="Invalider" />
- <input type="submit" name="action" value="Archiver" />
- {else}
- <input type="submit" name="action" value="Valider" />
- {/if}
- <input type="submit" name="action" value="Supprimer" />
- {/if}
- </div>
- </form>
- </th>
- </tr>
+ {/if}
+ {/iterate}
</table>
-<br />
-{/iterate}
-
{/if}