2 |
$page => 1 |
$page => 1 |
3 |
$show_description => 0 |
$show_description => 0 |
4 |
$show_comment => 0 |
$show_comment => 0 |
5 |
|
$order => 'date' |
6 |
</%args> |
</%args> |
7 |
<%init> |
<%init> |
8 |
|
|
28 |
value => Jifty->web->current_user->id, |
value => Jifty->web->current_user->id, |
29 |
); |
); |
30 |
} |
} |
31 |
$transports->order_by({ column => 'date' }); |
$transports->order_by({ column => $order }); |
32 |
$transports->set_page_info( |
$transports->set_page_info( |
33 |
current_page => $page, |
current_page => $page, |
34 |
per_page => 10, |
per_page => 10, |
41 |
} else { |
} else { |
42 |
$m->out("No transports found.") |
$m->out("No transports found.") |
43 |
} |
} |
44 |
|
|
45 |
</%init> |
</%init> |
46 |
|
|
47 |
<% Jifty->web->link( |
<% Jifty->web->link( |
65 |
my $t = $transports->first; |
my $t = $transports->first; |
66 |
$transports->goto_first_item; |
$transports->goto_first_item; |
67 |
warn Dumper( $t->id ); |
warn Dumper( $t->id ); |
68 |
|
|
69 |
|
sub th { |
70 |
|
my ($label, $this_order, $order) = @_; |
71 |
|
warn "order: $order this_order: $this_order\n"; |
72 |
|
if ($order eq $this_order) { |
73 |
|
return $label; |
74 |
|
} else { |
75 |
|
return Jifty->web->link( |
76 |
|
label => $label, |
77 |
|
onclick => { |
78 |
|
args => { order => $this_order }, |
79 |
|
} |
80 |
|
); |
81 |
|
} |
82 |
|
} |
83 |
|
|
84 |
</%perl> |
</%perl> |
85 |
|
|
86 |
<table> |
<table> |
87 |
<tr> |
<tr> |
88 |
<th>src</th> |
<th><% th('src','source',$order) %></th> |
89 |
<th>dest</th> |
<th><% th('dest','destination',$order) %></th> |
90 |
<th>class</th> |
<th><% th('class','class',$order) %></th> |
91 |
<th>req.nr</th> |
<th><% th('req.nr','request_nr',$order) %></th> |
92 |
<th>dep</th> |
<th><% th('dep','client_dependent',$order) %></th> |
93 |
<th>created by</th> |
<th><% th('created by','created_by',$order) %></th> |
94 |
% if ($show_description) { |
% if ($show_description) { |
95 |
<th>description</th> |
<th>description</th> |
96 |
% } |
% } |
97 |
<th>import</th> |
<th><% th('import','return_code',$order) %></th> |
98 |
% if ($show_comment) { |
% if ($show_comment) { |
99 |
<th>comment</th> |
<th>comment</th> |
100 |
% } |
% } |