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

Contents of /trunk/web/templates/landscapes

Parent Directory Parent Directory | Revision Log Revision Log


Revision 72 - (show annotations)
Mon Jun 12 03:44:50 2006 UTC (17 years, 11 months ago) by dpavlin
File size: 879 byte(s)
move redirect to /login if uses isn't logged in to dispatcher (where it should be)
1 <%init>
2 my $landscapes = Transports::Model::LandscapeCollection->new();
3 $landscapes->unlimit;
4
5 sub admin_link {
6 my $label = shift;
7 my $url = join('', @_);
8 if (Jifty->web->current_user->admin) {
9 return Jifty->web->link( label => $label, url => $url );
10 } else {
11 return $label;
12 }
13 }
14
15 </%init>
16 <&|/_elements/wrapper&>
17
18 <div class="outer-landscapes">
19
20 % while (my $l = $landscapes->next) {
21 <div class="float-left boxed">
22
23 <b><% $l->name %></b>
24
25 <br/><small>
26
27 Source systems:
28 <ul>
29 % foreach my $s ( sort { $a->name cmp $b->name } @{$l->sources->items_array_ref} ) {
30 <li><% admin_link( $s->name, '/source/' . $s->id ) %></li>
31 % }
32 </ul>
33
34 Destination systems:
35 <ul>
36 % foreach my $d ( sort { $a->name cmp $b->name } @{$l->destinations->items_array_ref} ) {
37 <li><% admin_link( $d->name, '/destination/' . $d->id ) %></li>
38 % }
39 </ul>
40
41 </small>
42
43 </div>
44
45 % } # while
46
47 </div>
48
49 </&>

  ViewVC Help
Powered by ViewVC 1.1.26