Index: trunk/LATMOS-Accounts-Web/Changes
===================================================================
--- trunk/LATMOS-Accounts-Web/Changes	(revision 1080)
+++ trunk/LATMOS-Accounts-Web/Changes	(revision 1081)
@@ -1,5 +1,6 @@
-This file documents the revision history for Perl extension LATMOS::Accounts::Web.
+3.X.X
+    - the default filter to limit object listing look severals attributes, the
+      result is given via an AJAX call
 
-X.X.X
     - add SSL authentication support
 
Index: trunk/LATMOS-Accounts-Web/lib/LATMOS/Accounts/Web.pm
===================================================================
--- trunk/LATMOS-Accounts-Web/lib/LATMOS/Accounts/Web.pm	(revision 1080)
+++ trunk/LATMOS-Accounts-Web/lib/LATMOS/Accounts/Web.pm	(revision 1081)
@@ -31,4 +31,31 @@
 
 __PACKAGE__->config(
+    objects => {
+        user => {
+            quick_search => [ qw(cn sn givenName) ],
+            list => [ qw(sn givenName mail) ],
+        },
+        group => {
+            quick_search => [ qw(cn description) ],
+            list => [ qw(description) ],
+        },
+        nethost => {
+            quick_search => [ qw(cn description ip cname otherName) ],
+            list => [ qw(description owner) ],
+        },
+        netzone => {
+            quick_search => [ qw(cn description ip) ],
+            list => [ qw(type description) ],
+        },
+        site => {
+            quick_search => [ qw(cn l) ],
+            list => [ qw(l) ],
+        },
+        aliases => {
+            quick_search => [ qw(name) ],
+            list => [ qw() ],
+        },
+
+    },
     'attrs' => {
         'physicalDeliveryOfficeName' => {
Index: trunk/LATMOS-Accounts-Web/lib/LATMOS/Accounts/Web/Controller/Ajax.pm
===================================================================
--- trunk/LATMOS-Accounts-Web/lib/LATMOS/Accounts/Web/Controller/Ajax.pm	(revision 1080)
+++ trunk/LATMOS-Accounts-Web/lib/LATMOS/Accounts/Web/Controller/Ajax.pm	(revision 1081)
@@ -180,4 +180,9 @@
 }
 
+sub list_objects : Local {
+    my ($self, $c, $otype) = @_;
+    $c->stash->{ofilter} = $c->model('AttrFilter', $otype);
+}
+
 sub end : Private {
     my ( $self, $c ) = @_;
Index: trunk/LATMOS-Accounts-Web/lib/LATMOS/Accounts/Web/Controller/Aliases.pm
===================================================================
--- trunk/LATMOS-Accounts-Web/lib/LATMOS/Accounts/Web/Controller/Aliases.pm	(revision 1080)
+++ trunk/LATMOS-Accounts-Web/lib/LATMOS/Accounts/Web/Controller/Aliases.pm	(revision 1081)
@@ -25,28 +25,5 @@
     my ( $self, $c ) = @_;
 
-    my $db = $c->model('Accounts')->db;
-    my @al = $c->req->param('al');
-    my @name = $c->req->param('name');
-    my @forward = $c->req->param('forward');
-    $c->stash->{page}{title} = "Gestion des alias";
-    foreach my $idx (0 .. scalar(@name) - 1) {
-
-        if ($c->req->param('del' . ($idx+1))) {
-            $db->delete_object('aliases', $al[$idx]);
-        } elsif ($al[$idx] ne $name[$idx]) {
-            # delete old, create new
-            $db->delete_c_object('aliases', $al[$idx]) if($al[$idx]);
-            $db->create_c_object('aliases', $name[$idx],
-                forward => [ split(/\s*,\s*/, $forward[$idx]) ],
-            );
-        } else {
-            my $obj = $db->get_object('aliases', $al[$idx]);
-            $obj->set_c_fields(
-                'forward' => [ split(/\s*,\s*/, $forward[$idx]) ],
-            );
-        }
-    }
-
-    $db->commit;
+    $c->stash->{ofilter} = $c->model('AttrFilter', 'aliases');
 }
 
Index: trunk/LATMOS-Accounts-Web/lib/LATMOS/Accounts/Web/Controller/Users.pm
===================================================================
--- trunk/LATMOS-Accounts-Web/lib/LATMOS/Accounts/Web/Controller/Users.pm	(revision 1080)
+++ trunk/LATMOS-Accounts-Web/lib/LATMOS/Accounts/Web/Controller/Users.pm	(revision 1081)
@@ -26,24 +26,4 @@
 
     $c->stash->{ofilter} = $c->model('AttrFilter', 'user');
-    my $start = $c->req->param('start');
-    $c->stash->{uparams} = { %{ $c->req->params || {} } };
-    my %initials;
-    my @userlist;
-    foreach (map { $_->id } @{ $c->stash->{objectslist} }) {
-        $initials{substr($_, 0, 1)} = 1;
-        if ($start) {
-            if (index($_, $start) == 0) {
-                push(@userlist, $_);
-            }
-        }
-    }
-    if (@{ $c->stash->{objectslist} } < 20) {
-        @userlist = map { $_->id } @{ $c->stash->{objectslist} };
-    } else {
-        $c->stash->{initials} = [ sort keys %initials ];
-    }
-    $c->stash->{page}{title} = 'Listes des utilisateurs (' . scalar(@{
-                $c->stash->{objectslist} }) . ')';
-    $c->stash->{userslist} = \@userlist;
 }
 
Index: trunk/LATMOS-Accounts-Web/lib/LATMOS/Accounts/Web/Model/AttrFilter.pm
===================================================================
--- trunk/LATMOS-Accounts-Web/lib/LATMOS/Accounts/Web/Model/AttrFilter.pm	(revision 1080)
+++ trunk/LATMOS-Accounts-Web/lib/LATMOS/Accounts/Web/Model/AttrFilter.pm	(revision 1081)
@@ -21,4 +21,5 @@
     nethost => [ qw(name cname otherName ip macaddr owner serialNumber) ],
     netzone => [ qw(net group type site) ],
+    aliases => [ qw(as) ],
 };
 
@@ -37,20 +38,47 @@
         otype => $otype,
     } unless($c->stash->{filter});
-    if (exists($c->req->params->{'attr'})) {
+    $c->stash->{ofilter} = bless($new, __PACKAGE__);
+
+    $c->stash->{db} ||= $c->model('Accounts')->db; # need in stash ?
+    my $base = $c->stash->{db};
+
+    my @objlist = ();
+    if ($c->req->params->{'q'}) {
+        my %objs;
+        foreach my $attr (@{ $c->config->{objects}{$otype}{quick_search} || [ 'cn' ]}) {
+            foreach ($base->search_objects(
+                    $otype, "$attr~" . $c->req->params->{'q'})) {
+                $objs{$_} = 1;
+            }
+            @objlist = sort keys %objs;
+        }
+    } elsif (exists($c->req->params->{'attr'})) {
         $c->stash->{filter}{'attr'} = [ $c->req->param('attr') ];
         $c->stash->{filter}{'attrval'} = [ $c->req->param('attrval') ];
+        my @filter = $c->stash->{ofilter}->filter;
+        @objlist = $base->search_objects($otype, @filter);
+    } else {
+        @objlist = $base->list_objects($otype);
     }
-    
-    $c->stash->{ofilter} = bless($new, __PACKAGE__);
-    $c->stash->{db} ||= $c->model('Accounts')->db;
-    my $base = $c->stash->{db};
 
-    my @filter = $c->stash->{ofilter}->filter;
     $c->stash->{objectslist} = [
         map { $base->get_object($otype, $_) }
-        (@filter
-            ? ($base->search_objects($otype, @filter) )
-            : ($base->list_objects($otype) ))
+         @objlist
     ];
+
+    my $start = $c->req->param('start');
+    $c->stash->{uparams} = { %{ $c->req->params || {} } };
+    my %initials;
+    my @sublist;
+    foreach (@{ $c->stash->{objectslist} }) {
+        $initials{substr($_->id, 0, 1)} = 1;
+        if ($start) {
+            if (index($_->id, $start) == 0) {
+                push(@sublist, $_);
+            }
+        }
+    }
+    $c->stash->{sublist} = [ @sublist ];
+    $c->stash->{initials} = [ sort keys %initials ];
 
     $c->stash->{ofilter}
Index: trunk/LATMOS-Accounts-Web/lib/LATMOS/Accounts/Web/View/TTpart.pm
===================================================================
--- trunk/LATMOS-Accounts-Web/lib/LATMOS/Accounts/Web/View/TTpart.pm	(revision 1080)
+++ trunk/LATMOS-Accounts-Web/lib/LATMOS/Accounts/Web/View/TTpart.pm	(revision 1081)
@@ -10,4 +10,5 @@
     LATMOS::Accounts::Web->path_to( 'root', 'html' ),
     ],
