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