/[transports]/trunk/web/templates/users/all
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Annotation of /trunk/web/templates/users/all

Parent Directory Parent Directory | Revision Log Revision Log


Revision 92 - (hide annotations)
Fri Jun 23 12:36:26 2006 UTC (17 years, 10 months ago) by dpavlin
File size: 962 byte(s)
allow users to edit own data to provide self-help page
1 dpavlin 65 <%init>
2     my $users = Transports::Model::UserCollection->new();
3     $users->unlimit;
4     </%init>
5    
6     <!-- outer users div -->
7     <div>
8    
9     % while (my $u = $users->next) {
10 dpavlin 70 <div class="float-left boxed boxed-gray">
11 dpavlin 92 % if (Jifty->web->current_user->admin || Jifty->web->current_user->id == $u->id ) {
12 dpavlin 65 <% Jifty->web->link(
13     label => $u->name,
14     onclick => {
15     replace_with => '/users/form',
16     args => { user_id => $u->id },
17     }
18     ) %>
19     % } else {
20     <% $u->name %>
21     % }
22    
23     <br/><tt><% $u->email %></tt>
24    
25     <br/><small>
26    
27     <em><% $u->admin ? 'admin' : ( $u->can_import ? 'import request' : 'user' ) %></em>
28     on:
29    
30     <ul>
31     % foreach my $l (sort map { $_->landscape->name } @{$u->landscapes->items_array_ref} ) {
32     <li><% $l %></li>
33     % }
34     </ul>
35    
36     </small>
37     </div>
38    
39     % }
40    
41     <!-- /outer users div -->
42     </div>
43    
44 dpavlin 82 % if (Jifty->web->current_user->admin) {
45 dpavlin 65
46 dpavlin 92 <div class="cl">
47     <% Jifty->web->link(
48     label => 'Add new user',
49     onclick => {
50     replace_with => '/users/form',
51     args => { user_id => 0 },
52     }
53     ) %>
54     </div>
55 dpavlin 65
56 dpavlin 82 % }

  ViewVC Help
Powered by ViewVC 1.1.26