+    PRE_PROCESS  => 'includes/defs.tt',
 );
 
Index: trunk/LATMOS-Accounts-Web/root/html/admin/index.tt
===================================================================
--- trunk/LATMOS-Accounts-Web/root/html/admin/index.tt	(revision 1080)
+++ trunk/LATMOS-Accounts-Web/root/html/admin/index.tt	(revision 1081)
@@ -6,4 +6,58 @@
 
 <div class="pmenu">
+
+
+<span>
+    <a href="[% c.uri_for('/users') %]"
+    onMouseOver="document.getElementById('menui').innerHTML='Liste des utilisateurs';"
+    onMouseOut="resetmenu();"
+    >
+    <img title="Utilisateurs" src="[% c.uri_for('/static', 'icons', 'avatar-default.png') %]"></a>
+[% IF c.model('Accounts').db.check_acl('user', '@CREATE', 'w') %]
+    <a href="[% c.uri_for('/create', 'user') %]"
+    onMouseOver="document.getElementById('menui').innerHTML='CrÃ©er un utilisateur';"
+    onMouseOut="resetmenu();"
+    >
+    <img title="Ajouter un utilisateurs" src="[% c.uri_for('/static', 'icons', 'add.png') %]"></a>
+[% END %]
+</span>
+<span>
+    <a href="[% c.uri_for('/groups') %]"
+    onMouseOver="document.getElementById('menui').innerHTML='Liste des groupes';"
+    onMouseOut="resetmenu();"
+    >
+    <img title="Groupes" src="[% c.uri_for('/static', 'icons', 'system-users.png') %]"></a>
+[% IF c.model('Accounts').db.check_acl('group', '@CREATE', 'w') %]
+    <a href="[% c.uri_for('/create', 'group') %]"
+    onMouseOver="document.getElementById('menui').innerHTML='CrÃ©er un groupe';"
+    onMouseOut="resetmenu();"
+    >
+    <img title="Ajouter un groupe" src="[% c.uri_for('/static', 'icons', 'add.png') %]"></a>
+[% END %]
+</span>
+<span>
+    <a href="[% c.uri_for('/nethosts') %]"
+    onMouseOver="document.getElementById('menui').innerHTML='Liste des hÃŽtes rÃ©seau';"
+    onMouseOut="resetmenu();"
+    >
+    <img title="HÃŽtes rÃ©seau" src="[% c.uri_for('/static', 'icons', 'video-display.png') %]"></a>
+[% IF c.model('Accounts').db.check_acl('nethost', '@CREATE', 'w') %]
+    <a href="[% c.uri_for('/create', 'nethost') %]"
+    onMouseOver="document.getElementById('menui').innerHTML='Ajouter un hote rÃ©seau';"
+    onMouseOut="resetmenu();"
+    >
+    <img title="Ajouter un hÃŽte rÃ©seau" src="[% c.uri_for('/static', 'icons', 'add.png') %]"></a>
+[% END %]
+</span>
+[% IF 0 %]
+<span>
+    <a href="[% c.uri_for('/summary/offices') %]"
+    onMouseOver="document.getElementById('menui').innerHTML='Annuaires';"
+    onMouseOut="resetmenu();"
+    >
+    <img title="Annuaires" src="[% c.uri_for('/static', 'icons', 'logviewer.png') %]"></a>
+</span>
+[% END %]
+
 
 <span>
Index: trunk/LATMOS-Accounts-Web/root/html/ajax/list_objects.tt
===================================================================
--- trunk/LATMOS-Accounts-Web/root/html/ajax/list_objects.tt	(revision 1081)
+++ trunk/LATMOS-Accounts-Web/root/html/ajax/list_objects.tt	(revision 1081)
@@ -0,0 +1,3 @@
+<!-- $Id$ -->
+
+[% INCLUDE 'includes/list_objects.tt' %]
Index: trunk/LATMOS-Accounts-Web/root/html/aliases/index.tt
===================================================================
--- trunk/LATMOS-Accounts-Web/root/html/aliases/index.tt	(revision 1080)
+++ trunk/LATMOS-Accounts-Web/root/html/aliases/index.tt	(revision 1081)
@@ -1,45 +1,10 @@
 <!-- $Id$ -->
-
-<div style="border: outset; padding: 0.5em; float:left">
-[% IF c.model('Accounts').db.check_acl('aliases', 'forward', 'w') %]
-<table border=1>
-<tr><td valign="top">
-<form action="[% c.uri_for() %]" method="POST">
-<p>Filtre:</p>
-<input type="text" name="filter" value="[% c.req.param('filter') | html %]"><br>
-<input type="submit">
-</form>
-</td>
-[% IF c.model('Accounts').db.check_acl('aliases', '@CREATE', 'w') %]
-<td valign="top">
-<p>CrÃ©er un alias</p>
-<form action="[% c.uri_for() %]" method="POST">
-<input type="hidden" name="filter" value="[% c.req.param('filter') | html %]">
-<table>
-<tr><th>Nom:</th><td><input type="text" name="name" id="newal">
-<span style="display:none" id="newalind">Searching...</span>
-<span id="span_newval"></span><br>
-[% c.prototype.observe_field('newal', {
-    url => c.uri_for('/ajax', 'objexist', 'aliases'),
-    with   => "'val='+value+ '&attr=forward'",
-    update => 'span_newval',
-    frequency => 1,
-    min_chars => 1,
-    indicator => 'newalind',
-}) %]
-</td></tr>
-<tr><th>renvois vers:</th><td><input type="text" name="forward"></td></tr>
-<tr><td></td><td><input type="submit" value="crÃ©er"></td></tr>
-</table>
-</form>
-</td>
-[% END %]
-</tr>
-</table>
+<div id="filter">
+[% INCLUDE 'includes/filter.tt'
+   formuri = c.uri_for()
+%]
 </div>
 
