1 {**************************************************************************}
3 {* Copyright (C) 2003-2008 Polytechnique.org *}
4 {* http://opensource.polytechnique.org/ *}
6 {* This program is free software; you can redistribute it and/or modify *}
7 {* it under the terms of the GNU General Public License as published by *}
8 {* the Free Software Foundation; either version 2 of the License, or *}
9 {* (at your option) any later version. *}
11 {* This program is distributed in the hope that it will be useful, *}
12 {* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
13 {* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
14 {* GNU General Public License for more details. *}
16 {* You should have received a copy of the GNU General Public License *}
17 {* along with this program; if not, write to the Free Software *}
19 {* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
21 {**************************************************************************}
23 {javascript name="jquery"}
24 <script type="text/javascript">//<![CDATA[
26 function toggleField(name, id, obj) {
27 $("#" + name + "_" + id).toggle();
37 {counter print=false start=0 assign=hidden}
39 {iterate item=valid from=$vit}
40 {assign var=type value=$valid->type}
41 {if !$hide_requests[$type]}
45 <th colspan="2"><a id="valid{$valid->id()}"></a>{$valid->type}</th>
48 <td class="titre" style="width: 20%">Demandeur :</td>
50 <a href="profile/{$valid->bestalias}" class="popup2">
51 {$valid->prenom} {$valid->nom} (X{$valid->promo})
56 <td class="titre" style="width: 20%">Date de demande :</td>
58 {$valid->stamp|date_format}
61 {include file=$valid->formu()}
65 {if $preview_id neq $valid->id()}
66 <div style="float: left">
67 <a href="javascript:toggleField('edit', '{$valid->id()}')">{icon name="add"}</a>
73 <tr {if $preview_id neq $valid->id()}style="display: none"{/if} id="edit_{$valid->id()}">
74 <td colspan="2" class="center">
75 <form enctype="multipart/form-data" action="{$platal->pl_self(0)}/edit/{$valid->id()}#valid{$valid->id()}" method="post">
77 {include file=$valid->editor()}
78 <input type="hidden" name="uid" value="{$valid->uid}" />
79 <input type="hidden" name="type" value="{$valid->type}" />
80 <input type="hidden" name="stamp" value="{$valid->stamp}" />
82 <input type="submit" name="edit" value="Editer" />
90 {if $valid->comments|@count eq 0}
91 <div style="float: left">
92 <a href="javascript:toggleField('comment', '{$valid->id()}')">{icon name="add"}</a>
98 {foreach from=$valid->comments item=c}
99 <tr class="{cycle values="impair,pair"}">
101 <a href="profile/{$c[0]}" class="popup2">{$c[0]}</a>
103 <td>{$c[1]|nl2br}</td>
106 <tr {if $valid->comments|@count eq 0}style="display: none"{/if} id="comment_{$valid->id()}">
107 <td colspan='2' class='center'>
108 <form action="admin/validate" method="post">
110 <input type="hidden" name="uid" value="{$valid->uid}" />
111 <input type="hidden" name="type" value="{$valid->type}" />
112 <input type="hidden" name="stamp" value="{$valid->stamp}" />
113 <input type="hidden" name="formid" value="{0|rand:65535}" />
114 <textarea rows="3" cols="50" name="comm"></textarea>
116 <input type="submit" name="hold" value="Commenter" />
121 <tr><th colspan='2'>Réponse</th></tr>
123 <td colspan='2' {popup caption="Règles de validation" text=$valid->ruleText()}>
124 <form action="admin/validate" method="post">
126 Réponse préremplie :
127 <select onchange="this.form.comm.value=this.value">
128 <option value=""></option>
129 {foreach from=$valid->answers() item=automatic_answer}
130 <option value="{$automatic_answer.answer}">{$automatic_answer.title}</option>
133 <a href="admin/validate/answers">{icon name="page_edit" title="Editer les réponses automatiques"}</a>
136 Ajouté dans l'email :<br />
137 <textarea rows="5" cols="50" name="comm"></textarea><br />
139 <input type="hidden" name="uid" value="{$valid->uid}" />
140 <input type="hidden" name="type" value="{$valid->type}" />
141 <input type="hidden" name="stamp" value="{$valid->stamp}" />
142 <input type="submit" name="accept" value="Accepter" />
143 {if $valid->refuse}<input type="submit" name="refuse" value="Refuser" />{/if}
144 <input type="submit" name="delete" value="Supprimer" />
151 {counter print=false assign=hidden}
156 <p>{$hidden} validation{if $hidden > 1}s ont été masquées{else} a été masquée{/if}.</p>
161 <p>Rien à valider</p>
166 Afficher seulement les validation suivantes :
169 <form action="admin/validate" method="post">
170 {foreach from=$categories item=type}
171 <div style="float:left;width:33%"><input type="checkbox" name="{$type}" id="hide_{$type}"{if !$hide_requests[$type]} checked="checked"{/if}/>
172 <label for="hide_{$type}">{$type}</label></div>
174 <div class="center" style="clear:left"><input type="submit" name="hide" value="Valider" /></div>
177 {* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}