/[transports]/trunk/web/templates/fragments/user_on_landscape
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/fragments/user_on_landscape

Parent Directory Parent Directory | Revision Log Revision Log


Revision 51 - (hide annotations)
Mon Jun 5 14:06:58 2006 UTC (18 years ago) by dpavlin
File size: 1013 byte(s)
added landscapes (collection of source and destination clients) to the mix
instead of specifing users for sources (and destinations which wasn't
implemented anyway)
1 dpavlin 51 <%args>
2     $user_id
3     $delete_user_on_landscape_id => 0
4     </%args>
5     <%init>
6    
7     if ($delete_user_on_landscape_id) {
8     my $u = Transports::Model::UserOnLandscape->new();
9     $u->load_by_cols( id => $delete_user_on_landscape_id );
10     $m->out("Deleted system ", $u->landscape->name);
11     $u->delete;
12     }
13    
14     my $landscapes = Transports::Model::UserOnLandscapeCollection->new();
15     $landscapes->limit(
16     column => 'user_on',
17     value => $user_id,
18     quote_value => 0,
19     );
20    
21     my $landscape = Jifty->web->new_action(
22     class => 'CreateUserOnLandscape',
23     monkier => 'create',
24     );
25     </%init>
26    
27     Landscapes:
28     <ul>
29     % while (my $s = $landscapes->next) {
30     <li><% $s->landscape->name %>
31     <% Jifty->web->link(
32     label => 'remove' ,
33     onclick => { args => { delete_user_on_landscape_id => $s->id }}
34     ) %>
35     </li>
36     % }
37     </ul>
38    
39     <% Jifty->web->form->start %>
40     <% $landscape->form_field('user_on', render_as => 'hidden', default_value => $user_id ) %>
41     <% $landscape->form_field('landscape') %>
42     <% Jifty->web->form->submit( label => 'Add landscape' ) %>
43     <% Jifty->web->form->end %>
44    

  ViewVC Help
Powered by ViewVC 1.1.26