-[% ELSE %]
-<p>Vous n'avez pas la permission d'acceder Ã  cette page.</p>
-[% END %] [% # ACLS %]
-
-[% INCLUDE 'includes/aliases_list.tt' %]
+<div id="list_objects">
+[% INCLUDE 'includes/list_objects.tt' %]
+</div>
Index: trunk/LATMOS-Accounts-Web/root/html/groups/default.tt
===================================================================
--- trunk/LATMOS-Accounts-Web/root/html/groups/default.tt	(revision 1080)
+++ trunk/LATMOS-Accounts-Web/root/html/groups/default.tt	(revision 1081)
@@ -4,5 +4,5 @@
 [% ELSE %]
     
-[% INCLUDE 'groups/menu.tt' %]
+[% INCLUDE 'groups/object_header.tt' %]
 
 <div class="objectform" id="objectform">
Index: trunk/LATMOS-Accounts-Web/root/html/groups/dpmt.tt
===================================================================
--- trunk/LATMOS-Accounts-Web/root/html/groups/dpmt.tt	(revision 1080)
+++ trunk/LATMOS-Accounts-Web/root/html/groups/dpmt.tt	(revision 1081)
@@ -4,5 +4,5 @@
 [% ELSE %]
 
-[% INCLUDE 'groups/menu.tt' %]
+[% INCLUDE 'groups/object_header.tt' %]
 
 <div class="objectform" id="objectform">
Index: trunk/LATMOS-Accounts-Web/root/html/groups/index.tt
===================================================================
--- trunk/LATMOS-Accounts-Web/root/html/groups/index.tt	(revision 1080)
+++ trunk/LATMOS-Accounts-Web/root/html/groups/index.tt	(revision 1081)
@@ -1,28 +1,10 @@
-[% db = c.model('Accounts').db %]
-<!-- $Id -->
-<div style="float: right" id="filter">
+<!-- $Id$ -->
+<div id="filter">
 [% INCLUDE 'includes/filter.tt'
    formuri = c.uri_for()
-   otype = 'group'
 %]
 </div>
 
-<table border="0">
-<tr><td colspan="2">[% groupslist.size %] groupes</td></tr>
-<tr><th>Nom</th><th>Description</th><th></th></tr>
-[% FOREACH groupname = groupslist %]
-[% group = db.get_object('group', groupname) %]
-<tr>
-    <td><a href="[% c.uri_for('/groups', groupname) %]">
-        <img src="[% c.uri_for('/static', 'icons', 'icon_edit.png') %]"
-            height="16" width="16"
-            alt="[% "edit " _ groupname | html %]"></a>
-    [% group.id | html %]</td>
-    <td>
-    <span title="[% group.get_c_field('description') | html %]">
-    [% group.get_c_field('description') | truncate(30) | html %]
-    </span>
-    </td>
-</tr>
-[% END %]
-</table>
+<div id="list_objects">
+[% INCLUDE 'includes/list_objects.tt' %]
+</div>
Index: trunk/LATMOS-Accounts-Web/root/html/groups/menu.tt
===================================================================
--- trunk/LATMOS-Accounts-Web/root/html/groups/menu.tt	(revision 1080)
+++ trunk/LATMOS-Accounts-Web/root/html/groups/menu.tt	(revision 1081)
@@ -1,24 +1,17 @@
 <!-- $Id$ -->
-[% INCLUDE 'includes/obj_prev_next.tt' objtype='group' objname=groupname %]
 
-<div id="oinfo">
-    <div id="oinfo_icons">
-    <img src="[% c.uri_for('/static', 'icons', 'user-group-properties.png') %]"
-    alt="[% "Groupe " _ groupname %]">
-    </div>
+[% IF groupname %]
+<h3>
+<a href="[% c.uri_for(groupname) %]">GÃ©rer le groupe [% username | html
+%]</a>
+</h3>
 
-    <div id="oinfo_label">
-    <p id="oname">[% groupname | html %]</p>
-    [% group.get_c_field('description') | html %]
-    </div>
-</div>
-<div id="oinfo_close"></div>
+<ul>
+        <li><a href="[% c.uri_for(groupname) %]"><span [% 'id="oactive"' IF subform == '' %]>SystÃšme</span></a></li>
+        <li><a href="[% c.uri_for(groupname, 'users') %]"><span [% 'id="oactive"' IF subform == 'users' %]>Utilisateurs</span></a></li>
+[% IF group.get_attributes('sutype') == 'dpmt' %]<li>
+        <li><a href="[% c.uri_for(groupname, 'dpmt') %]"><span [% 'id="oactive"' IF subform == 'dpmt' %]>DÃ©partement</span></a></li>
+[% END %]
+</ul>
 
-<div id="omenu">
-        <a href="[% c.uri_for(groupname) %]"><span [% 'id="oactive"' IF subform == '' %]>SystÃšme</span></a>
-        <a href="[% c.uri_for(groupname, 'users') %]"><span [% 'id="oactive"' IF subform == 'users' %]>Utilisateurs</span></a>
-[% IF group.get_attributes('sutype') == 'dpmt' %]
-        <a href="[% c.uri_for(groupname, 'dpmt') %]"><span [% 'id="oactive"' IF subform == 'dpmt' %]>DÃ©partement</span></a>
 [% END %]
-</div>
-<div style="clear: both;"></div>
Index: trunk/LATMOS-Accounts-Web/root/html/groups/object_header.tt
===================================================================
--- trunk/LATMOS-Accounts-Web/root/html/groups/object_header.tt	(revision 1081)
+++ trunk/LATMOS-Accounts-Web/root/html/groups/object_header.tt	(revision 1081)
@@ -0,0 +1,24 @@
+<!-- $Id$ -->
+[% INCLUDE 'includes/obj_prev_next.tt' objtype='group' objname=groupname %]
+
+<div id="oinfo">
+    <div id="oinfo_icons">
+    <img src="[% c.uri_for('/static', 'icons', 'user-group-properties.png') %]"
+    alt="[% "Groupe " _ groupname %]">
+    </div>
+
+    <div id="oinfo_label">
+    <p id="oname">[% groupname | html %]</p>
+    [% group.get_c_field('description') | html %]
+    </div>
+</div>
+<div id="oinfo_close"></div>
+
+<div id="omenu">
+        <a href="[% c.uri_for(groupname) %]"><span [% 'id="oactive"' IF subform == '' %]>SystÃšme</span></a>
+        <a href="[% c.uri_for(groupname, 'users') %]"><span [% 'id="oactive"' IF subform == 'users' %]>Utilisateurs</span></a>
+[% IF group.get_attributes('sutype') == 'dpmt' %]
+        <a href="[% c.uri_for(groupname, 'dpmt') %]"><span [% 'id="oactive"' IF subform == 'dpmt' %]>DÃ©partement</span></a>
+[% END %]
+</div>
+<div style="clear: both;"></div>
Index: trunk/LATMOS-Accounts-Web/root/html/groups/users.tt
===================================================================
--- trunk/LATMOS-Accounts-Web/root/html/groups/users.tt	(revision 1080)
+++ trunk/LATMOS-Accounts-Web/root/html/groups/users.tt	(revision 1081)
@@ -7,5 +7,5 @@
 NOT group.attribute('memberUID').ro %]
 
-[% INCLUDE 'groups/menu.tt' %]
+[% INCLUDE 'groups/object_header.tt' %]
 
 <div class="objectform" id="objectform">
