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