1 |
<%args> |
2 |
$next |
3 |
</%args> |
4 |
|
5 |
<%init> |
6 |
my $filter = Jifty->web->new_action( |
7 |
class => 'Filter', |
8 |
moniker => 'filter_list', |
9 |
arguments => { %ARGS }, |
10 |
); |
11 |
</%init> |
12 |
|
13 |
<&| /_elements/wrapper, title => "SVN Reporitory Browser" &> |
14 |
|
15 |
<% Jifty->web->form->start %> |
16 |
|
17 |
<% $filter->form_field('author') %> |
18 |
<% $filter->form_field('branch') %> |
19 |
<% $filter->form_field('search') %> |
20 |
|
21 |
<div class="inline"> |
22 |
<% $filter->form_field('from_date') %> |
23 |
<% $filter->form_field('to_date') %> |
24 |
<% $filter->form_field('per_page') %> |
25 |
<% $filter->form_field('show_actions') %> |
26 |
</div> |
27 |
|
28 |
<div style="clear: left"> |
29 |
<% $filter->button( label => 'Filter commits' ) %> |
30 |
</div> |
31 |
|
32 |
% if ( $filter->result and my $revisions = $filter->result->content('revisions') ) { |
33 |
|
34 |
% my $actions = SVNBrowser::Model::ActionCollection->new(); |
35 |
<dl> |
36 |
% while (my $r = $revisions->next) { |
37 |
<dt><% Jifty->web->tangent( |
38 |
url => '/rev/' . $r->revision, |
39 |
label => $r->revision, |
40 |
continuation => $next, |
41 |
) %> |
42 |
<span class="author"><% $r->author %></span> |
43 |
<span class="commit_date"><% $r->commit_date %></span> |
44 |
</dt> |
45 |
<dd> |
46 |
<pre class="commit_message"><% $r->message %></pre> |
47 |
% if ($filter->argument_value('show_actions')) { |
48 |
<ul class="actions"> |
49 |
% $actions->unlimit; |
50 |
% $actions->limit( column => 'revision', value => $r->revision ); |
51 |
% while (my $a = $actions->next) { |
52 |
% my $full_path = $a->branch . $a->rel_path ; |
53 |
<li><tt class="action-<% $a->type %>"><% $a->type %> <% $full_path %> |
54 |
<% Jifty->web->tangent( url => '/rev/' . $r->revision . $full_path, label => 'diff', continuation => $next ) %> |
55 |
</tt></li> |
56 |
% } |
57 |
</ul> |
58 |
% } |
59 |
|
60 |
</dd> |
61 |
% } |
62 |
</dl> |
63 |
|
64 |
% if ($revisions->pager->previous_page) { |
65 |
<% $filter->button( |
66 |
label => "<<", |
67 |
escape_label => 0, |
68 |
arguments => { |
69 |
page => $revisions->pager->previous_page, |
70 |
} |
71 |
) %> |
72 |
% } |
73 |
|
74 |
% if ($revisions->pager->last_page > 1) { |
75 |
page <% $revisions->pager->current_page %> of <% $revisions->pager->last_page %> |
76 |
% } |
77 |
|
78 |
% if ($revisions->pager->next_page) { |
79 |
<% $filter->button( |
80 |
label => ">>", |
81 |
escape_label => 0, |
82 |
arguments => { |
83 |
page => $revisions->pager->next_page, |
84 |
} |
85 |
) %> |
86 |
% } |
87 |
|
88 |
<!-- no $revisions --> |
89 |
% } |
90 |
|
91 |
<% Jifty->web->form->end %> |
92 |
|
93 |
</&> |