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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 39 - (show annotations)
Sat May 27 17:23:34 2006 UTC (17 years, 11 months ago) by dpavlin
File size: 1347 byte(s)
converted hrefs to Jifty->web->link
1 <%args>
2 $page => 1
3 </%args>
4 <%init>
5 my $transports = Transports::Model::TransportCollection->new();
6 $transports->unlimit();
7 $transports->order_by({ column => 'date' });
8 $transports->set_page_info(
9 current_page => $page,
10 per_page => 5,
11 );
12 $m->out("No transports found.") if ($transports->pager->total_entries == 0);
13 </%init>
14
15 <table>
16 <tr>
17 <th>source</th>
18 <th>destination</th>
19 <th>request nr</th>
20 <th>dependency</th>
21 <th>created by</th>
22 <th>&nbsp;</th>
23 </th>
24 </tr>
25
26 % my $i = 0;
27 % while (my $t = $transports->next) {
28 <tr class="<% ++$i % 2 == 0 ? 'alt' : '' %>">
29 <td><% $t->source->name %></td>
30 <td><% $t->destination->name %></td>
31 <td><tt><% $t->request_nr %></tt></td>
32 <td>
33 <% $t->client_dependent ? 'client' : 'none' %>
34 </td>
35 <td>
36 % if ($t->created_by) {
37 <em><% $t->created_by->name %></em>
38 % }
39 </td>
40 <td><% Jifty->web->link( label => 'edit', url => '/edit/' . $t->id ) %></td>
41 </tr>
42 % }
43 </table>
44
45 % if ($transports->pager->previous_page) {
46 <% Jifty->web->link(
47 label => "Previous page",
48 onclick => { args => { page => $transports->pager->previous_page } }
49 ) %>
50 % }
51
52 % if ($transports->pager->last_page > 1) {
53 page <% $page %> of <% $transports->pager->last_page %>
54 % }
55
56 % if ($transports->pager->next_page) {
57 <% Jifty->web->link(
58 label => "Next page",
59 onclick => { args => { page => $transports->pager->next_page } }
60 ) %>
61 % }
62

  ViewVC Help
Powered by ViewVC 1.1.26