crypte => chiffre
[platal.git] / templates / admin / valider.tpl
CommitLineData
0337d704 1{**************************************************************************}
2{* *}
179afa7f 3{* Copyright (C) 2003-2008 Polytechnique.org *}
0337d704 4{* http://opensource.polytechnique.org/ *}
5{* *}
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. *}
10{* *}
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. *}
15{* *}
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 *}
65934312 18
0337d704 19{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
20{* *}
21{**************************************************************************}
22
65934312
FB
23{javascript name="jquery"}
24<script type="text/javascript">//<![CDATA[
25{literal}
cbc404da
VZ
26function toggleField(name, id, obj) {
27 $("#" + name + "_" + id).toggle();
65934312
FB
28}
29{/literal}
30//]]></script>
31
0337d704 32<h1>Validation</h1>
65934312 33
0337d704 34
35{if $vit->total()}
36
cfb96867 37{counter print=false start=0 assign=hidden}
38
e654517d 39{iterate item=valid from=$vit}
cfb96867 40{assign var=type value=$valid->type}
41{if !$hide_requests[$type]}
0337d704 42<br />
43<table class="bicol">
44 <tr>
fa33f7c6 45 <th colspan="2"><a id="valid{$valid->id()}"></a>{$valid->type}</th>
0337d704 46 </tr>
47 <tr>
48 <td class="titre" style="width: 20%">Demandeur&nbsp;:</td>
49 <td>
7b2413f6 50 <a href="profile/{$valid->bestalias}" class="popup2">
81f416f2 51 {$valid->prenom} {$valid->nom} (X{$valid->promo})
0337d704 52 </a>
53 </td>
54 </tr>
4aec8eff 55 <tr>
56 <td class="titre" style="width: 20%">Date de demande&nbsp;:</td>
57 <td>
58 {$valid->stamp|date_format}
59 </td>
60 </tr>
0337d704 61 {include file=$valid->formu()}
6aa01fed 62 {if $valid->editor()}
fe30a442 63 <tr onclick="toggleField('edit', '{$valid->id()}')" style="cursor: pointer">
65934312 64 <th colspan="2">
cbc404da 65 {if $preview_id neq $valid->id()}
65934312 66 <div style="float: left">
fe30a442 67 {icon name="add"}
65934312
FB
68 </div>
69 {/if}
fe30a442 70 Éditer
65934312
FB
71 </th>
72 </tr>
73 <tr {if $preview_id neq $valid->id()}style="display: none"{/if} id="edit_{$valid->id()}">
6aa01fed 74 <td colspan="2" class="center">
65934312 75 <form enctype="multipart/form-data" action="{$platal->pl_self(0)}/edit/{$valid->id()}#valid{$valid->id()}" method="post">
e61326ed 76 {xsrf_token_field}
6aa01fed 77 <div>
78 {include file=$valid->editor()}
79 <input type="hidden" name="uid" value="{$valid->uid}" />
80 <input type="hidden" name="type" value="{$valid->type}" />
81 <input type="hidden" name="stamp" value="{$valid->stamp}" />
82 <br />
fe30a442 83 <input type="submit" name="edit" value="Éditer" />
6aa01fed 84 </div>
85 </form>
86 </td>
87 </tr>
88 {/if}
fe30a442 89 <tr onclick="toggleField('comment', '{$valid->id()}')" style="cursor: pointer">
65934312
FB
90 <th colspan='2'>
91 {if $valid->comments|@count eq 0}
92 <div style="float: left">
fe30a442 93 {icon name="add"}
65934312
FB
94 </div>
95 {/if}
96 Commentaires
97 </th>
98 </tr>
0337d704 99 {foreach from=$valid->comments item=c}
100 <tr class="{cycle values="impair,pair"}">
101 <td class="titre">
7b2413f6 102 <a href="profile/{$c[0]}" class="popup2">{$c[0]}</a>
0337d704 103 </td>
716c76f6 104 <td>{$c[1]|nl2br}</td>
0337d704 105 </tr>
106 {/foreach}
65934312 107 <tr {if $valid->comments|@count eq 0}style="display: none"{/if} id="comment_{$valid->id()}">
0337d704 108 <td colspan='2' class='center'>
86f0a6af 109 <form action="admin/validate" method="post">
e61326ed 110 {xsrf_token_field}
0337d704 111 <div>
112 <input type="hidden" name="uid" value="{$valid->uid}" />
113 <input type="hidden" name="type" value="{$valid->type}" />
114 <input type="hidden" name="stamp" value="{$valid->stamp}" />
4791ff77 115 <input type="hidden" name="formid" value="{0|rand:65535}" />
0337d704 116 <textarea rows="3" cols="50" name="comm"></textarea>
117 <br />
118 <input type="submit" name="hold" value="Commenter" />
119 </div>
120 </form>
121 </td>
122 </tr>
fe30a442
SJ
123 <tr>
124 <th colspan='2'>
125 {if $preview_id neq $valid->id()}
126 <div style="float: left">
127 {icon name="null"}
128 </div>
129 {/if}
130 Réponse
131 </th>
132 </tr>
0337d704 133 <tr>
fba760d2 134 <td colspan='2' {popup caption="Règles de validation" text=$valid->ruleText()}>
86f0a6af 135 <form action="admin/validate" method="post">
e61326ed 136 {xsrf_token_field}
0337d704 137 <div>
e8439508 138 Réponse préremplie&nbsp;:
e18888f4 139 <select onchange="this.form.comm.value=this.value">
140 <option value=""></option>
141 {foreach from=$valid->answers() item=automatic_answer}
142 <option value="{$automatic_answer.answer}">{$automatic_answer.title}</option>
143 {/foreach}
144 </select>
fe30a442 145 <a href="admin/validate/answers">{icon name="page_edit" title="Éditer les réponses automatiques"}</a>
e18888f4 146 </div>
147 <div class='center'>
e8439508 148 Ajouté dans l'email&nbsp;:<br />
0337d704 149 <textarea rows="5" cols="50" name="comm"></textarea><br />
150
151 <input type="hidden" name="uid" value="{$valid->uid}" />
152 <input type="hidden" name="type" value="{$valid->type}" />
153 <input type="hidden" name="stamp" value="{$valid->stamp}" />
154 <input type="submit" name="accept" value="Accepter" />
155 {if $valid->refuse}<input type="submit" name="refuse" value="Refuser" />{/if}
156 <input type="submit" name="delete" value="Supprimer" />
157 </div>
158 </form>
159 </td>
160 </tr>
161</table>
cfb96867 162{else}
163{counter print=false assign=hidden}
164{/if}
0337d704 165{/iterate}
166
cfb96867 167{if $hidden}
a7de4ef7 168<p>{$hidden} validation{if $hidden > 1}s ont été masquées{else} a été masquée{/if}.</p>
cfb96867 169{/if}
170
0337d704 171{else}
172
a7de4ef7 173<p>Rien à valider</p>
0337d704 174
175{/if}
176
cfb96867 177<p>
e8439508 178 Afficher seulement les validation suivantes&nbsp;:
cfb96867 179</p>
0337d704 180
2069538b 181<form action="admin/validate" method="post">
182 {foreach from=$categories item=type}
183 <div style="float:left;width:33%"><input type="checkbox" name="{$type}" id="hide_{$type}"{if !$hide_requests[$type]} checked="checked"{/if}/>
184 <label for="hide_{$type}">{$type}</label></div>
185 {/foreach}
186 <div class="center" style="clear:left"><input type="submit" name="hide" value="Valider" /></div>
187</form>
188
a7de4ef7 189{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}