21 |
|
|
22 |
render_param( $filter => 'author' ); |
render_param( $filter => 'author' ); |
23 |
render_param( $filter => 'branch' ); |
render_param( $filter => 'branch' ); |
24 |
render_param( $filter => 'rel_path' ); |
render_param( $filter => 'rel_path', default => get('rel_path') ); |
25 |
render_param( $filter => 'search' ); |
render_param( $filter => 'search' ); |
26 |
|
|
27 |
div { attr { class => 'inline' } |
div { attr { class => 'inline' } |
31 |
render_param( $filter => 'per_page' ); |
render_param( $filter => 'per_page' ); |
32 |
render_param( $filter => 'show_actions' ); |
render_param( $filter => 'show_actions' ); |
33 |
|
|
34 |
} |
}; |
35 |
|
|
36 |
form_submit( |
form_submit( |
37 |
label => _("Filter commits") |
label => _("Filter commits") |
43 |
if ( $revisions ) { |
if ( $revisions ) { |
44 |
|
|
45 |
sub pager { |
sub pager { |
46 |
my $revisions = shift; |
my ( $action, $collection ) = @_; |
47 |
|
|
48 |
|
return if $collection->pager->last_page == 1; |
49 |
|
|
50 |
div { |
div { |
51 |
attr { class => 'pager' }; |
attr { class => 'pager' }; |
52 |
|
|
53 |
if ( $revisions->pager->previous_page ) { |
if ( $collection->pager->previous_page ) { |
54 |
outs_raw $filter->button( |
outs_raw $action->button( |
55 |
submit => $filter, |
submit => $action, |
56 |
label => _("previous page"), |
label => _("previous page"), |
57 |
arguments => { page => $revisions->pager->previous_page }, |
arguments => { page => $collection->pager->previous_page }, |
58 |
); |
); |
59 |
} |
} |
60 |
|
|
61 |
if ($revisions->pager->last_page > 1) { |
if ($collection->pager->last_page > 1) { |
62 |
span { |
span { |
63 |
_("page"), ' ', $revisions->pager->current_page, ' ',_("of"), ' ', $revisions->pager->last_page |
_("page"), ' ', $collection->pager->current_page, ' ',_("of"), ' ', $collection->pager->last_page |
64 |
} |
} |
65 |
}; |
}; |
66 |
|
|
67 |
if ($revisions->pager->next_page) { |
if ($collection->pager->next_page) { |
68 |
outs_raw( $filter->button( |
outs_raw( $action->button( |
69 |
submit => $filter, |
submit => $action, |
70 |
label => _("next page"), |
label => _("next page"), |
71 |
arguments => { page => $revisions->pager->next_page }, |
arguments => { page => $collection->pager->next_page }, |
72 |
) ); |
) ); |
73 |
} |
} |
74 |
} |
} |
75 |
} |
} |
76 |
|
|
77 |
pager( $revisions ); |
pager( $filter, $revisions ); |
78 |
|
|
79 |
my $show_actions = get('show_actions') || $filter->argument_value('show_actions'); |
my $show_actions = get('show_actions') || $filter->argument_value('show_actions'); |
80 |
my $rel_path = get('rel_path') || $filter->argument_value('rel_path'); |
my $rel_path = get('rel_path') || $filter->argument_value('rel_path'); |
82 |
|
|
83 |
dl { |
dl { |
84 |
attr { class => 'results' }; |
attr { class => 'results' }; |
85 |
|
|
86 |
while (my $r = $revisions->next ) { |
while (my $r = $revisions->next ) { |
87 |
dt { |
dt { |
88 |
|
attr { class => 'commit' } |
89 |
tt { $r->revision } |
tt { $r->revision } |
90 |
span { attr { class => 'author' } $r->author } |
span { attr { class => 'author' } $r->author } |
91 |
span { attr { class => 'commit_date' } $r->commit_date } |
span { attr { class => 'commit_date' } $r->commit_date } |
92 |
} |
} |
93 |
|
|
94 |
dd { |
dd { |
95 |
pre { attr { class => 'commit_message' } $r->message } |
pre { attr { class => 'commit_message' } $r->message }; |
|
}; |
|
96 |
|
|
97 |
if ( $show_actions ) { |
if ( $show_actions ) { |
98 |
my $actions = SVNBrowser::Model::ActionCollection->new(); |
my $actions = SVNBrowser::Model::ActionCollection->new(); |
99 |
$actions->unlimit; |
$actions->unlimit; |
100 |
$actions->limit( column => 'revision', value => $r->revision ); |
$actions->limit( column => 'revision', value => $r->revision ); |
101 |
$actions->limit( column => 'rel_path', value => $rel_path, operator => 'STARTSWITH' ) if ($rel_path); |
$actions->limit( column => 'rel_path', value => $rel_path, operator => 'STARTSWITH' ) if ($rel_path); |
102 |
|
|
103 |
ul { attr { class => 'actions' }; |
ul { attr { class => 'actions' }; |
104 |
while (my $a = $actions->next) { |
while (my $a = $actions->next) { |
105 |
li { |
li { |
106 |
tt { attr { class => 'action-' . $a->type } |
tt { attr { class => 'action-' . $a->type } |
107 |
$a->type, |
outs ( |
108 |
$a->branch, |
$a->type, ' ', |
109 |
$a->rel_path |
$a->branch |
110 |
|
); |
111 |
|
hyperlink( |
112 |
|
label => $a->rel_path, |
113 |
|
parameters => { |
114 |
|
rel_path => $a->rel_path, |
115 |
|
} |
116 |
|
); |
117 |
|
} |
118 |
} |
} |
119 |
} |
} |
120 |
} |
} |
123 |
} |
} |
124 |
} |
} |
125 |
|
|
126 |
pager( $revisions ); |
pager( $filter, $revisions ); |
127 |
|
|
128 |
} |
} |
129 |
|
|