Changeset 1081
- Timestamp:
- 07/28/12 09:20:21 (12 years ago)
- Location:
- trunk/LATMOS-Accounts-Web
- Files:
-
- 5 added
- 32 edited
- 4 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/LATMOS-Accounts-Web/Changes
r899 r1081 1 This file documents the revision history for Perl extension LATMOS::Accounts::Web. 1 3.X.X 2 - the default filter to limit object listing look severals attributes, the 3 result is given via an AJAX call 2 4 3 X.X.X4 5 - add SSL authentication support 5 6 -
trunk/LATMOS-Accounts-Web/lib/LATMOS/Accounts/Web.pm
r929 r1081 31 31 32 32 __PACKAGE__->config( 33 objects => { 34 user => { 35 quick_search => [ qw(cn sn givenName) ], 36 list => [ qw(sn givenName mail) ], 37 }, 38 group => { 39 quick_search => [ qw(cn description) ], 40 list => [ qw(description) ], 41 }, 42 nethost => { 43 quick_search => [ qw(cn description ip cname otherName) ], 44 list => [ qw(description owner) ], 45 }, 46 netzone => { 47 quick_search => [ qw(cn description ip) ], 48 list => [ qw(type description) ], 49 }, 50 site => { 51 quick_search => [ qw(cn l) ], 52 list => [ qw(l) ], 53 }, 54 aliases => { 55 quick_search => [ qw(name) ], 56 list => [ qw() ], 57 }, 58 59 }, 33 60 'attrs' => { 34 61 'physicalDeliveryOfficeName' => { -
trunk/LATMOS-Accounts-Web/lib/LATMOS/Accounts/Web/Controller/Ajax.pm
r932 r1081 180 180 } 181 181 182 sub list_objects : Local { 183 my ($self, $c, $otype) = @_; 184 $c->stash->{ofilter} = $c->model('AttrFilter', $otype); 185 } 186 182 187 sub end : Private { 183 188 my ( $self, $c ) = @_; -
trunk/LATMOS-Accounts-Web/lib/LATMOS/Accounts/Web/Controller/Aliases.pm
r932 r1081 25 25 my ( $self, $c ) = @_; 26 26 27 my $db = $c->model('Accounts')->db; 28 my @al = $c->req->param('al'); 29 my @name = $c->req->param('name'); 30 my @forward = $c->req->param('forward'); 31 $c->stash->{page}{title} = "Gestion des alias"; 32 foreach my $idx (0 .. scalar(@name) - 1) { 33 34 if ($c->req->param('del' . ($idx+1))) { 35 $db->delete_object('aliases', $al[$idx]); 36 } elsif ($al[$idx] ne $name[$idx]) { 37 # delete old, create new 38 $db->delete_c_object('aliases', $al[$idx]) if($al[$idx]); 39 $db->create_c_object('aliases', $name[$idx], 40 forward => [ split(/\s*,\s*/, $forward[$idx]) ], 41 ); 42 } else { 43 my $obj = $db->get_object('aliases', $al[$idx]); 44 $obj->set_c_fields( 45 'forward' => [ split(/\s*,\s*/, $forward[$idx]) ], 46 ); 47 } 48 } 49 50 $db->commit; 27 $c->stash->{ofilter} = $c->model('AttrFilter', 'aliases'); 51 28 } 52 29 -
trunk/LATMOS-Accounts-Web/lib/LATMOS/Accounts/Web/Controller/Users.pm
r1051 r1081 26 26 27 27 $c->stash->{ofilter} = $c->model('AttrFilter', 'user'); 28 my $start = $c->req->param('start');29 $c->stash->{uparams} = { %{ $c->req->params || {} } };30 my %initials;31 my @userlist;32 foreach (map { $_->id } @{ $c->stash->{objectslist} }) {33 $initials{substr($_, 0, 1)} = 1;34 if ($start) {35 if (index($_, $start) == 0) {36 push(@userlist, $_);37 }38 }39 }40 if (@{ $c->stash->{objectslist} } < 20) {41 @userlist = map { $_->id } @{ $c->stash->{objectslist} };42 } else {43 $c->stash->{initials} = [ sort keys %initials ];44 }45 $c->stash->{page}{title} = 'Listes des utilisateurs (' . scalar(@{46 $c->stash->{objectslist} }) . ')';47 $c->stash->{userslist} = \@userlist;48 28 } 49 29 -
trunk/LATMOS-Accounts-Web/lib/LATMOS/Accounts/Web/Model/AttrFilter.pm
r959 r1081 21 21 nethost => [ qw(name cname otherName ip macaddr owner serialNumber) ], 22 22 netzone => [ qw(net group type site) ], 23 aliases => [ qw(as) ], 23 24 }; 24 25 … … 37 38 otype => $otype, 38 39 } unless($c->stash->{filter}); 39 if (exists($c->req->params->{'attr'})) { 40 $c->stash->{ofilter} = bless($new, __PACKAGE__); 41 42 $c->stash->{db} ||= $c->model('Accounts')->db; # need in stash ? 43 my $base = $c->stash->{db}; 44 45 my @objlist = (); 46 if ($c->req->params->{'q'}) { 47 my %objs; 48 foreach my $attr (@{ $c->config->{objects}{$otype}{quick_search} || [ 'cn' ]}) { 49 foreach ($base->search_objects( 50 $otype, "$attr~" . $c->req->params->{'q'})) { 51 $objs{$_} = 1; 52 } 53 @objlist = sort keys %objs; 54 } 55 } elsif (exists($c->req->params->{'attr'})) { 40 56 $c->stash->{filter}{'attr'} = [ $c->req->param('attr') ]; 41 57 $c->stash->{filter}{'attrval'} = [ $c->req->param('attrval') ]; 58 my @filter = $c->stash->{ofilter}->filter; 59 @objlist = $base->search_objects($otype, @filter); 60 } else { 61 @objlist = $base->list_objects($otype); 42 62 } 43 44 $c->stash->{ofilter} = bless($new, __PACKAGE__);45 $c->stash->{db} ||= $c->model('Accounts')->db;46 my $base = $c->stash->{db};47 63 48 my @filter = $c->stash->{ofilter}->filter;49 64 $c->stash->{objectslist} = [ 50 65 map { $base->get_object($otype, $_) } 51 (@filter 52 ? ($base->search_objects($otype, @filter) ) 53 : ($base->list_objects($otype) )) 66 @objlist 54 67 ]; 68 69 my $start = $c->req->param('start'); 70 $c->stash->{uparams} = { %{ $c->req->params || {} } }; 71 my %initials; 72 my @sublist; 73 foreach (@{ $c->stash->{objectslist} }) { 74 $initials{substr($_->id, 0, 1)} = 1; 75 if ($start) { 76 if (index($_->id, $start) == 0) { 77 push(@sublist, $_); 78 } 79 } 80 } 81 $c->stash->{sublist} = [ @sublist ]; 82 $c->stash->{initials} = [ sort keys %initials ]; 55 83 56 84 $c->stash->{ofilter} -
trunk/LATMOS-Accounts-Web/lib/LATMOS/Accounts/Web/View/TTpart.pm
r511 r1081 10 10 LATMOS::Accounts::Web->path_to( 'root', 'html' ), 11 11 ], 12 PRE_PROCESS => 'includes/defs.tt', 12 13 ); 13 14 -
trunk/LATMOS-Accounts-Web/root/html/admin/index.tt
r976 r1081 6 6 7 7 <div class="pmenu"> 8 9 10 <span> 11 <a href="[% c.uri_for('/users') %]" 12 onMouseOver="document.getElementById('menui').innerHTML='Liste des utilisateurs';" 13 onMouseOut="resetmenu();" 14 > 15 <img title="Utilisateurs" src="[% c.uri_for('/static', 'icons', 'avatar-default.png') %]"></a> 16 [% IF c.model('Accounts').db.check_acl('user', '@CREATE', 'w') %] 17 <a href="[% c.uri_for('/create', 'user') %]" 18 onMouseOver="document.getElementById('menui').innerHTML='Créer un utilisateur';" 19 onMouseOut="resetmenu();" 20 > 21 <img title="Ajouter un utilisateurs" src="[% c.uri_for('/static', 'icons', 'add.png') %]"></a> 22 [% END %] 23 </span> 24 <span> 25 <a href="[% c.uri_for('/groups') %]" 26 onMouseOver="document.getElementById('menui').innerHTML='Liste des groupes';" 27 onMouseOut="resetmenu();" 28 > 29 <img title="Groupes" src="[% c.uri_for('/static', 'icons', 'system-users.png') %]"></a> 30 [% IF c.model('Accounts').db.check_acl('group', '@CREATE', 'w') %] 31 <a href="[% c.uri_for('/create', 'group') %]" 32 onMouseOver="document.getElementById('menui').innerHTML='Créer un groupe';" 33 onMouseOut="resetmenu();" 34 > 35 <img title="Ajouter un groupe" src="[% c.uri_for('/static', 'icons', 'add.png') %]"></a> 36 [% END %] 37 </span> 38 <span> 39 <a href="[% c.uri_for('/nethosts') %]" 40 onMouseOver="document.getElementById('menui').innerHTML='Liste des hÎtes réseau';" 41 onMouseOut="resetmenu();" 42 > 43 <img title="HÎtes réseau" src="[% c.uri_for('/static', 'icons', 'video-display.png') %]"></a> 44 [% IF c.model('Accounts').db.check_acl('nethost', '@CREATE', 'w') %] 45 <a href="[% c.uri_for('/create', 'nethost') %]" 46 onMouseOver="document.getElementById('menui').innerHTML='Ajouter un hote réseau';" 47 onMouseOut="resetmenu();" 48 > 49 <img title="Ajouter un hÎte réseau" src="[% c.uri_for('/static', 'icons', 'add.png') %]"></a> 50 [% END %] 51 </span> 52 [% IF 0 %] 53 <span> 54 <a href="[% c.uri_for('/summary/offices') %]" 55 onMouseOver="document.getElementById('menui').innerHTML='Annuaires';" 56 onMouseOut="resetmenu();" 57 > 58 <img title="Annuaires" src="[% c.uri_for('/static', 'icons', 'logviewer.png') %]"></a> 59 </span> 60 [% END %] 61 8 62 9 63 <span> -
trunk/LATMOS-Accounts-Web/root/html/aliases/index.tt
r971 r1081 1 1 <!-- $Id$ --> 2 3 <div style="border: outset; padding: 0.5em; float:left"> 4 [% IF c.model('Accounts').db.check_acl('aliases', 'forward', 'w') %] 5 <table border=1> 6 <tr><td valign="top"> 7 <form action="[% c.uri_for() %]" method="POST"> 8 <p>Filtre:</p> 9 <input type="text" name="filter" value="[% c.req.param('filter') | html %]"><br> 10 <input type="submit"> 11 </form> 12 </td> 13 [% IF c.model('Accounts').db.check_acl('aliases', '@CREATE', 'w') %] 14 <td valign="top"> 15 <p>Créer un alias</p> 16 <form action="[% c.uri_for() %]" method="POST"> 17 <input type="hidden" name="filter" value="[% c.req.param('filter') | html %]"> 18 <table> 19 <tr><th>Nom:</th><td><input type="text" name="name" id="newal"> 20 <span style="display:none" id="newalind">Searching...</span> 21 <span id="span_newval"></span><br> 22 [% c.prototype.observe_field('newal', { 23 url => c.uri_for('/ajax', 'objexist', 'aliases'), 24 with => "'val='+value+ '&attr=forward'", 25 update => 'span_newval', 26 frequency => 1, 27 min_chars => 1, 28 indicator => 'newalind', 29 }) %] 30 </td></tr> 31 <tr><th>renvois vers:</th><td><input type="text" name="forward"></td></tr> 32 <tr><td></td><td><input type="submit" value="créer"></td></tr> 33 </table> 34 </form> 35 </td> 36 [% END %] 37 </tr> 38 </table> 2 <div id="filter"> 3 [% INCLUDE 'includes/filter.tt' 4 formuri = c.uri_for() 5 %] 39 6 </div> 40 7 41 [% ELSE %] 42 <p>Vous n'avez pas la permission d'acceder à cette page.</p> 43 [% END %] [% # ACLS %] 44 45 [% INCLUDE 'includes/aliases_list.tt' %] 8 <div id="list_objects"> 9 [% INCLUDE 'includes/list_objects.tt' %] 10 </div> -
trunk/LATMOS-Accounts-Web/root/html/groups/default.tt
r976 r1081 4 4 [% ELSE %] 5 5 6 [% INCLUDE 'groups/ menu.tt' %]6 [% INCLUDE 'groups/object_header.tt' %] 7 7 8 8 <div class="objectform" id="objectform"> -
trunk/LATMOS-Accounts-Web/root/html/groups/dpmt.tt
r976 r1081 4 4 [% ELSE %] 5 5 6 [% INCLUDE 'groups/ menu.tt' %]6 [% INCLUDE 'groups/object_header.tt' %] 7 7 8 8 <div class="objectform" id="objectform"> -
trunk/LATMOS-Accounts-Web/root/html/groups/index.tt
r971 r1081 1 [% db = c.model('Accounts').db %] 2 <!-- $Id --> 3 <div style="float: right" id="filter"> 1 <!-- $Id$ --> 2 <div id="filter"> 4 3 [% INCLUDE 'includes/filter.tt' 5 4 formuri = c.uri_for() 6 otype = 'group'7 5 %] 8 6 </div> 9 7 10 <table border="0"> 11 <tr><td colspan="2">[% groupslist.size %] groupes</td></tr> 12 <tr><th>Nom</th><th>Description</th><th></th></tr> 13 [% FOREACH groupname = groupslist %] 14 [% group = db.get_object('group', groupname) %] 15 <tr> 16 <td><a href="[% c.uri_for('/groups', groupname) %]"> 17 <img src="[% c.uri_for('/static', 'icons', 'icon_edit.png') %]" 18 height="16" width="16" 19 alt="[% "edit " _ groupname | html %]"></a> 20 [% group.id | html %]</td> 21 <td> 22 <span title="[% group.get_c_field('description') | html %]"> 23 [% group.get_c_field('description') | truncate(30) | html %] 24 </span> 25 </td> 26 </tr> 27 [% END %] 28 </table> 8 <div id="list_objects"> 9 [% INCLUDE 'includes/list_objects.tt' %] 10 </div> -
trunk/LATMOS-Accounts-Web/root/html/groups/menu.tt
r976 r1081 1 1 <!-- $Id$ --> 2 [% INCLUDE 'includes/obj_prev_next.tt' objtype='group' objname=groupname %]3 2 4 <div id="oinfo"> 5 <div id="oinfo_icons">6 <img src="[% c.uri_for('/static', 'icons', 'user-group-properties.png') %]" 7 alt="[% "Groupe " _ groupname %]">8 </div>3 [% IF groupname %] 4 <h3> 5 <a href="[% c.uri_for(groupname) %]">Gérer le groupe [% username | html 6 %]</a> 7 </h3> 9 8 10 <div id="oinfo_label"> 11 <p id="oname">[% groupname | html %]</p> 12 [% group.get_c_field('description') | html %] 13 </div> 14 </div> 15 <div id="oinfo_close"></div> 9 <ul> 10 <li><a href="[% c.uri_for(groupname) %]"><span [% 'id="oactive"' IF subform == '' %]>SystÚme</span></a></li> 11 <li><a href="[% c.uri_for(groupname, 'users') %]"><span [% 'id="oactive"' IF subform == 'users' %]>Utilisateurs</span></a></li> 12 [% IF group.get_attributes('sutype') == 'dpmt' %]<li> 13 <li><a href="[% c.uri_for(groupname, 'dpmt') %]"><span [% 'id="oactive"' IF subform == 'dpmt' %]>Département</span></a></li> 14 [% END %] 15 </ul> 16 16 17 <div id="omenu">18 <a href="[% c.uri_for(groupname) %]"><span [% 'id="oactive"' IF subform == '' %]>SystÚme</span></a>19 <a href="[% c.uri_for(groupname, 'users') %]"><span [% 'id="oactive"' IF subform == 'users' %]>Utilisateurs</span></a>20 [% IF group.get_attributes('sutype') == 'dpmt' %]21 <a href="[% c.uri_for(groupname, 'dpmt') %]"><span [% 'id="oactive"' IF subform == 'dpmt' %]>Département</span></a>22 17 [% END %] 23 </div>24 <div style="clear: both;"></div> -
trunk/LATMOS-Accounts-Web/root/html/groups/users.tt
r976 r1081 7 7 NOT group.attribute('memberUID').ro %] 8 8 9 [% INCLUDE 'groups/ menu.tt' %]9 [% INCLUDE 'groups/object_header.tt' %] 10 10 11 11 <div class="objectform" id="objectform"> -
trunk/LATMOS-Accounts-Web/root/html/includes/filter.tt
r971 r1081 1 1 <!-- $Id$ --> 2 2 [% IF ofilter %] 3 <p>Filtre:</p>4 3 <form action="[% c.action.namespace %]" method="POST"> 5 <input type="hidden" name="otype" value="[% otype | html %]"> 6 [% FOREACH item = ofilter.count_field %] 7 [% IF loop.first %] 8 <table border="0"> 9 <tr><th>Champs</th><th>contient:</th></tr> 10 [% END %] 11 <tr> 12 <td> 13 [% ofilter.search_field(item) %] 14 </td> 15 <td>[% ofilter.val_field(item) %]</td></tr> 16 [% IF loop.last %] 17 </table> 18 [% END %] 19 [% END %] 20 4 Filtre: 5 <input name=q value="[% c.req.param('q') | html %]" id="q"> 21 6 <input type="submit"> 22 7 </form> 8 9 <span style="display:none" id="list_objects_ind">Searching...</span> 10 [% c.prototype.observe_field('q', { 11 url => c.uri_for('/ajax', 'list_objects', ofilter.otype), 12 with => "'q='+value", 13 update => 'list_objects', 14 frequency => 1, 15 before => "document.getElementById('list_objects_ind').style.display='block';", 16 loaded => "document.getElementById('list_objects_ind').style.display='none';", 17 }) %] 23 18 [% END %] -
trunk/LATMOS-Accounts-Web/root/html/includes/header.tt
r1052 r1081 28 28 </head> 29 29 30 [% perm_denied = BLOCK %] 31 <span class="permdenied"><img src="[% c.uri_for('/static', 'images', 'process-stop.png') %]"> 32 permission non accordé 33 </span> 34 [% END %] 35 36 [% BLOCK user_flag %] 37 [% INCLUDE object_flag object = ouser %] 38 [% END %] 39 40 [% BLOCK object_flag %] 41 [% IF object.type == 'user' %] 42 [% IF object.get_attributes('unexported') %] 43 <img src="[% c.uri_for('/static', 'icons', 'gtk-delete.png') %]" 44 class="notice" title="Ce compte est désactivé" alt="disable"> 45 [% ELSIF object.get_attributes('expired') %] 46 <img src="[% c.uri_for('/static', 'icons', 'emblem-urgent.png') %]" 47 class="notice" title="Ce compte est expiré ([% object.get_attributes('expired') %])" alt="expired"> 48 [% ELSIF object.get_attributes('expire') %] 49 <img src="[% c.uri_for('/static', 'icons', 'appointment-new.png') %]" 50 class="notice" title="Ce compte est temporaire ([% object.get_attributes('expire') %])" alt="temporary"> 51 [% END %] 52 [% ELSE %] 53 [% IF object.get_attributes('unexported') %] 54 <img src="[% c.uri_for('/static', 'icons', 'gtk-delete.png') %]" 55 class="notice" title="Cette entrée est désactivés" alt="disable"> 56 [% END %] 57 [% END %] 58 [% END %] 30 [% PROCESS 'includes/defs.tt' %] 59 31 60 32 <body> … … 71 43 </h1> 72 44 73 <div id="mainmenu" style="clear: both;"> 74 <div style="float: left"> 75 <span> 76 <a href="[% c.uri_for('/users') %]" 77 onMouseOver="document.getElementById('menui').innerHTML='Liste des utilisateurs';" 78 onMouseOut="resetmenu();" 79 > 80 <img title="Utilisateurs" src="[% c.uri_for('/static', 'icons', 'avatar-default.png') %]"></a> 81 [% IF c.model('Accounts').db.check_acl('user', '@CREATE', 'w') %] 82 <a href="[% c.uri_for('/create', 'user') %]" 83 onMouseOver="document.getElementById('menui').innerHTML='Créer un utilisateur';" 84 onMouseOut="resetmenu();" 85 > 86 <img title="Ajouter un utilisateurs" src="[% c.uri_for('/static', 'icons', 'add.png') %]"></a> 87 [% END %] 88 </span> 89 <span> 90 <a href="[% c.uri_for('/groups') %]" 91 onMouseOver="document.getElementById('menui').innerHTML='Liste des groupes';" 92 onMouseOut="resetmenu();" 93 > 94 <img title="Groupes" src="[% c.uri_for('/static', 'icons', 'system-users.png') %]"></a> 95 [% IF c.model('Accounts').db.check_acl('group', '@CREATE', 'w') %] 96 <a href="[% c.uri_for('/create', 'group') %]" 97 onMouseOver="document.getElementById('menui').innerHTML='Créer un groupe';" 98 onMouseOut="resetmenu();" 99 > 100 <img title="Ajouter un groupe" src="[% c.uri_for('/static', 'icons', 'add.png') %]"></a> 101 [% END %] 102 </span> 103 <span> 104 <a href="[% c.uri_for('/nethosts') %]" 105 onMouseOver="document.getElementById('menui').innerHTML='Liste des hÃŽtes réseau';" 106 onMouseOut="resetmenu();" 107 > 108 <img title="HÃŽtes réseau" src="[% c.uri_for('/static', 'icons', 'video-display.png') %]"></a> 109 [% IF c.model('Accounts').db.check_acl('nethost', '@CREATE', 'w') %] 110 <a href="[% c.uri_for('/create', 'nethost') %]" 111 onMouseOver="document.getElementById('menui').innerHTML='Ajouter un hote réseau';" 112 onMouseOut="resetmenu();" 113 > 114 <img title="Ajouter un hÃŽte réseau" src="[% c.uri_for('/static', 'icons', 'add.png') %]"></a> 115 [% END %] 116 </span> 117 <span> 118 <a href="[% c.uri_for('/summary/offices') %]" 119 onMouseOver="document.getElementById('menui').innerHTML='Annuaires';" 120 onMouseOut="resetmenu();" 121 > 122 <img title="Annuaires" src="[% c.uri_for('/static', 'icons', 'logviewer.png') %]"></a> 123 </span> 124 <span> 125 <a href="[% c.uri_for('/admin') %]" 126 onMouseOver="document.getElementById('menui').innerHTML='Administrer...';" 127 onMouseOut="resetmenu();" 128 > 129 <img title="Administrer..." src="[% c.uri_for('/static', 'icons', 'gtk-execute.png') %]"></a> 130 </span> 131 <span> 132 <a href="[% c.uri_for('/about') %]" 133 onMouseOver="document.getElementById('menui').innerHTML='A propos...';" 134 onMouseOut="resetmenu();" 135 > 136 <img title="A propos..." src="[% c.uri_for('/static', 'icons', 'gtk-about.png') %]"></a> 137 </span> 138 </div> 139 140 [% IF c.user.username %] 141 <div style="float: right"> 142 <span> 143 <a href="[% c.uri_for('/users', c.user.username) %]" 144 onMouseOver="document.getElementById('menui').innerHTML='Mon profile';" 145 onMouseOut="resetmenu();" 146 > 147 <img title="Mon profile" src="[% c.uri_for('/static', 'icons', 'gtk-home.png') %]"></a> 148 </span> 149 <span> 150 <a href="[% c.uri_for('/users', c.user.username, 'passwd') %]" 151 onMouseOver="document.getElementById('menui').innerHTML='Changer mon mot de passe';" 152 onMouseOut="resetmenu();" 153 > 154 <img title="Changer mon mot de passe" src="[% c.uri_for('/static', 155 'icons', 'dialog-password.png') %]"></a> 156 </span> 157 <span> 158 [% luri = c.uri_for('/logout') %] 159 [% luri.userinfo(c.user.username _ ':x') %] 160 <a href="[% luri %]" 161 onMouseOver="document.getElementById('menui').innerHTML='Se déconnecter';" 162 onMouseOut="resetmenu();" 163 > 164 <img title="Se déconnecter" src="[% c.uri_for('/static', 165 'icons', 'gtk-close.png') %]"></a> 166 </span> 167 </div> 168 [% END %] 169 </div> 170 171 <div style="clear: both"> 172 [% IF c.user.username %] 173 <span id="login_name" style="float: right;"> 174 Vous êtes: [% c.user.username | html %] 175 </span> 176 [% END %] 177 </div> 178 179 <p style="clear:both;">> <span id="menui">[% page.title | html %]</span></p> 45 <a href="[% c.uri_for('/users', c.user.username) %]">Ma page</a> 46 :: 47 <a href="[% c.uri_for('/users', c.user.username, 'passwd') %]">Changer mon mot de passe</a> 48 :: 180 49 181 50 </div><!-- #header --> -
trunk/LATMOS-Accounts-Web/root/html/includes/sidebar.tt
r978 r1081 1 2 1 [% FOREACH h = c.model('Accounts').db.search_objects('accreq', 'exported=*') %] 3 2 [% IF loop.first %] … … 15 14 [% END %] 16 15 [% END %] 16 17 <h3><a href="[% c.uri_for('/admin') 18 %]">Administration...</a></li> 19 </h3> -
trunk/LATMOS-Accounts-Web/root/html/nethosts/default.tt
r976 r1081 4 4 [% ELSE %] 5 5 6 [% INCLUDE 'nethosts/ menu.tt' %]6 [% INCLUDE 'nethosts/object_header.tt' %] 7 7 8 8 <div class="objectformleft" id="objectform"> -
trunk/LATMOS-Accounts-Web/root/html/nethosts/index.tt
r971 r1081 1 [% db = c.model('Accounts').db %] 2 <!-- $Id --> 3 <div style="float: right" id="filter"> 1 <!-- $Id$ --> 2 <div id="filter"> 4 3 [% INCLUDE 'includes/filter.tt' 5 4 formuri = c.uri_for() 6 otype = 'nethost'7 5 %] 8 6 </div> 9 7 10 <table border="0"> 11 <tr><td colspan="3"> 12 [% IF initials %] 13 Pages: 14 [% FOREACH initial = initials %] 15 [% IF c.req.param('start') == initial %] 16 < [% initial %] > 17 [% ELSE %] 18 [% uparams.start = initial %] 19 <a href="[% c.uri_for('/nethosts', uparams) %]">[% initial %]</a> 20 [% END %] 21 [% END %] 22 [% END %] 23 </td></tr> 24 <tr><td></td><th>Nom</th><th>Description</th></tr> 25 [% FOREACH nethostname = nethostlist %] 26 [% nethost = db.get_object('nethost', nethostname) %] 27 <tr> 28 <td> 29 [% INCLUDE 'object_flag' object=nethost %] 30 </td> 31 <td> 32 <a href="[% c.uri_for('/nethosts', nethostname) %]"> 33 <img src="[% c.uri_for('/static', 'icons', 'icon_edit.png') %]" 34 height="16" width="16" 35 alt="[% "edit " _ nethostname | html %]"></a> 36 [% username | html %] 37 [% nethostname | html %] 38 [% IF nethost.get_attributes('owner') %] 39 (<a href="[% c.uri_for('/users', nethost.get_attributes('owner')) %]">[% nethost.get_attributes('owner') %]</a>) 40 [% END %] 41 </td> 42 <td> 43 <span title="[% nethost.get_attributes('description') | html %]"> 44 [% nethost.get_attributes('description') | truncate(20) | html %] 45 </span> 46 </td> 47 </tr> 48 [% END %] 49 </table> 8 <div id="list_objects"> 9 [% INCLUDE 'includes/list_objects.tt' %] 10 </div> -
trunk/LATMOS-Accounts-Web/root/html/nethosts/menu.tt
r976 r1081 1 1 <!-- $Id$ --> 2 2 3 [% INCLUDE 'includes/obj_prev_next.tt' objtype='nethost' objname=nethostname %]4 5 <div id="oinfo">6 <div id="oinfo_icons">7 [% IF NOT nethost.get_c_field('exported') %]8 <img src="[% c.uri_for('/static', 'icons', 'gtk-delete.png') %]"9 alt="[% "HÎte " _ nethostname %]" title="l'entrée est désactivée">10 [% ELSE %]11 <img src="[% c.uri_for('/static', 'icons', 'preferences-desktop-wallpaper.png') %]"12 alt="[% "Ordinateur " _ nethostname %]">13 [% END %]14 </div>15 16 <div id="ofino_label">17 <p id="oname">[% nethostname | html %]</p>18 [% nethost.get_c_field('description') | html %]19 </div>20 </div>21 <div id="oinfo_close"></div> -
trunk/LATMOS-Accounts-Web/root/html/netzones/default.tt
r976 r1081 4 4 [% ELSE %] 5 5 6 [% INCLUDE 'netzones/ menu.tt' %]6 [% INCLUDE 'netzones/object_header.tt' %] 7 7 8 8 <div class="objectformleft" id="objectform"> -
trunk/LATMOS-Accounts-Web/root/html/netzones/index.tt
r1064 r1081 1 [% db = c.model('Accounts').db %] 2 <!-- $Id --> 3 <div style="float: right" id="filter"> 1 <!-- $Id$ --> 2 <div id="filter"> 4 3 [% INCLUDE 'includes/filter.tt' 5 4 formuri = c.uri_for() 6 otype = 'netzone'7 5 %] 8 6 </div> 9 7 10 [% IF c.req.param('attrval') %] 11 [% FOREACH netzonename = netzonelist.sort %] 12 [% IF loop.first %] 13 <table> 14 <tr><th colspan="2">[% netztype | html %]</th></tr> 15 [% END %] 16 <tr> 17 <td>[% netzonename | html %]</td> 18 <td> 19 <a href="[% c.uri_for('/netzones', netzonename) %]"> 20 <img src="[% c.uri_for('/static', 'icons', 'icon_edit.png') %]" 21 height="16" width="16" 22 alt="[% "edit " _ netzonename | html %]"></a> 23 </td> 24 </tr> 25 [% IF loop.last %] 26 </table> 27 [% END %] 28 [% END %] 29 [% ELSE %] 30 31 <table border="0"> 32 [% FOREACH netztype = [ 'dns', 'reverse', 'dhcp', 'puppet' ] %] 33 [% netzonelist = db.search_objects('netzone', 'type=' _ netztype) %] 34 [% FOREACH netzonename = netzonelist.sort %] 35 [% netzone = db.get_object('netzone', netzonename) %] 36 [% IF loop.first %] 37 <tr><th colspan="2">[% netztype | ucfirst | html %]</th></tr> 38 <tr><th>Nom</th><th>Description</th></tr> 39 [% END %] 40 <tr> 41 <td> 42 <a href="[% c.uri_for('/netzones', netzonename) %]"> 43 <img src="[% c.uri_for('/static', 'icons', 'icon_edit.png') %]" 44 height="16" width="16" 45 alt="[% "edit " _ netzonename | html %]"></a> 46 [% netzonename | html %] 47 </td> 48 <td> 49 <span title="[% netzone.get_c_field('description') | html %]"> 50 [% netzone.get_c_field('description') | truncate(20) | html %] 51 </span> 52 </td> 53 </tr> 54 [% IF loop.last %] 55 [% END %] 56 [% END %] 57 [% END %] 58 [% END %] [%# IF %] 59 </table> 8 <div id="list_objects"> 9 [% INCLUDE 'includes/list_objects.tt' %] 10 </div> -
trunk/LATMOS-Accounts-Web/root/html/sites/default.tt
r996 r1081 4 4 [% ELSE %] 5 5 6 [% INCLUDE 'sites/ menu.tt' %]6 [% INCLUDE 'sites/object_header.tt' %] 7 7 8 8 <div class="objectform" id="objectform"> -
trunk/LATMOS-Accounts-Web/root/html/sites/index.tt
r971 r1081 1 [% db = c.model('Accounts').db %] 2 <!-- $Id --> 3 <div style="float: right" id="filter"> 1 <!-- $Id$ --> 2 <div id="filter"> 4 3 [% INCLUDE 'includes/filter.tt' 5 4 formuri = c.uri_for() 6 otype = 'site'7 5 %] 8 6 </div> 9 7 10 <table border="0"> 11 <tr><td colspan="2">[% siteslist.size %] Sites</td></tr> 12 <tr><th>Nom</th><th>Ville</th></tr> 13 [% FOREACH sitename = siteslist %] 14 [% site = db.get_object('site', sitename) %] 15 <tr> 16 <td>[% sitename | html %]</td> 17 <td> 18 [% site.get_c_field('l') | html %] 19 <a href="[% c.uri_for('/sites', sitename) %]"> 20 <img src="[% c.uri_for('/static', 'icons', 'arrow-right.png') %]" 21 height="16" width="16" 22 alt="[% "edit " _ sitename | html %]"> 23 </a></td> 24 </tr> 25 [% END %] 26 </table> 8 <div id="list_objects"> 9 [% INCLUDE 'includes/list_objects.tt' %] 10 </div> -
trunk/LATMOS-Accounts-Web/root/html/users/address.tt
r976 r1081 4 4 [% ELSE %] 5 5 6 [% INCLUDE 'users/ menu.tt' %]6 [% INCLUDE 'users/object_header.tt' %] 7 7 8 8 <div id="objectform" class="objectform"> -
trunk/LATMOS-Accounts-Web/root/html/users/default.tt
r976 r1081 4 4 [% ELSE %] 5 5 6 [% INCLUDE 'users/ menu.tt' %]6 [% INCLUDE 'users/object_header.tt' %] 7 7 8 8 <div id="objectform" class="objectform"> -
trunk/LATMOS-Accounts-Web/root/html/users/groups.tt
r976 r1081 4 4 [% ELSE %] 5 5 6 [% INCLUDE 'users/ menu.tt' %]6 [% INCLUDE 'users/object_header.tt' %] 7 7 8 8 <div id="objectform" class="objectform"> -
trunk/LATMOS-Accounts-Web/root/html/users/index.tt
r971 r1081 1 [% db = c.model('Accounts').db %]2 1 <!-- $Id$ --> 3 <div style="float: right"id="filter">2 <div id="filter"> 4 3 [% INCLUDE 'includes/filter.tt' 5 4 formuri = c.uri_for() 6 otype = 'user'7 5 %] 8 6 </div> 9 7 10 <table border="0"> 11 <tr><td colspan="5"> 12 [% IF initials %] 13 Pages: 14 [% FOREACH initial = initials %] 15 [% IF c.req.param('start') == initial %] 16 < [% initial %] > 17 [% ELSE %] 18 [% uparams.start = initial %] 19 <a href="[% c.uri_for('/users', uparams) %]">[% initial %]</a> 20 [% END %] 21 [% END %] 22 [% END %] 23 </td></tr> 24 <tr><td></td><th>Login</th><th>Nom</th><th>Description</th><th>Mail</th></tr> 25 [% FOREACH username = userslist %] 26 [% user = db.get_object('user', username) %] 27 <tr> 28 <td> 29 [% INCLUDE 'user_flag' ouser=user %] 30 </td> 31 <td><a href="[% c.uri_for('/users', username) %]"> 32 <img src="[% c.uri_for('/static', 'icons', 'icon_edit.png') %]" 33 height="16" width="16" 34 alt="[% "edit " _ username | html %]"></a> 35 [% username | html %]</td> 36 <td> 37 [% user.get_c_field('sn') | html %] 38 [% user.get_c_field('givenName') | html %] 39 </td> 40 <td> 41 <span title="[% user.get_c_field('description') | html %]"> 42 [% user.get_c_field('description') | truncate(20) | html %] 43 </span> 44 </td> 45 <td><span title="[% user.get_c_field('mail') | html %]"> 46 [% user.get_c_field('mail') | truncate(20) | html %]</span> 47 </td> 48 </tr> 49 [% END %] 50 </table> 8 <div id="list_objects"> 9 [% INCLUDE 'includes/list_objects.tt' %] 10 </div> -
trunk/LATMOS-Accounts-Web/root/html/users/mail.tt
r971 r1081 5 5 6 6 <div id="objectform" class="objectform"> 7 [% INCLUDE 'users/ menu.tt' %]7 [% INCLUDE 'users/object_header.tt' %] 8 8 9 9 <div id="oform"> -
trunk/LATMOS-Accounts-Web/root/html/users/menu.tt
r1051 r1081 1 [% IF username %] 1 2 <!-- $Id$ --> 2 [% INCLUDE 'includes/obj_prev_next.tt' objtype='user' objname=username %]3 3 4 <div id="oinfo"> 5 <div id="oinfo_icons"> 6 [% IF NOT user.get_c_field('exported') %] 7 <img src="[% c.uri_for('/static', 'icons', 'gtk-delete.png') %]" 8 alt="[% "User " _ username %]" title="le compte est désactivé"> 9 [% IF c.model('Accounts').db.check_acl(user, 'exported', 'w') %] 10 <script LANGUAGE="JavaScript"> 11 <!-- 12 function confirmSubmit() 13 { 14 var agree=confirm("Activer l'utilisateur [% username %] ?"); 15 if (agree) 16 return true ; 17 else 18 return false ; 19 } 20 // --> 21 </script> 22 <form method="POST" action="[% c.uri_for('/users', username, subform) %]" onsubmit="return confirmSubmit()"> 23 <input type="submit" value="activer" name="make_active"> 24 </form> 25 [% END %] 26 [% ELSE %] 27 <img src="[% c.uri_for('/static', 'icons', 'user-properties.png') %]" 28 alt="[% "User " _ username %]"> 29 [% END %] 4 <h3> 5 <a href="[% c.uri_for(username) %]">Gérer l'utilisateur [% username | html %]</a> 6 </h3> 30 7 31 [% IF user.get_c_field('locked') %] 32 <img src="[% c.uri_for('/static', 'icons', 'locked.png') %]" 33 alt="le compte est vérrouillé" title="le compte est vérrouillé"> 34 [% END %] 35 </div> 36 37 <div id="oinfo_label"> 38 <p id="oname">[% username | html %] 39 [% INCLUDE user_flag ouser = user %]</p> 40 <p>[% user.get_c_field('displayName') | html %]</p> 41 </div> 42 </div> 43 <div id="oinfo_close"></div> 44 45 <div id="omenu"> 46 <a href="[% c.uri_for(username) %]"><span [% 'id="oactive"' IF subform == '' %]>Statut</span></a> 47 <a href="[% c.uri_for(username, 'sys') %]"><span [% 'id="oactive"' IF subform == 'sys' %]>SystÚme</span></a> 48 <a href="[% c.uri_for(username, 'groups') %]"><span [% 'id="oactive"' IF subform == 'groups' %]>Groupes</span></a> 49 <a href="[% c.uri_for(username, 'address') %]"><span [% 'id="oactive"' IF subform == 'address' %]>Adresses</span></a> 50 <a href="[% c.uri_for(username, 'mail') %]"><span [% 'id="oactive"' IF subform == 'mail' %]>eMail</span></a> 51 <a href="[% c.uri_for(username, 'my') %]"><span [% 'id="oactive"' IF subform == 'my' %]>My</span></a> 8 <ul> 9 <!-- <li> <a href="[% c.uri_for(username) %]"><span [% 'id="oactive"' IF 10 subform == '' %]>Statut</span></a></li>--> 11 <li> <a href="[% c.uri_for(username, 'sys') %]"><span [% 'id="oactive"' IF subform == 'sys' %]>SystÚme</span></a></li> 12 <li> <a href="[% c.uri_for(username, 'groups') %]"><span [% 'id="oactive"' IF subform == 'groups' %]>Groupes</span></a></li> 13 <li> <a href="[% c.uri_for(username, 'address') %]"><span [% 'id="oactive"' IF subform == 'address' %]>Adresses</span></a></li> 14 <li> <a href="[% c.uri_for(username, 'mail') %]"><span [% 'id="oactive"' IF subform == 'mail' %]>eMail</span></a></li> 15 <li> <a href="[% c.uri_for(username, 'my') %]"><span [% 'id="oactive"' IF subform == 'my' %]>My</span></a></li> 52 16 [% IF c.model('Accounts').db.check_acl(user, 'userPasswd', 'r') %] 53 <a href="[% c.uri_for(username, 'passwd') %]"><span [% 'id="oactive"' IF subform == 'passwd' %]>Mot de passe</span></a>17 <li> <a href="[% c.uri_for(username, 'passwd') %]"><span [% 'id="oactive"' IF subform == 'passwd' %]>Mot de passe</span></a></li> 54 18 [% END %] 55 <div id="omenuclose"></div> 56 </div> 57 19 </ul> 20 [% END %] -
trunk/LATMOS-Accounts-Web/root/html/users/my.tt
r976 r1081 4 4 [% ELSE %] 5 5 6 [% INCLUDE 'users/ menu.tt' %]6 [% INCLUDE 'users/object_header.tt' %] 7 7 8 8 <div id="objectform" class="objectform"> -
trunk/LATMOS-Accounts-Web/root/html/users/passwd.tt
r976 r1081 1 1 <!-- $Id$ --> 2 [% INCLUDE 'users/ menu.tt' %]2 [% INCLUDE 'users/object_header.tt' %] 3 3 4 4 <script type="text/javascript">
Note: See TracChangeset
for help on using the changeset viewer.