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