1 |
<%args> |
<%args> |
2 |
$page => 1 |
$page => undef; |
3 |
|
|
4 |
$author => undef; |
$author => undef; |
5 |
|
|
6 |
|
$show_actions => undef; |
7 |
|
|
8 |
</%args> |
</%args> |
9 |
|
|
10 |
<%init> |
<%init> |
11 |
my $filter = Jifty->web->new_action( |
my $filter = Jifty->web->new_action( |
12 |
class => 'Filter', |
class => 'Filter', |
13 |
moniker => 'filer_list', |
moniker => 'filer_list', |
14 |
|
# arguments => { |
15 |
|
# author => $author, |
16 |
|
# show_actions => $show_actions, |
17 |
|
# }, |
18 |
); |
); |
19 |
|
|
20 |
my $revisions = SVNBrowser::Model::RevisionCollection->new(); |
my $revisions = SVNBrowser::Model::RevisionCollection->new(); |
21 |
|
|
22 |
$author ||= $filter->argument_value('author'); |
$author ||= $filter->argument_value('author'); |
23 |
|
$show_actions ||= $filter->argument_value('show_actions'); |
24 |
|
$page ||= $filter->argument_value('page'); |
25 |
|
|
26 |
if ($author) { |
if ($author) { |
27 |
$revisions->limit( |
$revisions->limit( |
34 |
$revisions->order_by({ column => 'commit_date', order => 'desc' }); |
$revisions->order_by({ column => 'commit_date', order => 'desc' }); |
35 |
$revisions->set_page_info( |
$revisions->set_page_info( |
36 |
current_page => $page, |
current_page => $page, |
37 |
per_page => 20, |
per_page => 10, |
38 |
); |
); |
39 |
$revisions->goto_first_item; |
$revisions->goto_first_item; |
40 |
|
|
43 |
|
|
44 |
</%init> |
</%init> |
45 |
|
|
46 |
<&| /_elements/wrapper, title => "Statistics" &> |
<&| /_elements/wrapper, title => "SVN Reporitory Browser" &> |
47 |
|
|
48 |
<% Jifty->web->form->start %> |
<% Jifty->web->form->start %> |
49 |
<% $filter->form_field('author', default_value => $author ) %> |
<% $filter->form_field('author', default_value => $author ) %> |
50 |
<% $filter->button( label => 'Show just this commiter' ) %> |
<% $filter->button( label => 'Show just this commiter' ) %> |
51 |
<% Jifty->web->form->end %> |
<% $filter->form_field('show_actions', default_value => $show_actions ) %> |
52 |
|
|
53 |
<%perl> |
<%perl> |
54 |
if (my $nr = $revisions->pager->total_entries) { |
if (my $nr = $revisions->pager->total_entries) { |
69 |
</dt> |
</dt> |
70 |
<dd> |
<dd> |
71 |
<pre class="commit_message"><% $r->message %></pre> |
<pre class="commit_message"><% $r->message %></pre> |
72 |
<ul class="paths"> |
% if ($show_actions) { |
73 |
% $actions->limit( column => 'revision', value => $r->revision ); |
<ul class="actions"> |
74 |
% while (my $a = $actions->next) { |
% $actions->limit( column => 'revision', value => $r->revision ); |
75 |
<li><tt><% $a->type %> <% $a->branch %> <% $a->rel_path %></tt></li> |
% while (my $a = $actions->next) { |
76 |
|
<li><tt class="action-<% $a->type %>"><% $a->type %> <% $a->branch %> <% $a->rel_path %></tt></li> |
77 |
|
% } |
78 |
|
</ul> |
79 |
% } |
% } |
|
</ul> |
|
80 |
|
|
81 |
</dd> |
</dd> |
82 |
% } |
% } |
83 |
</dl> |
</dl> |
84 |
|
|
85 |
% if ($revisions->pager->previous_page) { |
% if ($revisions->pager->previous_page) { |
86 |
<% Jifty->web->link( |
<% $filter->button( |
87 |
label => "Previous", |
label => "<<", |
88 |
onclick => { args => { page => $revisions->pager->previous_page } } |
escape_label => 0, |
89 |
|
arguments => { |
90 |
|
page => $revisions->pager->previous_page, |
91 |
|
} |
92 |
) %> |
) %> |
93 |
% } |
% } |
94 |
|
|
97 |
% } |
% } |
98 |
|
|
99 |
% if ($revisions->pager->next_page) { |
% if ($revisions->pager->next_page) { |
100 |
<% Jifty->web->link( |
<% $filter->button( |
101 |
label => "Next", |
label => ">>", |
102 |
onclick => { args => { page => $revisions->pager->next_page } } |
escape_label => 0, |
103 |
|
arguments => { |
104 |
|
page => $revisions->pager->next_page, |
105 |
|
} |
106 |
) %> |
) %> |
107 |
% } |
% } |
108 |
|
|
109 |
</&> |
<% Jifty->web->form->end %> |
110 |
|
|
111 |
|
</&> |