Move profile/edit javascript in .js files and activate PlWizard eye-candies
[platal.git] / templates / profile / groups.tpl
1 {**************************************************************************}
2 {*                                                                        *}
3 {*  Copyright (C) 2003-2007 Polytechnique.org                             *}
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           *}
18 {*  Foundation, Inc.,                                                     *}
19 {*  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA               *}
20 {*                                                                        *}
21 {**************************************************************************}
22
23 <table class="bicol" style="margin-bottom: 1em" summary="Profil: Informations Polytechniciennes">
24   <tr>
25     <th colspan="2">
26       Informations polytechniciennes
27     </th>
28   </tr>
29   <tr>
30     <td colspan="2" class="flags">
31       <span class="rouge"><input type="checkbox" name="accesX" checked="checked" disabled="disabled" /></span>
32       <span class="texte">privé</span>
33     </td>
34   </tr>
35   <tr class="top">
36     <td class="titre" style="width: 30%">{if $old}ex-{/if}Section</td>
37     <td>
38       <select name="section">
39         {select_db_table table="sections" valeur=$section}
40       </select>
41     </td>
42   </tr>
43   <!-- Binets -->
44   <tr id="binets">
45     <td class="titre">{if $old}ex-{/if}Binet(s)</td>
46     <td>
47       <select name="binets_sel" onchange="updateGroup('binets')">
48         {select_db_table table="binets_def" valeur=0 champ="text" pad='1'}
49       </select>
50       <a id="binets_add" style="display: none"
51          href="javascript:addGroup('binets')">{icon name="add" title="Ajouter ce binet"}</a>
52     </td>
53   </tr>
54   {foreach item=text key=bid from=$binets}
55   <tr id="binets_{$bid}">
56     <td>
57       <input type="hidden" name="binets[{$bid}]" value="{$text}" />
58     </td>
59     <td>
60       <div style="float: left; width: 70%">
61         {$text}
62       </div>
63       <a href="javascript:removeGroup('binets', {$bid})">{icon name="cross" title="Supprimer ce binet"}</a>
64     </td>
65   </tr>
66   {/foreach}
67 </table>
68 <table class="bicol" style="margin-bottom: 1em">
69   <tr>
70     <th colspan="2">Groupes et institutions X</th>
71   </tr>
72   <tr>
73     <td colspan="2">
74       <p>
75         La gestion des annuaires des groupes X est réalisée grâce à
76         <a href="http://www.polytechnique.net">Polytechnique.net</a>. Pour faire apparaître un groupe sur ta fiche
77         il faut que soit inscrit dans ce groupe sur l'annuaire sur Polytechnique.net.
78       </p>
79       <p>
80         Tu es actuellement inscrit aux groupes X suivants&nbsp;:
81       </p>
82     </td>
83   </tr>
84   {iterate from=$mygroups item=group}
85   <tr>
86     <td class="titre">
87       {if $group.pub neq 'public'}{icon name=error title="Liste de membres a accès restreint"}{/if}
88       {if $group.perms eq 'admin'}{icon name=wrench title="Tu es administrateur du groupe"}{/if}
89       {if $group.site}<a href="{$group.site}">{else}<a href="http://www.polytechnique.net/{$group.diminutif}">{/if}
90       {$group.nom}
91       </a>
92     </td>
93     <td style="text-align: right; width: 30%">
94       <a href="{if $group.unsub_url}{$group.unsub_url}{else}http://www.polytechnique.net/{$group.diminutif}/unsubscribe{/if}">
95         {icon name=cross title="Demander désinscription"} Demander ta désinscription
96       </a>
97     </td>
98   </tr>
99   {/iterate}
100   <tr>
101     <td colspan="2" class="smaller">
102       <div class="titre">Signification des symboles&nbsp;:</div>
103       {icon name=error} L'annuaire du groupe est à visibilité restreinte et ce groupe n'apparaîtra pas sur ta fiche<br />
104       {icon name=wrench} Tu es administrateur du groupe
105     </td>
106   </tr>
107   <tr class="pair">
108     <td colspan="2">
109       <p>
110         Tu peux demander ton inscription aux groupes X qui t'intéressent. Voici la liste de ceux disponibles actuellement
111         sur Polytechnique.net et qui autorisent les demandes d'inscription&nbsp;:
112       </p>
113     </td>
114   <tr class="pair">
115     <td>
116       {assign var=groupcat value=""}
117       {assign var=ingroup value=false}
118       <select name="groupesx_sub" onchange="updateSubLink(this)">
119         {iterate from=$listgroups item=group}
120         {if $group.dom neq $groupcat}
121           {if $ingroup}
122           </optgroup>
123           {assign var=ingroup value=false}
124           {/if}
125           {if $group.dom}
126           <optgroup label="{$group.dom}">
127           {assign var=ingroup value=true}
128           {assign var=groupcat value="`$group.dom`"}
129           {/if}
130         {/if}
131         <option value="{if $group.sub_url}{$group.sub_url}{else}http://www.polytechnique.net/{$group.diminutif}/subscribe{/if}">
132           {$group.nom}
133         </option>
134         {/iterate}
135         {if $ingroup}</optgroup>{/if}
136       </select>
137     </td>
138     <td style="text-align: right">
139       <a href="http://www.polytechnique.net" id="groupesx_sub">
140         {icon name="add" title="Demander ton inscription"} Demander ton inscription
141       </a>
142     </td>
143   </tr>
144 </table>
145
146 {* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}