1 |
<%args> |
2 |
$next => undef |
3 |
</%args> |
4 |
|
5 |
<%init> |
6 |
my $filter = Jifty->web->new_action( |
7 |
class => 'Filter', |
8 |
moniker => 'filter_list', |
9 |
arguments => { %ARGS }, |
10 |
); |
11 |
|
12 |
if (! $next) { |
13 |
$filter->argument_values({ show_actions => 1 }); |
14 |
$filter->run; |
15 |
} |
16 |
|
17 |
#use Data::Dump qw/dump/; |
18 |
#warn "ARGS = ", dump( %ARGS ); |
19 |
</%init> |
20 |
|
21 |
<&| /_elements/wrapper, title => "SVN Reporitory Browser" &> |
22 |
|
23 |
<% Jifty->web->form->start %> |
24 |
|
25 |
<% $filter->form_field('author') %> |
26 |
<% $filter->form_field('branch') %> |
27 |
<% $filter->form_field('rel_path') %> |
28 |
<% $filter->form_field('search') %> |
29 |
|
30 |
<div class="inline"> |
31 |
<% $filter->form_field('from_date') %> |
32 |
<% $filter->form_field('to_date') %> |
33 |
<% $filter->form_field('per_page') %> |
34 |
<% $filter->form_field('show_actions') %> |
35 |
</div> |
36 |
|
37 |
<div style="clear: left"> |
38 |
<% $filter->button( label => 'Filter commits' ) %> |
39 |
</div> |
40 |
|
41 |
% if ( $filter->result and my $revisions = $filter->result->content('revisions') ) { |
42 |
|
43 |
<dl> |
44 |
% while (my $r = $revisions->next) { |
45 |
<& /actions, |
46 |
revision => $r->revision, |
47 |
rel_path => $filter->argument_value('rel_path'), |
48 |
next => $next, |
49 |
show_actions => $filter->argument_value('show_actions'), |
50 |
r => $r |
51 |
&> |
52 |
% } |
53 |
</dl> |
54 |
|
55 |
% if ($revisions->pager->previous_page) { |
56 |
<% $filter->button( |
57 |
label => "<<", |
58 |
escape_label => 0, |
59 |
arguments => { |
60 |
page => $revisions->pager->previous_page, |
61 |
} |
62 |
) %> |
63 |
% } |
64 |
|
65 |
% if ($revisions->pager->last_page > 1) { |
66 |
page <% $revisions->pager->current_page %> of <% $revisions->pager->last_page %> |
67 |
% } |
68 |
|
69 |
% if ($revisions->pager->next_page) { |
70 |
<% $filter->button( |
71 |
label => ">>", |
72 |
escape_label => 0, |
73 |
arguments => { |
74 |
page => $revisions->pager->next_page, |
75 |
} |
76 |
) %> |
77 |
% } |
78 |
|
79 |
<!-- no $revisions --> |
80 |
% } |
81 |
|
82 |
<% Jifty->web->form->end %> |
83 |
|
84 |
</&> |