{**************************************************************************}
-<h1>
- Gestion des utilisateurs
-</h1>
-
-
{if $smarty.post.u_kill_conf}
<form method="post" action="admin/user">
{xsrf_token_field}
<input type="submit" name="u_kill" value="continuer" />
</div>
</form>
-{else}
-
-<form method="post" action="admin/user">
- {xsrf_token_field}
- <table class="tinybicol" cellspacing="0" cellpadding="2">
- <tr>
- <th>
- Administrer
- </th>
- </tr>
- {if !$smarty.request.login && !$mr.hruid}
- <tr class="pair">
- <td class="center">
- Il est possible d'entrer ici n'importe quelle adresse email : redirection, melix, ou alias.
- </td>
- </tr>
- {/if}
- <tr>
- <td class="center">
- <input type="text" name="login" size="40" maxlength="255" value="{$smarty.request.login|default:$mr.hruid}" />
- </td>
- </tr>
- <tr>
- <td class="center">
- <input type="hidden" name="hashpass" value="" />
- <input type="submit" name="select" value=" edit " />
- <input type="submit" name="suid_button" value=" su " />
- <input type="submit" name="ax_button" value=" AX " />
- <input type="submit" name="logs_button" value=" logs " />
- </td>
- </tr>
- </table>
-</form>
-
-{if $mr}
-
-<p class="smaller">
-Dernière connexion le <strong>{$lastlogin|date_format:"%d %B %Y, %T"}</strong>
-depuis <strong>{$host}</strong>.
-</p>
-
+{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">
+<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}
- <table cellspacing="0" cellpadding="2" class="tinybicol">
+ <h1>Informations sur le compte</h1>
+ <p class="smaller">
+ Dernière connexion le <strong>{$lastlogin|date_format:"%d %B %Y, %T"}</strong>
+ depuis <strong>{$host}</strong>.
+ </p>
+
+ <table class="tinybicol">
<tr>
<th colspan="2">
<div style="float: right; text-align: right">
- Matricule = {$mr.matricule}<br />
- Matricule AX = {$mr.matricule_ax}
+ Inscrit le {$user->registration_date|date_format}
</div>
<div style="float: left; text-align: left">
- UID = {$mr.user_id}<br />
- Inscription = {$mr.date_ins|date_format}
+ {icon name=user_gray} {$mr.hruid} (uid {$user->id()})
</div>
- <input type="hidden" name="user_id" value="{$mr.user_id}" />
+ <input type="hidden" name="uid" value="{$user->id()}" />
</th>
</tr>
- <tr class="pair">
- <td class="titre">
- Mot de passe
+ <tr>
+ <td class="titre">Nom complet</td>
+ <td><input type="text" name="full_name" maxlength="255" value="{$user->fullName()}" /></td>
+ </tr>
+ <tr>
+ <td class="titre">Nom affiché</td>
+ <td><input type="text" name="display_name" maxlength="255" value="{$user->displayName()}" /></td>
+ </tr>
+ <tr>
+ <td class="titre">Sexe</td>
+ <td>
+ <label>femme <input type="radio" name="sex" value="female" {if $user->isFemale()}checked="checked"{/if} /></label>
+ <label><input type="radio" name="sex" value="male" {if !$user->isFemale()}checked="checked"{/if} /> homme</label>
</td>
+ </tr>
+ <tr class="impair">
+ <td class="titre">Mot de passe</td>
<td>
<div style="float: left">
- <input type="text" name="newpass_clair" size="10" maxlength="10" value="********" />
- <input type="hidden" name="passw" size="32" maxlength="32" value="{$mr.password}" />
+ <input type="text" name="newpass_clair" size="10" maxlength="255" value="********" />
<input type="hidden" name="hashpass" value="" />
</div>
<div style="float: left; margin-top: 5px;">
</div>
</td>
</tr>
+ <tr class="impair">
+ <td class="titre">Mot de passe SMTP</td>
+ <td>
+ <div style="float: left">
+ <input type="password" name="weak_password" size="10" maxlength="256" value="" />
+ {if $user->weak_access}
+ <input type="submit" name="disable_weak_access" value="Supprimer" />
+ {/if}
+ </div>
+ </td>
+ </tr>
+ <tr class="impair">
+ <td class="titre">Accès RSS</td>
+ <td>
+ <label>
+ <input type="checkbox" name="token_access" {if $user->token_access}checked="checked"{/if} value="1" />
+ activer l'accès
+ </label>
+ </td>
+ </tr>
+ <tr class="impair">
+ <td class="titre">Skin</td>
+ <td>
+ <select name="skin">
+ <option value="" {if !$user->skin}selected="selected"{/if}>Aucune (défaut du système)</option>
+ {iterate from=$skins item=skin}
+ <option value="{$skin.id}" {if $user->skin eq $skin.id}selected="selected"{/if}>{$skin.name}</option>
+ {/iterate}
+ </select>
+ </td>
+ </tr>
+ <tr class="pair">
+ <td class="titre">Etat du compte</td>
+ <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, peut se logguer)</option>
+ <option value="disabled" {if $user->state eq 'disabled'}selected="selected"{/if}>disabled (Inscrit, accès interdit)</option>
+ </select><br />
+ <label>
+ <input type="checkbox" name="is_admin" value="1" {if $user->is_admin}checked="checked"{/if} />
+ administrateur du site
+ </label>
+ </td>
+ </tr>
+ <tr class="pair">
+ <td class="titre">Type de compte</td>
+ <td>
+ <select name="type">
+ {iterate from=$account_types item=type}
+ <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">{icon name=wrench title=Gérer} gérer</a>
+ </td>
+ </tr>
+ <tr class="pair">
+ <td class="titre">
+ Surveillance
+ </td>
+ <td>
+ <label><input type="checkbox" name="watch" {if $user->watch}checked="checked"{/if} value="1" />
+ Surveiller l'activité de ce compte</label><br />
+ <span class="smaller">Cette option permet d'avoir des logs complets de l'activité
+ du compte via le logger, et d'être alerté lors des connexions de l'utilisateur.</span>
+ </td>
+ </tr>
+ <tr class="pair">
+ <td class="titre">
+ Commentaire
+ </td>
+ <td>
+ <input type="text" name="comment" size="40" maxlength="64" value="{$user->comment}" />
+ </td>
+ </tr>
+ </table>
+ <div class="center">
+ <input type="submit" name="update_account" value="Mettre à jour" /><br />
+ <input type="submit" name="su_account" value="Prendre l'identité" />
+ <input type="submit" name="log_account" value="Consulter les logs" />
+ </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">
+ <tr>
+ <th colspan="2">
+ <div style="float: right; text-align: right">
+ Matricule = {$mr.matricule}<br />
+ Matricule AX = {$mr.matricule_ax}
+ </div>
+ <div style="float: left; text-align: left">
+ UID = {$mr.user_id}<br />
+ Inscription = {$mr.date_ins|date_format}
+ </div>
+ <input type="hidden" name="user_id" value="{$mr.user_id}" />
+ </th>
+ </tr>
<tr class="pair">
<td class="titre">
Nom
<input type="text" name="promoN" size="4" maxlength="4" value="{$mr.promo}" />
</td>
</tr>
- <tr class="impair">
- <td class="titre">
- Surveillance
- </td>
- <td>
- <label><input type="checkbox" name="watchN" {if $mr.watch}checked="checked"{/if} />
- Surveiller l'activité de ce compte</label><br />
- <span class="smaller">Cette option permet d'avoir des logs complets de l'activité
- du compte via le logger, et d'être alerté lors des connexions de l'utilisateur.</span>
- </td>
- </tr>
- <tr class="impair">
- <td class="titre">
- Commentaire
- </td>
- <td>
- <input type="text" name="commentN" size="40" maxlength="64" value="{$mr.comment}" />
- </td>
- </tr>
{if $mr.perms eq 'pending'}
<tr class="center">
<td colspan="2">
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}
- {iterate from=$virtuals item=virtual}
- <tr class="{cycle values="impair,pair"}">
- <td></td>
- <td>{$virtual.alias}</td>
- <td></td>
- </tr>
- {/iterate}
<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">
- {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#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>
-{/if}
+{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}