1 {**************************************************************************}
3 {* Copyright (C) 2003-2014 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 <script type="text/javascript">//<![CDATA[
25 function toggleField(name, id, obj) {
26 $("#" + name + "_" + id).toggle();
36 {counter print=false start=0 assign=hidden}
38 {iterate item=valid from=$vit}
39 {assign var=type value=$valid->type}
40 {if !t($hide_requests[$type]) && !($valid->requireAdmin && !$isAdmin)}
44 <th colspan="2"><a id="valid{$valid->id()}"></a>{$valid->type}</th>
47 <td class="titre" style="width: 20%">Demandeur :</td>
49 {if $valid->user->hasProfile()}
50 {assign var="profile" value=$valid->user->profile()}
51 <a href="profile/{$profile->hrpid}" class="popup2">
53 {$valid->user->fullName("promo")}
54 {if $valid->user->hasProfile()}
59 {if t($valid->profile) && !$valid->userIsProfileOwner}
61 <td class="titre" style="width: 20%">Profil concerné :</td>
63 <a href="profile/{$valid->profile->hrpid}" class="popup2">
64 {$valid->profile->fullName("promo")}
70 <td class="titre" style="width: 20%">Date de demande :</td>
72 {$valid->stamp|date_format}
75 {include file=$valid->formu()}
77 <tr onclick="toggleField('edit', '{$valid->id()}')" style="cursor: pointer">
79 {if $preview_id neq $valid->id()}
80 <div style="float: left">
87 <tr {if $preview_id neq $valid->id()}style="display: none"{/if} id="edit_{$valid->id()}">
88 <td colspan="2" class="center">
89 <form enctype="multipart/form-data" action="{$platal->pl_self(0)}/edit/{$valid->id()}#valid{$valid->id()}" method="post">
92 {include file=$valid->editor()}
93 <input type="hidden" name="uid" value="{$valid->user->id()}" />
94 <input type="hidden" name="type" value="{$valid->type}" />
95 <input type="hidden" name="stamp" value="{$valid->stamp}" />
97 <input type="submit" name="edit" value="Éditer" />
103 <tr onclick="toggleField('comment', '{$valid->id()}')" style="cursor: pointer">
105 {if $valid->comments|@count eq 0}
106 <div style="float: left">
113 {foreach from=$valid->comments item=c}
114 <tr class="{cycle values="impair,pair"}">
116 <a href="profile/{$c[0]}" class="popup2">{$c[0]}</a>
118 <td>{$c[1]|nl2br}</td>
121 <tr {if $valid->comments|@count eq 0}style="display: none"{/if} id="comment_{$valid->id()}">
122 <td colspan='2' class='center'>
123 <form action="admin/validate" method="post">
126 <input type="hidden" name="uid" value="{$valid->user->id()}" />
127 <input type="hidden" name="type" value="{$valid->type}" />
128 <input type="hidden" name="stamp" value="{$valid->stamp}" />
129 <input type="hidden" name="formid" value="{0|rand:65535}" />
130 <textarea rows="3" cols="50" name="comm"></textarea>
132 <input type="submit" name="hold" value="Commenter" />
139 {if $preview_id neq $valid->id()}
140 <div style="float: left">
148 <td colspan='2' {popup caption="Règles de validation" text=$valid->ruleText()}>
149 <form action="admin/validate" method="post">
152 Réponse préremplie :
153 <select onchange="this.form.comm.value=this.value">
154 <option value=""> </option>
155 {foreach from=$valid->answers() item=automatic_answer}
156 <option value="{$automatic_answer.answer}">{$automatic_answer.title}</option>
159 <a href="admin/validate/answers">{icon name="page_edit" title="Éditer les réponses automatiques"}</a>
162 Ajouté dans l'email :<br />
163 <textarea rows="5" cols="50" name="comm"></textarea><br />
165 <input type="hidden" name="uid" value="{$valid->user->id()}" />
166 <input type="hidden" name="type" value="{$valid->type}" />
167 <input type="hidden" name="stamp" value="{$valid->stamp}" />
168 <input type="submit" name="accept" value="Accepter" />
169 {if $valid->refuse}<input type="submit" name="refuse" value="Refuser" />{/if}
170 <input type="submit" name="delete" value="Supprimer" />
177 {counter print=false assign=hidden}
182 <p>{$hidden} validation{if $hidden > 1}s ont été masquées{else} a été masquée{/if}.</p>
187 <p>Rien à valider</p>
192 Afficher seulement les validations suivantes :
195 <form action="admin/validate" method="post">
196 {foreach from=$categories item=type}
197 <div style="float:left;width:33%"><input type="checkbox" name="{$type}" id="hide_{$type}"{if !t($hide_requests[$type])} checked="checked"{/if}/>
198 <label for="hide_{$type}">{$type}</label></div>
200 <div class="center" style="clear:left"><input type="submit" name="hide" value="Valider" /></div>
203 {* vim:set et sw=2 sts=2 sws=2 fenc=utf-8: *}