{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2007 Polytechnique.org *}
+{* Copyright (C) 2003-2010 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{* *}
{**************************************************************************}
-
-{literal}
-<script type="text/javascript">//<![CDATA[
- var gdt = new Date();
- var year = gdt.getYear();
- if (year < 1000) {
- year += 1900;
- }
-
- var oldMate = year >= {/literal}{$smarty.session.promo_sortie}{literal};
-
- function printTitle(text)
- {
- if (oldMate) {
- document.write("ex-" + text);
- } else {
- document.write(text);
- }
- }
-
- function update(type)
- {
- var val = document.forms.prof_annu[type + '_sel'].value;
- if (val == '0' || document.getElementById(type + '_' + val) != null) {
- document.getElementById(type + '_add').style.display = 'none';
- } else {
- document.getElementById(type + '_add').style.display = '';
- }
- }
-
- function remove(cat, id)
- {
- $('#' + cat + '_' + id).remove();
- update(cat);
- }
-
- function add(cat)
- {
- var cb = document.forms.prof_annu[cat + '_sel'];
- var id = cb.value;
- var text = cb.options[cb.selectedIndex].text;
- var html = '<tr id="' + cat + '_' + id + '">'
- + ' <td>'
- + ' <input type="hidden" name="' + cat + '[' + id + ']" value="' + text + '" />'
- + ' </td>'
- + ' <td>'
- + ' <div style="float: left; width: 70%">'
- + text
- + ' </div>'
- + ' <a href="javascript:remove(\'' + cat + '\', ' + id + ')">'
- + ' <img src="images/icons/cross.gif" alt="cross" title="Supprimer ce groupe" />'
- + ' </a>'
- + ' </td>'
- + '</tr>';
- $('#' + cat).after(html);
- update(cat);
- }
-
- function updateSubLink(cb)
- {
- var href = cb.value ? cb.value : "http://www.polytechnique.net";
- document.getElementById("groupesx_sub").href = href;
- }
-
- //]]>
-</script>
-{/literal}
-
-<table class="bicol" style="margin-bottom: 1em" summary="Profil: Informations Polytechniciennes">
+<table class="bicol" style="margin-bottom: 1em" summary="Profil : Informations Polytechniciennes">
<tr>
<th colspan="2">
+ <div class="flags" style="float: left">
+ <input type="checkbox" name="accesX" checked="checked" disabled="disabled" />
+ {icon name="flag_red" title="privé"}
+ </div>
Informations polytechniciennes
</th>
</tr>
- <tr>
- <td colspan="2" class="flags">
- <span class="rouge"><input type="checkbox" name="accesX" checked="checked" disabled="disabled" /></span>
- <span class="texte">privé</span>
- </td>
- </tr>
<tr class="top">
- <td class="titre" style="width: 30%">
- <script type="text/javascript">printTitle("Section")</script>
- </td>
+ <td class="titre" style="width: 30%">{if $old}ex-{/if}Section</td>
<td>
<select name="section">
- {select_db_table table="sections" valeur=$section}
+ {select_db_table table="profile_section_enum" valeur=$section}
</select>
</td>
</tr>
<!-- Binets -->
- <tr id="binets">
- <td class="titre">
- <script type="text/javascript">printTitle("Binet(s)")</script>
- </td>
+ <tr id="binets_table">
+ <td class="titre">{if $old}ex-{/if}Binet(s)</td>
<td>
- <select name="binets_sel" onchange="update('binets')">
- {select_db_table table="binets_def" valeur=0 champ="text" pad='1'}
+ <select name="binets_sel" onchange="updateElement('binets')">
+ {select_db_table table="profile_binet_enum" valeur=0 champ="text" pad='1'}
</select>
- <a id="binets_add" href="javascript:add('binets')">{icon name="add" title="Ajouter ce binet"}</a>
+ <a id="binets_add" style="display: none"
+ href="javascript:addBinet()">{icon name="add" title="Ajouter ce binet"}</a>
</td>
</tr>
{foreach item=text key=bid from=$binets}
<div style="float: left; width: 70%">
{$text}
</div>
- <a href="javascript:remove('binets', {$bid})">{icon name="cross" title="Supprimer ce binet"}</a>
+ <a href="javascript:removeElement('binets', {$bid})">{icon name="cross" title="Supprimer ce binet"}</a>
</td>
</tr>
{/foreach}
<p>
La gestion des annuaires des groupes X est réalisée grâce à
<a href="http://www.polytechnique.net">Polytechnique.net</a>. Pour faire apparaître un groupe sur ta fiche
- il faut que soit inscrit dans ce groupe sur l'annuaire sur Polytechnique.net.
+ il faut que tu sois inscrit dans ce groupe sur <a href="http://www.polytechnique.net">Polytechnique.net</a>.
</p>
- <p>
- Tu es actuellement inscrit aux groupes X suivants :
- </p>
- </td>
- </tr>
- {iterate from=$mygroups item=group}
- <tr>
- <td class="titre">
- {if $group.pub neq 'public'}{icon name=error title="Liste de membres a accès restreint"}{/if}
- {if $group.perms eq 'admin'}{icon name=wrench title="Tu es administrateur du groupe"}{/if}
- {if $group.site}<a href="{$group.site}">{else}<a href="http://www.polytechnique.net/{$group.diminutif}">{/if}
- {$group.nom}
- </a>
- </td>
- <td style="text-align: right; width: 30%">
- <a href="{if $group.unsub_url}{$group.unsub_url}{else}http://www.polytechnique.net/{$group.diminutif}/unsubscribe{/if}">
- {icon name=cross title="Demander désinscription"} Demander ta désinscription
- </a>
</td>
</tr>
- {/iterate}
<tr>
- <td colspan="2" class="smaller">
- <div class="titre">Signification des symboles :</div>
- {icon name=error} L'annuaire du groupe est à visibilité restreinte et ce groupe n'apparaîtra pas sur ta fiche<br />
- {icon name=wrench} Tu es administrateur du groupe
- </td>
- </tr>
- <tr class="pair">
<td colspan="2">
<p>
Tu peux demander ton inscription aux groupes X qui t'intéressent. Voici la liste de ceux disponibles actuellement
sur Polytechnique.net et qui autorisent les demandes d'inscription :
</p>
</td>
- <tr class="pair">
+ </tr>
+ <tr>
<td>
{assign var=groupcat value=""}
{assign var=ingroup value=false}
- <select name="groupesx_sub" onchange="updateSubLink(this)">
+ <select name="groupesx_sub" onchange="updateGroupSubLink()">
{iterate from=$listgroups item=group}
{if $group.dom neq $groupcat}
{if $ingroup}
</a>
</td>
</tr>
+ {if $mygroups->total()}
+ <tr class="pair">
+ <td colspan="2">Tu es actuellement dans les groupes suivants :</td>
+ </tr>
+ {/if}
+ {assign var=grp_admin value=false}
+ {assign var=grp_public value=false}
+ {iterate from=$mygroups item=group}
+ <tr class="pair">
+ <td class="titre">
+ {if $group.pub neq 'public'}
+ {icon name=error title="Liste de membres a accès restreint"}
+ {assign var=grp_public value=true}
+ {/if}
+ {if $group.perms eq 'admin'}
+ {icon name=wrench title="Tu es administrateur du groupe"}
+ {assign var=grp_admin value=true}
+ {/if}
+ {if $group.site}<a href="{$group.site}">{else}<a href="http://www.polytechnique.net/{$group.diminutif}">{/if}
+ {$group.nom}
+ </a>
+ </td>
+ <td style="text-align: right; width: 30%">
+ <a href="{if $group.unsub_url}{$group.unsub_url}{else}http://www.polytechnique.net/{$group.diminutif}/unsubscribe{/if}">
+ {icon name=cross title="Demander désinscription"} Demander ta désinscription
+ </a>
+ </td>
+ </tr>
+ {/iterate}
+ {if $grp_admin || $grp_public}
+ <tr class="pair">
+ <td colspan="2" class="smaller">
+ <div class="titre">Signification des symboles :</div>
+ {if $grp_public}{icon name=error} L'annuaire du groupe est à visibilité restreinte et ce groupe n'apparaîtra pas sur ta
+ fiche.{/if}
+ {if $grp_public && $grp_admin}<br />{/if}
+ {if $grp_admin}{icon name=wrench} Tu es administrateur du groupe.{/if}
+ </td>
+ </tr>
+ {/if}
</table>
-<script type="text/javascript">
-update('binets');
-updateSubLink(document.forms.prof_annu.groupesx_sub);
-</script>
-
{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}