Changeset 544


Ignore:
Timestamp:
11/09/09 17:16:26 (15 years ago)
Author:
nanardon
Message:
  • add prev/next link on object page (user and groups at time)
Location:
LATMOS-Accounts-Web
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • LATMOS-Accounts-Web/lib/LATMOS/Accounts/Web/Model/Accounts.pm

    r521 r544  
    4242    $self->{_default_base}->wexported(1); 
    4343    $self->{_default_base} 
     44} 
     45 
     46sub object_prev_next { 
     47    my ($self, $otype, $id) = @_; 
     48 
     49    my @list = $self->db->list_objects($otype); 
     50    my $prev; 
     51    while (@list && ($list[0] || '') ne $id) { 
     52        $prev = shift(@list); 
     53    } 
     54    return([ $prev, $list[1] ]); 
    4455} 
    4556 
  • LATMOS-Accounts-Web/root/html/groups/menu.tt

    r241 r544  
    11<!-- $Id$ --> 
    22<div id="omenu"> 
     3    [% INCLUDE 'includes/obj_prev_next.tt' objtype='group' objname=groupname %] 
    34    <table border="0"> 
    45    <tr><td> 
     
    1011    [% group.get_c_field('description') | html %] 
    1112    </table> 
     13    <div style="clear: both;"></div> 
    1214        <a href="[% c.uri_for(groupname) %]"><span [% 'id="oactive"' IF subform == '' %]>SystÚme</span></a> 
    1315        <a href="[% c.uri_for(groupname, 'users') %]"><span [% 'id="oactive"' IF subform == 'users' %]>Utilisateurs</span></a> 
  • LATMOS-Accounts-Web/root/html/users/menu.tt

    r512 r544  
    11<!-- $Id$ --> 
    22<div id="omenu"> 
     3 
     4[% INCLUDE 'includes/obj_prev_next.tt' objtype='user' objname=username %] 
     5 
    36<table border="0"> 
    47<tr><td> 
     
    1013[% user.get_c_field('sn') | html %] 
    1114[% user.get_c_field('givenName') | html %] 
    12 </td></tr> 
     15</td> 
     16</tr> 
    1317</table> 
     18<div style="clear: both;"></div> 
    1419        <a href="[% c.uri_for(username) %]"><span [% 'id="oactive"' IF subform == '' %]>SystÚme</span></a> 
    1520        <a href="[% c.uri_for(username, 'status') %]"><span [% 'id="oactive"' IF subform == 'status' %]>Status</span></a> 
Note: See TracChangeset for help on using the changeset viewer.