Index: trunk/LATMOS-Accounts-Web/root/html/includes/adv_filter.tt
===================================================================
--- trunk/LATMOS-Accounts-Web/root/html/includes/adv_filter.tt	(revision 1081)
+++ trunk/LATMOS-Accounts-Web/root/html/includes/adv_filter.tt	(revision 1081)
@@ -0,0 +1,23 @@
+<!-- $Id$ -->
+[% IF ofilter %]
+<p>Filtre:</p>
+<form action="[% c.action.namespace %]" method="POST">
+<input type="hidden" name="otype" value="[% otype | html %]">
+[% FOREACH item = ofilter.count_field %]
+[% IF loop.first %]
+<table border="0">
+<tr><th>Champs</th><th>contient:</th></tr>
+[% END %]
+<tr>
+<td>
+[% ofilter.search_field(item) %]
+</td>
+<td>[% ofilter.val_field(item) %]</td></tr>
+[% IF loop.last %]
+</table>
+[% END %]
+[% END %]
+
+<input type="submit">
+</form>
+[% END %]
Index: trunk/LATMOS-Accounts-Web/root/html/includes/defs.tt
===================================================================
--- trunk/LATMOS-Accounts-Web/root/html/includes/defs.tt	(revision 1081)
+++ trunk/LATMOS-Accounts-Web/root/html/includes/defs.tt	(revision 1081)
@@ -0,0 +1,31 @@
+
+[% perm_denied = BLOCK %]
+<span class="permdenied"><img src="[% c.uri_for('/static', 'images', 'process-stop.png') %]">
+    permission non accordÃ©
+</span>
+[% END %]
+
+[% BLOCK user_flag %]
+[% INCLUDE object_flag object = ouser %]
+[% END %]
+
+[% BLOCK object_flag %]
+[% IF object.type == 'user' %]
+    [% IF object.get_attributes('unexported') %]
+<img src="[% c.uri_for('/static', 'icons', 'gtk-delete.png') %]"
+class="notice" title="Ce compte est dÃ©sactivÃ©" alt="disable">
+    [% ELSIF object.get_attributes('expired') %]
+<img src="[% c.uri_for('/static', 'icons', 'emblem-urgent.png') %]"
+class="notice" title="Ce compte est expirÃ© ([% object.get_attributes('expired') %])" alt="expired">
+    [% ELSIF object.get_attributes('expire') %]
+<img src="[% c.uri_for('/static', 'icons', 'appointment-new.png') %]"
+class="notice" title="Ce compte est temporaire ([% object.get_attributes('expire') %])" alt="temporary">
+    [% END %]
+[% ELSE %]
+    [% IF object.get_attributes('unexported') %]
+<img src="[% c.uri_for('/static', 'icons', 'gtk-delete.png') %]"
+class="notice" title="Cette entrÃ©e est dÃ©sactivÃ©s" alt="disable">
+    [% END %]
+[% END %]
+[% END %]
+
Index: trunk/LATMOS-Accounts-Web/root/html/includes/filter.tt
===================================================================
--- trunk/LATMOS-Accounts-Web/root/html/includes/filter.tt	(revision 1080)
+++ trunk/LATMOS-Accounts-Web/root/html/includes/filter.tt	(revision 1081)
@@ -1,23 +1,18 @@
 <!-- $Id$ -->
 [% IF ofilter %]
-<p>Filtre:</p>
 <form action="[% c.action.namespace %]" method="POST">
-<input type="hidden" name="otype" value="[% otype | html %]">
-[% FOREACH item = ofilter.count_field %]
-[% IF loop.first %]
-<table border="0">
-<tr><th>Champs</th><th>contient:</th></tr>
-[% END %]
-<tr>
-<td>
-[% ofilter.search_field(item) %]
-</td>
-<td>[% ofilter.val_field(item) %]</td></tr>
-[% IF loop.last %]
-</table>
-[% END %]
-[% END %]
-
+Filtre:
+<input name=q value="[% c.req.param('q') | html %]" id="q"> 
 <input type="submit">
 </form>
+
+<span style="display:none" id="list_objects_ind">Searching...</span>
+[% c.prototype.observe_field('q', {
+    url => c.uri_for('/ajax', 'list_objects', ofilter.otype),
+    with   => "'q='+value",
+    update => 'list_objects',
+    frequency => 1,
+    before => "document.getElementById('list_objects_ind').style.display='block';",
+    loaded => "document.getElementById('list_objects_ind').style.display='none';",
+}) %]
 [% END %]
Index: trunk/LATMOS-Accounts-Web/root/html/includes/header.tt
===================================================================
--- trunk/LATMOS-Accounts-Web/root/html/includes/header.tt	(revision 1080)
+++ trunk/LATMOS-Accounts-Web/root/html/includes/header.tt	(revision 1081)
@@ -28,33 +28,5 @@
 </head>
 
-[% perm_denied = BLOCK %]
-<span class="permdenied"><img src="[% c.uri_for('/static', 'images', 'process-stop.png') %]">
-    permission non accordÃ©
-</span>
-[% END %]
-
-[% BLOCK user_flag %]
-[% INCLUDE object_flag object = ouser %]
-[% END %]
-
-[% BLOCK object_flag %]
-[% IF object.type == 'user' %]
-    [% IF object.get_attributes('unexported') %]
-<img src="[% c.uri_for('/static', 'icons', 'gtk-delete.png') %]"
-class="notice" title="Ce compte est dÃ©sactivÃ©" alt="disable">
-    [% ELSIF object.get_attributes('expired') %]
-<img src="[% c.uri_for('/static', 'icons', 'emblem-urgent.png') %]"
-class="notice" title="Ce compte est expirÃ© ([% object.get_attributes('expired') %])" alt="expired">
-    [% ELSIF object.get_attributes('expire') %]
-<img src="[% c.uri_for('/static', 'icons', 'appointment-new.png') %]"
-class="notice" title="Ce compte est temporaire ([% object.get_attributes('expire') %])" alt="temporary">
-    [% END %]
-[% ELSE %]
-    [% IF object.get_attributes('unexported') %]
-<img src="[% c.uri_for('/static', 'icons', 'gtk-delete.png') %]"
-class="notice" title="Cette entrÃ©e est dÃ©sactivÃ©s" alt="disable">
-    [% END %]
-[% END %]
-[% END %]
+[% PROCESS 'includes/defs.tt' %]
 
 <body>
@@ -71,111 +43,8 @@
 </h1>
 
