/[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 64 - (show annotations)
Sun Jun 11 00:30:05 2006 UTC (17 years, 10 months ago) by dpavlin
File size: 988 byte(s)
new css design
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 % if (not Jifty->web->current_user->id) {
19 <% Jifty->web->redirect( '/login/landscapes' ) %>
20 % } else {
21
22 <div class="outer-landscapes">
23
24 % while (my $l = $landscapes->next) {
25 <div class="float-left boxed">
26
27 <b><% $l->name %></b>
28
29 <br/><small>
30
31 Source systems:
32 <ul>
33 % foreach my $s ( sort { $a->name cmp $b->name } @{$l->sources->items_array_ref} ) {
34 <li><% admin_link( $s->name, '/source/' . $s->id ) %></li>
35 % }
36 </ul>
37
38 Destination systems:
39 <ul>
40 % foreach my $d ( sort { $a->name cmp $b->name } @{$l->destinations->items_array_ref} ) {
41 <li><% admin_link( $d->name, '/destination/' . $d->id ) %></li>
42 % }
43 </ul>
44
45 </small>
46
47 </div>
48
49 % } # while
50
51 </div>
52
53 % }
54
55 </&>

  ViewVC Help
Powered by ViewVC 1.1.26