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

Diff of /trunk/web/templates/transports/table

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 73 by dpavlin, Mon Jun 12 03:44:50 2006 UTC revision 74 by dpavlin, Mon Jun 12 10:14:50 2006 UTC
# Line 2  Line 2 
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    
# Line 27  if (Jifty->web->current_user->admin) { Line 28  if (Jifty->web->current_user->admin) {
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,
# Line 40  if (my $nr = $transports->pager->total_e Line 41  if (my $nr = $transports->pager->total_e
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(
# Line 63  use Data::Dumper; Line 65  use Data::Dumper;
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  % }  % }

Legend:
Removed from v.73  
changed lines
  Added in v.74

  ViewVC Help
Powered by ViewVC 1.1.26