-<div id="mainmenu" style="clear: both;">
-    <div style="float: left">
-        <span>
-            <a href="[% c.uri_for('/users') %]"
-            onMouseOver="document.getElementById('menui').innerHTML='Liste des utilisateurs';"
-            onMouseOut="resetmenu();"
-            >
-            <img title="Utilisateurs" src="[% c.uri_for('/static', 'icons', 'avatar-default.png') %]"></a>
-        [% IF c.model('Accounts').db.check_acl('user', '@CREATE', 'w') %]
-            <a href="[% c.uri_for('/create', 'user') %]"
-            onMouseOver="document.getElementById('menui').innerHTML='CrÃ©er un utilisateur';"
-            onMouseOut="resetmenu();"
-            >
-            <img title="Ajouter un utilisateurs" src="[% c.uri_for('/static', 'icons', 'add.png') %]"></a>
-        [% END %]
-        </span>
-        <span>
-            <a href="[% c.uri_for('/groups') %]"
-            onMouseOver="document.getElementById('menui').innerHTML='Liste des groupes';"
-            onMouseOut="resetmenu();"
-            >
-            <img title="Groupes" src="[% c.uri_for('/static', 'icons', 'system-users.png') %]"></a>
-        [% IF c.model('Accounts').db.check_acl('group', '@CREATE', 'w') %]
-            <a href="[% c.uri_for('/create', 'group') %]"
-            onMouseOver="document.getElementById('menui').innerHTML='CrÃ©er un groupe';"
-            onMouseOut="resetmenu();"
-            >
-            <img title="Ajouter un groupe" src="[% c.uri_for('/static', 'icons', 'add.png') %]"></a>
-        [% END %]
-        </span>
-        <span>
-            <a href="[% c.uri_for('/nethosts') %]"
-            onMouseOver="document.getElementById('menui').innerHTML='Liste des hÃŽtes rÃ©seau';"
-            onMouseOut="resetmenu();"
-            >
-            <img title="HÃŽtes rÃ©seau" src="[% c.uri_for('/static', 'icons', 'video-display.png') %]"></a>
-        [% IF c.model('Accounts').db.check_acl('nethost', '@CREATE', 'w') %]
-            <a href="[% c.uri_for('/create', 'nethost') %]"
-            onMouseOver="document.getElementById('menui').innerHTML='Ajouter un hote rÃ©seau';"
-            onMouseOut="resetmenu();"
-            >
-            <img title="Ajouter un hÃŽte rÃ©seau" src="[% c.uri_for('/static', 'icons', 'add.png') %]"></a>
-        [% END %]
-        </span>
-        <span>
-            <a href="[% c.uri_for('/summary/offices') %]"
-            onMouseOver="document.getElementById('menui').innerHTML='Annuaires';"
-            onMouseOut="resetmenu();"
-            >
-            <img title="Annuaires" src="[% c.uri_for('/static', 'icons', 'logviewer.png') %]"></a>
-        </span>
-        <span>
-            <a href="[% c.uri_for('/admin') %]"
-            onMouseOver="document.getElementById('menui').innerHTML='Administrer...';"
-            onMouseOut="resetmenu();"
-            >
-            <img title="Administrer..." src="[% c.uri_for('/static', 'icons', 'gtk-execute.png') %]"></a>
-        </span>
-        <span>
-            <a href="[% c.uri_for('/about') %]"
-            onMouseOver="document.getElementById('menui').innerHTML='A propos...';"
-            onMouseOut="resetmenu();"
-            >
-            <img title="A propos..." src="[% c.uri_for('/static', 'icons', 'gtk-about.png') %]"></a>
-        </span>
-    </div>
-
-    [% IF c.user.username %]
-    <div style="float: right">
-        <span>
-            <a href="[% c.uri_for('/users', c.user.username) %]"
-            onMouseOver="document.getElementById('menui').innerHTML='Mon profile';"
-            onMouseOut="resetmenu();"
-            >
-            <img title="Mon profile" src="[% c.uri_for('/static', 'icons', 'gtk-home.png') %]"></a>
-        </span>
-        <span>
-            <a href="[% c.uri_for('/users', c.user.username, 'passwd') %]"
-            onMouseOver="document.getElementById('menui').innerHTML='Changer mon mot de passe';"
-            onMouseOut="resetmenu();"
-            >
-            <img title="Changer mon mot de passe" src="[% c.uri_for('/static',
-            'icons', 'dialog-password.png') %]"></a>
-        </span>
-        <span>
-            [% luri = c.uri_for('/logout') %]
-            [% luri.userinfo(c.user.username _ ':x') %]
-            <a href="[% luri %]"
-            onMouseOver="document.getElementById('menui').innerHTML='Se dÃ©connecter';"
-            onMouseOut="resetmenu();"
-            >
-            <img title="Se dÃ©connecter" src="[% c.uri_for('/static',
-                    'icons', 'gtk-close.png') %]"></a>
-        </span>
-    </div>
-    [% END %]
-</div>
-
-<div style="clear: both">
-    [% IF c.user.username %]
-    <span id="login_name" style="float: right;">
-    Vous Ãªtes: [% c.user.username | html %]
-    </span>
-    [% END %]
-</div>
-
-<p style="clear:both;">&gt; <span id="menui">[% page.title | html %]</span></p>
+<a href="[% c.uri_for('/users', c.user.username) %]">Ma page</a>
+::
+<a href="[% c.uri_for('/users', c.user.username, 'passwd') %]">Changer mon mot de passe</a>
+::
 
 </div><!-- #header -->
Index: trunk/LATMOS-Accounts-Web/root/html/includes/list_objects.tt
===================================================================
--- trunk/LATMOS-Accounts-Web/root/html/includes/list_objects.tt	(revision 1081)
+++ trunk/LATMOS-Accounts-Web/root/html/includes/list_objects.tt	(revision 1081)
@@ -0,0 +1,52 @@
+
+[% IF objectslist.size > 20 %]
+
+[% FOREACH initial = initials %]
+[% IF c.req.param('start') == initial %]
+< [% initial %] >
+[% ELSE %]
+[% uparams.start = initial %]
+<a href="[% c.uri_for('', uparams) %]">[% initial %]</a>
+[% END %]
+[% END %]
+
+[% END %]
+
+[% otype = ofilter.otype %]
+[% attrs = c.config.objects.$otype.list %]
+[% IF NOT attrs %][% attrs = [ 'cn' ] %][% END %]
+
+<table border=0>
+<tr>
+<td></td>
+<th>Nom</th>
+[% FOREACH attr = attrs %]
+<th>[% attr | html %]</th>
+[% END %]
+</tr>
+
+[% IF c.req.param('start') %]
+[% objectslist = sublist %]
+[% END %]
+
+[% IF objectslist.size < 20 %]
+[% FOREACH object = objectslist %]
+<tr>
+    <td>
+    [% INCLUDE object_flag object = object %]
+    </td>
+    <td><a href="[% c.uri_for(object.id) %]">
+        <img src="[% c.uri_for('/static', 'icons', 'icon_edit.png') %]"
+            height="16" width="16"
+            alt="[% "edit " _ object.id | html %]"></a>
+    [% object.id | html %]</td>
+
+[% FOREACH attr = attrs %]
+<td>[% object.get_attributes(attr) | html %]</td>
+[% END %]
+</tr>
+[% END %]
+[% END %]
+
+</table>
+
Index: trunk/LATMOS-Accounts-Web/root/html/includes/sidebar.tt
===================================================================
--- trunk/LATMOS-Accounts-Web/root/html/includes/sidebar.tt	(revision 1080)
+++ trunk/LATMOS-Accounts-Web/root/html/includes/sidebar.tt	(revision 1081)
@@ -1,3 +1,2 @@
-
 [% FOREACH h = c.model('Accounts').db.search_objects('accreq', 'exported=*') %]
 [% IF loop.first %]
@@ -15,2 +14,6 @@
 [% END %]
 [% END %]
+
+<h3><a href="[% c.uri_for('/admin')
+%]">Administration...</a></li>
+</h3>
Index: trunk/LATMOS-Accounts-Web/root/html/nethosts/default.tt
===================================================================
--- trunk/LATMOS-Accounts-Web/root/html/nethosts/default.tt	(revision 1080)
+++ trunk/LATMOS-Accounts-Web/root/html/nethosts/default.tt	(revision 1081)
@@ -4,5 +4,5 @@
 [% ELSE %]
     
-[% INCLUDE 'nethosts/menu.tt' %]
+[% INCLUDE 'nethosts/object_header.tt' %]
 
 <div class="objectformleft" id="objectform">
Index: trunk/LATMOS-Accounts-Web/root/html/nethosts/index.tt
===================================================================
--- trunk/LATMOS-Accounts-Web/root/html/nethosts/index.tt	(revision 1080)
+++ trunk/LATMOS-Accounts-Web/root/html/nethosts/index.tt	(revision 1081)
@@ -1,49 +1,10 @@
-[% db = c.model('Accounts').db %]
-<!-- $Id -->
-<div style="float: right" id="filter">
+<!-- $Id$ -->
+<div id="filter">
 [% INCLUDE 'includes/filter.tt'
    formuri = c.uri_for()
-   otype = 'nethost'
 %]
 </div>
 
-<table border="0">
-<tr><td colspan="3">
-[% IF initials %]
-Pages:
-[% FOREACH initial = initials %]
-[% IF c.req.param('start') == initial %]
-< [% initial %] >
-[% ELSE %]
-[% uparams.start = initial %]
-<a href="[% c.uri_for('/nethosts', uparams) %]">[% initial %]</a>
-[% END %]
-[% END %]
-[% END %]
-</td></tr>
-<tr><td></td><th>Nom</th><th>Description</th></tr>
-[% FOREACH nethostname = nethostlist %]
-[% nethost = db.get_object('nethost', nethostname) %]
-<tr>
-    <td>
-[% INCLUDE 'object_flag' object=nethost %]
-    </td>
-    <td>
-    <a href="[% c.uri_for('/nethosts', nethostname) %]">
-    <img src="[% c.uri_for('/static', 'icons', 'icon_edit.png') %]"
-      height="16" width="16"
-      alt="[% "edit " _ nethostname | html %]"></a>
-    [% username | html %]
-    [% nethostname | html %]
-    [% IF nethost.get_attributes('owner') %]
-    (<a href="[% c.uri_for('/users', nethost.get_attributes('owner')) %]">[% nethost.get_attributes('owner') %]</a>)
-    [% END %]
-    </td>
-    <td>
-    <span title="[% nethost.get_attributes('description') | html %]">
-    [% nethost.get_attributes('description') | truncate(20) | html %]
-    </span>
-    </td>
-</tr>
-[% END %]
-</table>
+<div id="list_objects">
+[% INCLUDE 'includes/list_objects.tt' %]
+</div>
Index: trunk/LATMOS-Accounts-Web/root/html/nethosts/menu.tt
===================================================================
--- trunk/LATMOS-Accounts-Web/root/html/nethosts/menu.tt	(revision 1080)
+++ trunk/LATMOS-Accounts-Web/root/html/nethosts/menu.tt	(revision 1081)
@@ -1,21 +1,2 @@
 <!-- $Id$ -->
 
