5 |
$per_page => undef; |
$per_page => undef; |
6 |
$from_date => undef; |
$from_date => undef; |
7 |
$to_date => undef; |
$to_date => undef; |
8 |
|
$search => undef; |
9 |
</%args> |
</%args> |
10 |
|
|
11 |
<%init> |
<%init> |
26 |
$per_page ||= $filter->argument_value('per_page') || 10; |
$per_page ||= $filter->argument_value('per_page') || 10; |
27 |
$from_date ||= $filter->argument_value('from_date'); |
$from_date ||= $filter->argument_value('from_date'); |
28 |
$to_date ||= $filter->argument_value('to_date'); |
$to_date ||= $filter->argument_value('to_date'); |
29 |
|
$search ||= $filter->argument_value('search'); |
30 |
|
|
31 |
$revisions->unlimit(); |
$revisions->unlimit(); |
32 |
|
|
34 |
$revisions->limit( column => 'commit_date', operator => '>=', value => $from_date, entry_aggregator => 'AND' ) if ($from_date); |
$revisions->limit( column => 'commit_date', operator => '>=', value => $from_date, entry_aggregator => 'AND' ) if ($from_date); |
35 |
$revisions->limit( column => 'commit_date', operator => '<=', value => $to_date, entry_aggregator => 'AND' ) if ($to_date); |
$revisions->limit( column => 'commit_date', operator => '<=', value => $to_date, entry_aggregator => 'AND' ) if ($to_date); |
36 |
|
|
37 |
|
$revisions->limit( column => 'message', operator => 'LIKE', value => '%' . $search . '%' ) if ($search); |
38 |
|
|
39 |
$revisions->order_by({ column => 'commit_date', order => 'desc' }); |
$revisions->order_by({ column => 'commit_date', order => 'desc' }); |
40 |
$revisions->set_page_info( |
$revisions->set_page_info( |
41 |
current_page => $page, |
current_page => $page, |
42 |
per_page => $per_page, |
per_page => $per_page, |
43 |
); |
); |
44 |
|
|
45 |
|
warn $revisions->build_select_query; |
46 |
|
|
47 |
$revisions->goto_first_item; |
$revisions->goto_first_item; |
48 |
|
|
49 |
|
|
60 |
<% $filter->form_field('per_page', default_value => $per_page ) %> |
<% $filter->form_field('per_page', default_value => $per_page ) %> |
61 |
<% $filter->form_field('from_date', default_value => $from_date ) %> |
<% $filter->form_field('from_date', default_value => $from_date ) %> |
62 |
<% $filter->form_field('to_date', default_value => $to_date ) %> |
<% $filter->form_field('to_date', default_value => $to_date ) %> |
63 |
|
<% $filter->form_field('search', default_value => $search ) %> |
64 |
|
|
65 |
<%perl> |
<%perl> |
66 |
if (my $nr = $revisions->pager->total_entries) { |
if (my $nr = $revisions->pager->total_entries) { |
73 |
<dl> |
<dl> |
74 |
% while (my $r = $revisions->next) { |
% while (my $r = $revisions->next) { |
75 |
<dt><% Jifty->web->tangent( |
<dt><% Jifty->web->tangent( |
76 |
url => '/revision/' . $r->revision, |
url => '/rev/' . $r->revision, |
77 |
label => $r->revision, |
label => $r->revision, |
78 |
) %> |
) %> |
79 |
<span class="author"><% $r->author %></span> |
<span class="author"><% $r->author %></span> |
83 |
<pre class="commit_message"><% $r->message %></pre> |
<pre class="commit_message"><% $r->message %></pre> |
84 |
% if ($show_actions) { |
% if ($show_actions) { |
85 |
<ul class="actions"> |
<ul class="actions"> |
86 |
|
% $actions->unlimit; |
87 |
% $actions->limit( column => 'revision', value => $r->revision ); |
% $actions->limit( column => 'revision', value => $r->revision ); |
88 |
% while (my $a = $actions->next) { |
% while (my $a = $actions->next) { |
89 |
<li><tt class="action-<% $a->type %>"><% $a->type %> <% $a->branch %> <% $a->rel_path %></tt></li> |
<li><tt class="action-<% $a->type %>"><% $a->type %> <% $a->branch %> <% $a->rel_path %></tt></li> |