{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
</div>
</form>
{elseif $user}
-
{literal}
+
<script type="text/javascript">
//<![CDATA[
function doEditUser() {
document.forms.alias.submit();
}
+function del_profile(pid) {
+ document.forms.profiles.del_profile.value = pid;
+ document.forms.profiles.submit();
+}
+
function del_fwd(fwd) {
document.forms.fwds.del_fwd.value = fwd;
document.forms.fwds.submit();
document.forms.bans.read_perm.value = "!xorg.*";
}
+$(document).ready(function() {
+ $('#tabs > ul').tabs();
+ $('.ui-tabs-nav li').width('33%')
+ .click(function() { $(this).children('a').click() });
+});
+
// ]]>
</script>
{/literal}
-<form id="auth" method="post" action="admin/user/{$user->login()}">
+<div id="tabs">
+<ul>
+ <li><a href="{$platal->pl_self()}#account"><span >Compte</span></a></li>
+ <li><a href="{$platal->pl_self()}#emails"><span>Emails</span></a></li>
+ <li><a href="{$platal->pl_self()}#forums"><span>Forums</span></a></li>
+</ul>
+
+<div id="account">
+<form id="auth" method="post" action="admin/user/{$user->login()}#account">
{xsrf_token_field}
<h1>Informations sur le compte</h1>
<p class="smaller">
<td>
<select name="state">
<option value="pending" {if $user->state eq 'pending'}selected="selected"{/if}>pending (Non-inscrit)</option>
- <option value="active" {if $user->state eq 'active'}selected="selected"{/if}>active (Inscrit, peu se logguer)</option>
+ <option value="active" {if $user->state eq 'active'}selected="selected"{/if}>active (Inscrit, peut se logguer)</option>
<option value="disabled" {if $user->state eq 'disabled'}selected="selected"{/if}>disabled (Inscrit, accès interdit)</option>
</select><br />
<label>
<option value="{$type.type}" {if $user->type eq $type.type}selected="selected"{/if}>{$type.type} ({$type.perms})</option>
{/iterate}
</select>
- <a href="admin/account/types">gérer</a>
+ <a href="admin/account/types">{icon name=wrench title=Gérer} gérer</a>
</td>
</tr>
<tr class="pair">
</div>
</form>
+<h1>Fiches associées au compte</h1>
+
+<form id="profiles" method="post" action="admin/user/{$user->login()}#account">
+ {xsrf_token_field}
+ <table class="tinybicol">
+ <tr>
+ <th></th>
+ <th>Identifiant de la fiche</th>
+ <th></th>
+ </tr>
+ {iterate from=$profiles item=profile}
+ <tr>
+ <td><input type="radio" name="owner" value="{$profile.pid}" {if $profile.owner}checked="checked"{/if}
+ onclick="this.form.submit()" /></td>
+ <td>{$profile.hrpid}</td>
+ <td class="right">
+ <a href="profile/edit/{$profile.hrpid}">{icon name=user_edit}</a>
+ <a href="profile/{$profile.hrpid}" class="popup2">{icon name=user_suit}</a>
+ <a href="javascript:del_profile({$profile.pid})">{icon name=cross}</a>
+ </td>
+ </tr>
+ {/iterate}
+ <tr>
+ <td>
+ <input type="radio" name="owner" value="0" onclick="this.form.submit()" />
+ </td>
+ <td>None</td>
+ <td></td>
+ </tr>
+ <tr class="pair">
+ <td colspan="3">
+ <input type="hidden" name="del_profile" value="" />
+ <input type="text" maxlength="64" name="new_profile" />
+ <input type="submit" name="add_profile" value="Ajouter" />
+ </td>
+ </tr>
+ </table>
+</form>
+
+</div>
+
<!--
<h1>Informations sur la fiche</h1>
<table cellspacing="0" cellpadding="2" class="tinybicol">
Ne pas utiliser [Désinscrire] si le but est d'exclure la personne.
Pour ceci changer ses permissions en 'disabled'.
</p>
-<form id="alias" method="post" action="admin/user">
+-->
+
+<div id="emails">
+<h1>Gestion de l'adresse X.org {$user->login()}</h1>
+
+<form id="alias" method="post" action="admin/user/{$user->login()}#emails">
{xsrf_token_field}
<table class="tinybicol" cellpadding="2" cellspacing="0">
<tr>
<th class="alias" colspan="3">
- Alias email
+ Alias email de l'utilisateur
</th>
</tr>
{iterate from=$aliases item=a}
<td>garanti à vie*</td>
{else}
<td class="action">
- <a href="javascript:del_alias('{$a.alias}')">delete</a>
+ <a href="javascript:del_alias('{$a.alias}')">{icon name=cross}</a>
</td>
{/if}
</tr>
{/iterate}
- {foreach from=$virtuals item=virtual}
- <tr class="{cycle values="impair,pair"}">
- <td></td>
- <td>{$virtual}</td>
- <td></td>
- </tr>
- {/foreach}
<tr class="{cycle values="impair,pair"}">
<td colspan="2" class="detail">
<input type="text" name="email" size="29" maxlength="60" value="" />
<input type="submit" name="add_alias" value="Ajouter" />
</td>
</tr>
- </table>
-</form>
--->
-
-<p><strong>* à ne modifier qu'avec l'accord express de l'utilisateur !!!</strong></p>
-
-<form id="bans" method="post" action="admin/user/{$user->login()}">
- {xsrf_token_field}
- <table cellspacing="0" cellpadding="2" class="tinybicol">
- <tr>
- <th colspan="4">
- Permissions sur les forums
- </th>
- </tr>
- <tr class="impair">
- <td class="titre">
- Poster
- </td>
- <td>
- <input type="text" name="write_perm" size="32" maxlength="255" value="{$bans.write_perm}" />
- </td>
- <td class="action">
- <a href="javascript:ban_write()">Bannir</a>
- </td>
- </tr>
- <tr class="pair">
- <td class="titre">
- Lire
- </td>
- <td>
- <input type="text" name="read_perm" size="32" maxlength="255" value="{$bans.read_perm}" />
- </td>
- <td class="action">
- <a href="javascript:ban_read()">Bannir</a>
- </td>
- </tr>
- <tr class="impair">
- <td class="titre">
- Commentaire
- </td>
- <td colspan="2">
- <input type="text" name="comment" size="40" maxlength="255" value="{$bans.comment}" />
- </td>
- </tr>
- <tr class="center">
- <td colspan="3">
- <input type="hidden" name="user_id" value="{$mr.user_id}" />
- <input type="submit" name="b_edit" value="Modifier" />
+ <tr class="{cycle values="impair,pair"}">
+ <td colspan="3" class="desc">
+ <strong>* à ne modifier qu'avec l'accord express de l'utilisateur !!!</strong>
</td>
</tr>
</table>
</form>
-{javascript name="ajax"}
-{test_email hruid=$user->login()}
+<br />
-<form id="fwds" method="post" action="admin/user/{$user->login()}#fwds">
+<form id="fwds" method="post" action="admin/user/{$user->login()}#emails">
{xsrf_token_field}
<table class="bicol" cellpadding="2" cellspacing="0">
<tr>
</td>
<td class="action">
{if $mail->is_removable()}
- <a href="javascript:del_fwd('{$mail->email}')">delete</a>
+ <a href="javascript:del_fwd('{$mail->email}')">{icon name=cross}</a>
{/if}
</td>
</tr>
</table>
</form>
+{javascript name="ajax"}
+{test_email hruid=$user->login()}
+
+<h1>Autres adresses de l'utilisateur</h1>
+
+<table class="tinybicol">
+ <th>Virtual aliases auquel l'utilisateur appartient</th>
+ {foreach from=$virtuals item=virtual}
+ <tr class="{cycle values="impair,pair"}">
+ <td>{$virtual}</td>
+ </tr>
+ {/foreach}
+</table>
+
+</div>
+
+<div id="forums">
+
+<h1>Gestion de l'accès au forums de {$user->login()}</h1>
+
+<form id="bans" method="post" action="admin/user/{$user->login()}#forums">
+ {xsrf_token_field}
+ <table cellspacing="0" cellpadding="2" class="tinybicol">
+ <tr>
+ <th colspan="4">
+ Permissions sur les forums
+ </th>
+ </tr>
+ <tr class="impair">
+ <td class="titre">
+ Poster
+ </td>
+ <td>
+ <input type="text" name="write_perm" size="32" maxlength="255" value="{$bans.write_perm}" />
+ </td>
+ <td class="action">
+ <a href="javascript:ban_write()">Bannir</a>
+ </td>
+ </tr>
+ <tr class="pair">
+ <td class="titre">
+ Lire
+ </td>
+ <td>
+ <input type="text" name="read_perm" size="32" maxlength="255" value="{$bans.read_perm}" />
+ </td>
+ <td class="action">
+ <a href="javascript:ban_read()">Bannir</a>
+ </td>
+ </tr>
+ <tr class="impair">
+ <td class="titre">
+ Commentaire
+ </td>
+ <td colspan="2">
+ <input type="text" name="comment" size="40" maxlength="255" value="{$bans.comment}" />
+ </td>
+ </tr>
+ <tr class="center">
+ <td colspan="3">
+ <input type="hidden" name="user_id" value="{$mr.user_id}" />
+ <input type="submit" name="b_edit" value="Modifier" />
+ </td>
+ </tr>
+ </table>
+</form>
+</div>
+
+
{/if}
{/if}