-[% INCLUDE 'includes/obj_prev_next.tt' objtype='nethost' objname=nethostname %]
-
-<div id="oinfo">
-    <div id="oinfo_icons">
-    [% IF NOT nethost.get_c_field('exported') %]
-    <img src="[% c.uri_for('/static', 'icons', 'gtk-delete.png') %]"
-    alt="[% "HÃŽte " _ nethostname %]" title="l'entrÃ©e est dÃ©sactivÃ©e">
-    [% ELSE %]
-    <img src="[% c.uri_for('/static', 'icons', 'preferences-desktop-wallpaper.png') %]"
-    alt="[% "Ordinateur " _ nethostname %]">
-    [% END %]
-    </div>
-
-    <div id="ofino_label">   
-    <p id="oname">[% nethostname | html %]</p>
-    [% nethost.get_c_field('description') | html %]
-    </div>
-</div>
-<div id="oinfo_close"></div>
Index: trunk/LATMOS-Accounts-Web/root/html/nethosts/object_header.tt
===================================================================
--- trunk/LATMOS-Accounts-Web/root/html/nethosts/object_header.tt	(revision 1081)
+++ trunk/LATMOS-Accounts-Web/root/html/nethosts/object_header.tt	(revision 1081)
@@ -0,0 +1,21 @@
+<!-- $Id$ -->
+
+[% INCLUDE 'includes/obj_prev_next.tt' objtype='nethost' objname=nethostname %]
+
+<div id="oinfo">
+    <div id="oinfo_icons">
+    [% IF NOT nethost.get_c_field('exported') %]
+    <img src="[% c.uri_for('/static', 'icons', 'gtk-delete.png') %]"
+    alt="[% "HÃŽte " _ nethostname %]" title="l'entrÃ©e est dÃ©sactivÃ©e">
+    [% ELSE %]
+    <img src="[% c.uri_for('/static', 'icons', 'preferences-desktop-wallpaper.png') %]"
+    alt="[% "Ordinateur " _ nethostname %]">
+    [% END %]
+    </div>
+
+    <div id="ofino_label">   
+    <p id="oname">[% nethostname | html %]</p>
+    [% nethost.get_c_field('description') | html %]
+    </div>
+</div>
+<div id="oinfo_close"></div>
Index: trunk/LATMOS-Accounts-Web/root/html/netzones/default.tt
===================================================================
--- trunk/LATMOS-Accounts-Web/root/html/netzones/default.tt	(revision 1080)
+++ trunk/LATMOS-Accounts-Web/root/html/netzones/default.tt	(revision 1081)
@@ -4,5 +4,5 @@
 [% ELSE %]
     
-[% INCLUDE 'netzones/menu.tt' %]
+[% INCLUDE 'netzones/object_header.tt' %]
 
 <div class="objectformleft" id="objectform">
Index: trunk/LATMOS-Accounts-Web/root/html/netzones/index.tt
===================================================================
--- trunk/LATMOS-Accounts-Web/root/html/netzones/index.tt	(revision 1080)
+++ trunk/LATMOS-Accounts-Web/root/html/netzones/index.tt	(revision 1081)
@@ -1,59 +1,10 @@
-[% db = c.model('Accounts').db %]
-<!-- $Id -->
-<div style="float: right" id="filter">
+<!-- $Id$ -->
+<div id="filter">
 [% INCLUDE 'includes/filter.tt'
    formuri = c.uri_for()
-   otype = 'netzone'
 %]
 </div>
 
