3 |
</%args> |
</%args> |
4 |
<%init> |
<%init> |
5 |
my $transports = Transports::Model::TransportCollection->new(); |
my $transports = Transports::Model::TransportCollection->new(); |
6 |
$transports->unlimit(); |
if (Jifty->web->current_user->admin) { |
7 |
|
$transports->unlimit(); |
8 |
|
} else { |
9 |
|
$transports->limit( |
10 |
|
column => 'created_by', |
11 |
|
value => Jifty->web->current_user->id, |
12 |
|
) |
13 |
|
} |
14 |
$transports->order_by({ column => 'date' }); |
$transports->order_by({ column => 'date' }); |
15 |
$transports->set_page_info( |
$transports->set_page_info( |
16 |
current_page => $page, |
current_page => $page, |
21 |
|
|
22 |
<table> |
<table> |
23 |
<tr> |
<tr> |
24 |
<th>source</th> |
<th>src</th> |
25 |
<th>destination</th> |
<th>dest</th> |
26 |
<th>request nr</th> |
<th>class</th> |
27 |
<th>dependency</th> |
<th>req.nr</th> |
28 |
|
<th>dep</th> |
29 |
<th>created by</th> |
<th>created by</th> |
30 |
|
<th>description</th> |
31 |
|
% if (Jifty->web->current_user->admin) { |
32 |
<th> </th> |
<th> </th> |
33 |
|
% } |
34 |
</th> |
</th> |
35 |
</tr> |
</tr> |
36 |
|
|
39 |
<tr class="<% ++$i % 2 == 0 ? 'alt' : '' %>"> |
<tr class="<% ++$i % 2 == 0 ? 'alt' : '' %>"> |
40 |
<td><% $t->source->name %></td> |
<td><% $t->source->name %></td> |
41 |
<td><% $t->destination->name %></td> |
<td><% $t->destination->name %></td> |
42 |
|
<td><% $t->class->name %></td> |
43 |
<td><tt><% $t->request_nr %></tt></td> |
<td><tt><% $t->request_nr %></tt></td> |
44 |
<td> |
<td> |
45 |
<% $t->client_dependent ? 'client' : 'none' %> |
<% $t->client_dependent ? 'client' : 'none' %> |
49 |
<em><% $t->created_by->name %></em> |
<em><% $t->created_by->name %></em> |
50 |
% } |
% } |
51 |
</td> |
</td> |
52 |
|
<td><% $t->description %></td> |
53 |
|
% if (Jifty->web->current_user->admin) { |
54 |
<td><% Jifty->web->link( label => 'edit', url => '/edit/' . $t->id ) %></td> |
<td><% Jifty->web->link( label => 'edit', url => '/edit/' . $t->id ) %></td> |
55 |
|
% } |
56 |
</tr> |
</tr> |
57 |
% } |
% } |
58 |
</table> |
</table> |