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