-[% IF c.req.param('attrval') %]
-[% FOREACH netzonename = netzonelist.sort %]
-[% IF loop.first %]
-<table>
-<tr><th colspan="2">[% netztype | html %]</th></tr>
-[% END %]
-<tr>
-    <td>[% netzonename | html %]</td>
-    <td>
-    <a href="[% c.uri_for('/netzones', netzonename) %]">
-        <img src="[% c.uri_for('/static', 'icons', 'icon_edit.png') %]"
-            height="16" width="16"
-            alt="[% "edit " _ netzonename | html %]"></a>
-    </td>
-</tr>
-[% IF loop.last %]
-</table>
-[% END %]
-[% END %]
-[% ELSE %]
-
-<table border="0">
-[% FOREACH netztype = [ 'dns', 'reverse', 'dhcp', 'puppet' ] %]
-[% netzonelist = db.search_objects('netzone', 'type=' _ netztype) %]
-[% FOREACH netzonename = netzonelist.sort %]
-[% netzone = db.get_object('netzone', netzonename) %]
-[% IF loop.first %]
-<tr><th colspan="2">[% netztype | ucfirst | html %]</th></tr>
-<tr><th>Nom</th><th>Description</th></tr>
-[% END %]
-<tr>
-    <td>
-    <a href="[% c.uri_for('/netzones', netzonename) %]">
-        <img src="[% c.uri_for('/static', 'icons', 'icon_edit.png') %]"
-            height="16" width="16"
-            alt="[% "edit " _ netzonename | html %]"></a>
-        [% netzonename | html %]
-    </td>
-    <td>
-        <span title="[% netzone.get_c_field('description') | html %]">
-        [% netzone.get_c_field('description') | truncate(20) | html %]
-        </span>
-    </td>
-</tr>
-[% IF loop.last %]
-[% END %]
-[% END %]
-[% END %]
-[% END %] [%# IF %]
-</table>
+<div id="list_objects">
+[% INCLUDE 'includes/list_objects.tt' %]
+</div>
Index: trunk/LATMOS-Accounts-Web/root/html/netzones/object_header.tt
===================================================================
--- trunk/LATMOS-Accounts-Web/root/html/netzones/object_header.tt	(revision 1081)
+++ trunk/LATMOS-Accounts-Web/root/html/netzones/object_header.tt	(revision 1081)
@@ -0,0 +1,15 @@
+<!-- $Id$ -->
+[% INCLUDE 'includes/obj_prev_next.tt' objtype='netzone' objname=netzonename %]
+
+<div id="oinfo">
+    <div id="oinfo_icons">
+    <img src="[% c.uri_for('/static', 'icons', 'preferences-desktop-wallpaper.png') %]"
+    alt="[% "Ordinateur " _ hostgroupname %]">
+    </div>
+    <div id="oinfo_label">
+    <p id="oname">[% netzonename | html %]</p>
+    <p>[% netzone.get_c_field('type') | html %]</p>
+    <p>[% netzone.get_c_field('description') | html %]</p>
+    </div>
+</div>
+<div id="oinfo_close"></div>
Index: trunk/LATMOS-Accounts-Web/root/html/sites/default.tt
===================================================================
--- trunk/LATMOS-Accounts-Web/root/html/sites/default.tt	(revision 1080)
+++ trunk/LATMOS-Accounts-Web/root/html/sites/default.tt	(revision 1081)
@@ -4,5 +4,5 @@
 [% ELSE %]
     
-[% INCLUDE 'sites/menu.tt' %]
+[% INCLUDE 'sites/object_header.tt' %]
 
 <div class="objectform" id="objectform">
Index: trunk/LATMOS-Accounts-Web/root/html/sites/index.tt
===================================================================
--- trunk/LATMOS-Accounts-Web/root/html/sites/index.tt	(revision 1080)
+++ trunk/LATMOS-Accounts-Web/root/html/sites/index.tt	(revision 1081)
@@ -1,26 +1,10 @@
-[% db = c.model('Accounts').db %]
-<!-- $Id -->
-<div style="float: right" id="filter">
+<!-- $Id$ -->
+<div id="filter">
 [% INCLUDE 'includes/filter.tt'
    formuri = c.uri_for()
-   otype = 'site'
 %]
 </div>
 
-<table border="0">
-<tr><td colspan="2">[% siteslist.size %] Sites</td></tr>
-<tr><th>Nom</th><th>Ville</th></tr>
-[% FOREACH sitename = siteslist %]
-[% site = db.get_object('site', sitename) %]
-<tr>
-    <td>[% sitename | html %]</td>
-    <td>
-        [% site.get_c_field('l') | html %]
-    <a href="[% c.uri_for('/sites', sitename) %]">
-        <img src="[% c.uri_for('/static', 'icons', 'arrow-right.png') %]"
-            height="16" width="16"
-            alt="[% "edit " _ sitename | html %]">
-    </a></td>
-</tr>
-[% END %]
-</table>
+<div id="list_objects">
+[% INCLUDE 'includes/list_objects.tt' %]
+</div>
Index: trunk/LATMOS-Accounts-Web/root/html/sites/object_header.tt
===================================================================
--- trunk/LATMOS-Accounts-Web/root/html/sites/object_header.tt	(revision 1081)
+++ trunk/LATMOS-Accounts-Web/root/html/sites/object_header.tt	(revision 1081)
@@ -0,0 +1,15 @@
+<!-- $Id$ -->
+
+[% INCLUDE 'includes/obj_prev_next.tt' objtype='site' objname=sitename %]
+
+<div id="oinfo">
+    <div id="oinfo_icons">
+    <img src="[% c.uri_for('/static', 'icons', 'user-properties.png') %]"
+    alt="[% "User " _ sitename %]">
+    </div>
+    <div id="oinfo_label">
+    <p id="oname">[% sitename | html %]</p>
+    <p>[% user.get_c_field('l') | html %]</p>
+    </div>
+</div>
+<div id="oinfo_close"></div>
Index: trunk/LATMOS-Accounts-Web/root/html/users/address.tt
===================================================================
--- trunk/LATMOS-Accounts-Web/root/html/users/address.tt	(revision 1080)
+++ trunk/LATMOS-Accounts-Web/root/html/users/address.tt	(revision 1081)
@@ -4,5 +4,5 @@
 [% ELSE %]
     
-[% INCLUDE 'users/menu.tt' %]
+[% INCLUDE 'users/object_header.tt' %]
 
 <div id="objectform" class="objectform">
Index: trunk/LATMOS-Accounts-Web/root/html/users/default.tt
===================================================================
--- trunk/LATMOS-Accounts-Web/root/html/users/default.tt	(revision 1080)
+++ trunk/LATMOS-Accounts-Web/root/html/users/default.tt	(revision 1081)
@@ -4,5 +4,5 @@
 [% ELSE %]
     
-[% INCLUDE 'users/menu.tt' %]
+[% INCLUDE 'users/object_header.tt' %]
 
 <div id="objectform" class="objectform">
Index: trunk/LATMOS-Accounts-Web/root/html/users/groups.tt
===================================================================
--- trunk/LATMOS-Accounts-Web/root/html/users/groups.tt	(revision 1080)
+++ trunk/LATMOS-Accounts-Web/root/html/users/groups.tt	(revision 1081)
@@ -4,5 +4,5 @@
 [% ELSE %]
     
-[% INCLUDE 'users/menu.tt' %]
+[% INCLUDE 'users/object_header.tt' %]
 
 <div id="objectform" class="objectform">
Index: trunk/LATMOS-Accounts-Web/root/html/users/index.tt
===================================================================
--- trunk/LATMOS-Accounts-Web/root/html/users/index.tt	(revision 1080)
+++ trunk/LATMOS-Accounts-Web/root/html/users/index.tt	(revision 1081)
@@ -1,50 +1,10 @@
-[% db = c.model('Accounts').db %]
 <!-- $Id$ -->
-<div style="float: right" id="filter">
+<div id="filter">
 [% INCLUDE 'includes/filter.tt'
    formuri = c.uri_for()
-   otype = 'user'
 %]
 </div>
 
-<table border="0">
-<tr><td colspan="5">
-[% IF initials %]
-Pages: 
-[% FOREACH initial = initials %]
-[% IF c.req.param('start') == initial %]
-< [% initial %] >
-[% ELSE %]
-[% uparams.start = initial %]
-<a href="[% c.uri_for('/users', uparams) %]">[% initial %]</a>
-[% END %]
-[% END %]
-[% END %]
-</td></tr>
-<tr><td></td><th>Login</th><th>Nom</th><th>Description</th><th>Mail</th></tr>
-[% FOREACH username = userslist %]
-[% user = db.get_object('user', username) %]
-<tr>
-    <td>
-[% INCLUDE 'user_flag' ouser=user %]
-    </td>
-    <td><a href="[% c.uri_for('/users', username) %]">
-        <img src="[% c.uri_for('/static', 'icons', 'icon_edit.png') %]"
-            height="16" width="16"
-            alt="[% "edit " _ username | html %]"></a>
-    [% username | html %]</td>
-    <td>
-        [% user.get_c_field('sn') | html %]
-        [% user.get_c_field('givenName') | html %]
-   </td>
-    <td>
-    <span title="[% user.get_c_field('description') | html %]">    
-    [% user.get_c_field('description') | truncate(20) | html %]
-    </span>
-   </td>
-    <td><span title="[% user.get_c_field('mail') | html %]">
-    [% user.get_c_field('mail') | truncate(20) | html %]</span>
-   </td>
-</tr>
-[% END %]
-</table>
+<div id="list_objects">
+[% INCLUDE 'includes/list_objects.tt' %]
+</div>
Index: trunk/LATMOS-Accounts-Web/root/html/users/mail.tt
===================================================================
--- trunk/LATMOS-Accounts-Web/root/html/users/mail.tt	(revision 1080)
+++ trunk/LATMOS-Accounts-Web/root/html/users/mail.tt	(revision 1081)
@@ -5,5 +5,5 @@
 
 <div id="objectform" class="objectform">
-[% INCLUDE 'users/menu.tt' %]
+[% INCLUDE 'users/object_header.tt' %]
 
 <div id="oform">
Index: trunk/LATMOS-Accounts-Web/root/html/users/menu.tt
===================================================================
--- trunk/LATMOS-Accounts-Web/root/html/users/menu.tt	(revision 1080)
+++ trunk/LATMOS-Accounts-Web/root/html/users/menu.tt	(revision 1081)
@@ -1,57 +1,20 @@
+[% IF username %]
 <!-- $Id$ -->
-[% INCLUDE 'includes/obj_prev_next.tt' objtype='user' objname=username %]
 
-<div id="oinfo">
-    <div id="oinfo_icons">
-    [% IF NOT user.get_c_field('exported') %]
-    <img src="[% c.uri_for('/static', 'icons', 'gtk-delete.png') %]"
-    alt="[% "User " _ username %]" title="le compte est dÃ©sactivÃ©">
-    [% IF c.model('Accounts').db.check_acl(user, 'exported', 'w') %]
-<script LANGUAGE="JavaScript">
-<!--
-function confirmSubmit()
-{
-var agree=confirm("Activer l'utilisateur [% username %] ?");
-if (agree)
-    return true ;
-else
-    return false ;
-}
-// -->
-</script>
-    <form method="POST" action="[% c.uri_for('/users', username, subform) %]" onsubmit="return confirmSubmit()">
-    <input type="submit" value="activer" name="make_active">
-    </form>
-    [% END %]
-    [% ELSE %]
-    <img src="[% c.uri_for('/static', 'icons', 'user-properties.png') %]"
-    alt="[% "User " _ username %]">
-    [% END %]
+<h3>
+<a href="[% c.uri_for(username) %]">GÃ©rer l'utilisateur [% username | html %]</a>
+</h3>
 
-    [% IF user.get_c_field('locked') %]
-    <img src="[% c.uri_for('/static', 'icons', 'locked.png') %]" 
-    alt="le compte est vÃ©rrouillÃ©" title="le compte est vÃ©rrouillÃ©">
-    [% END %]
-    </div>
-
-    <div id="oinfo_label">
-    <p id="oname">[% username | html %]
-        [% INCLUDE user_flag ouser = user %]</p>
-    <p>[% user.get_c_field('displayName') | html %]</p>
-    </div>
-</div>
-<div id="oinfo_close"></div>
-
-<div id="omenu">
-        <a href="[% c.uri_for(username) %]"><span [% 'id="oactive"' IF subform == '' %]>Statut</span></a>
-        <a href="[% c.uri_for(username, 'sys') %]"><span [% 'id="oactive"' IF subform == 'sys' %]>SystÃšme</span></a>
-        <a href="[% c.uri_for(username, 'groups') %]"><span [% 'id="oactive"' IF subform == 'groups' %]>Groupes</span></a>
-        <a href="[% c.uri_for(username, 'address') %]"><span [% 'id="oactive"' IF subform == 'address' %]>Adresses</span></a>
-        <a href="[% c.uri_for(username, 'mail') %]"><span [% 'id="oactive"' IF subform == 'mail' %]>eMail</span></a>
-        <a href="[% c.uri_for(username, 'my') %]"><span [% 'id="oactive"' IF subform == 'my' %]>My</span></a>
+<ul>
+<!-- <li>        <a href="[% c.uri_for(username) %]"><span [% 'id="oactive"' IF
+subform == '' %]>Statut</span></a></li>-->
+<li>        <a href="[% c.uri_for(username, 'sys') %]"><span [% 'id="oactive"' IF subform == 'sys' %]>SystÃšme</span></a></li>
+<li>        <a href="[% c.uri_for(username, 'groups') %]"><span [% 'id="oactive"' IF subform == 'groups' %]>Groupes</span></a></li>
+<li>        <a href="[% c.uri_for(username, 'address') %]"><span [% 'id="oactive"' IF subform == 'address' %]>Adresses</span></a></li>
+<li>        <a href="[% c.uri_for(username, 'mail') %]"><span [% 'id="oactive"' IF subform == 'mail' %]>eMail</span></a></li>
+<li>        <a href="[% c.uri_for(username, 'my') %]"><span [% 'id="oactive"' IF subform == 'my' %]>My</span></a></li>
         [% IF c.model('Accounts').db.check_acl(user, 'userPasswd', 'r') %]
-        <a href="[% c.uri_for(username, 'passwd') %]"><span [% 'id="oactive"' IF subform == 'passwd' %]>Mot de passe</span></a>
+<li>        <a href="[% c.uri_for(username, 'passwd') %]"><span [% 'id="oactive"' IF subform == 'passwd' %]>Mot de passe</span></a></li>
         [% END %]
-        <div id="omenuclose"></div>
-</div>
-
+</ul>
+[% END %]
Index: trunk/LATMOS-Accounts-Web/root/html/users/my.tt
===================================================================
--- trunk/LATMOS-Accounts-Web/root/html/users/my.tt	(revision 1080)
+++ trunk/LATMOS-Accounts-Web/root/html/users/my.tt	(revision 1081)
@@ -4,5 +4,5 @@
 [% ELSE %]
 
-[% INCLUDE 'users/menu.tt' %]
+[% INCLUDE 'users/object_header.tt' %]
 
 <div id="objectform" class="objectform">
Index: trunk/LATMOS-Accounts-Web/root/html/users/object_header.tt
===================================================================
--- trunk/LATMOS-Accounts-Web/root/html/users/object_header.tt	(revision 1081)
+++ trunk/LATMOS-Accounts-Web/root/html/users/object_header.tt	(revision 1081)
@@ -0,0 +1,57 @@
+<!-- $Id$ -->
+[% INCLUDE 'includes/obj_prev_next.tt' objtype='user' objname=username %]
+
+<div id="oinfo">
+    <div id="oinfo_icons">
+    [% IF NOT user.get_c_field('exported') %]
+    <img src="[% c.uri_for('/static', 'icons', 'gtk-delete.png') %]"
+    alt="[% "User " _ username %]" title="le compte est dÃ©sactivÃ©">
+    [% IF c.model('Accounts').db.check_acl(user, 'exported', 'w') %]
+<script LANGUAGE="JavaScript">
+<!--
+function confirmSubmit()
+{
+var agree=confirm("Activer l'utilisateur [% username %] ?");
+if (agree)
+    return true ;
+else
+    return false ;
+}
+// -->
+</script>
+    <form method="POST" action="[% c.uri_for('/users', username, subform) %]" onsubmit="return confirmSubmit()">
+    <input type="submit" value="activer" name="make_active">
+    </form>
+    [% END %]
+    [% ELSE %]
+    <img src="[% c.uri_for('/static', 'icons', 'user-properties.png') %]"
+    alt="[% "User " _ username %]">
+    [% END %]
+
+    [% IF user.get_c_field('locked') %]
+    <img src="[% c.uri_for('/static', 'icons', 'locked.png') %]" 
+    alt="le compte est vÃ©rrouillÃ©" title="le compte est vÃ©rrouillÃ©">
+    [% END %]
+    </div>
+
+    <div id="oinfo_label">
+    <p id="oname">[% username | html %]
+        [% INCLUDE user_flag ouser = user %]</p>
+    <p>[% user.get_c_field('displayName') | html %]</p>
+    </div>
+</div>
+<div id="oinfo_close"></div>
+
+<div id="omenu">
+        <a href="[% c.uri_for(username) %]"><span [% 'id="oactive"' IF subform == '' %]>Statut</span></a>
+        <a href="[% c.uri_for(username, 'sys') %]"><span [% 'id="oactive"' IF subform == 'sys' %]>SystÃšme</span></a>
+        <a href="[% c.uri_for(username, 'groups') %]"><span [% 'id="oactive"' IF subform == 'groups' %]>Groupes</span></a>
+        <a href="[% c.uri_for(username, 'address') %]"><span [% 'id="oactive"' IF subform == 'address' %]>Adresses</span></a>
+        <a href="[% c.uri_for(username, 'mail') %]"><span [% 'id="oactive"' IF subform == 'mail' %]>eMail</span></a>
+        <a href="[% c.uri_for(username, 'my') %]"><span [% 'id="oactive"' IF subform == 'my' %]>My</span></a>
+        [% IF c.model('Accounts').db.check_acl(user, 'userPasswd', 'r') %]
+        <a href="[% c.uri_for(username, 'passwd') %]"><span [% 'id="oactive"' IF subform == 'passwd' %]>Mot de passe</span></a>
+        [% END %]
+        <div id="omenuclose"></div>
+</div>
+
Index: trunk/LATMOS-Accounts-Web/root/html/users/passwd.tt
===================================================================
--- trunk/LATMOS-Accounts-Web/root/html/users/passwd.tt	(revision 1080)
+++ trunk/LATMOS-Accounts-Web/root/html/users/passwd.tt	(revision 1081)
@@ -1,4 +1,4 @@
 <!-- $Id$ -->
-[% INCLUDE 'users/menu.tt' %]
+[% INCLUDE 'users/object_header.tt' %]
 
 <script type="text/javascript">
