15 |
use Jifty::Param::Schema; |
use Jifty::Param::Schema; |
16 |
use Jifty::Action schema { |
use Jifty::Action schema { |
17 |
param author => |
param author => |
18 |
label is 'Developer login', |
label is _('Developer login'), |
19 |
render as 'combobox', |
render as 'combobox', |
20 |
available are defer { |
available are defer { |
21 |
my $authors = SVNBrowser::Model::RevisionCollection->new; |
my $authors = SVNBrowser::Model::RevisionCollection->new; |
34 |
}; |
}; |
35 |
|
|
36 |
param branch => |
param branch => |
37 |
label is 'In branch', |
label is _('In branch'), |
38 |
render as 'combobox', |
render as 'combobox', |
39 |
available are defer { |
available are defer { |
40 |
my $branches = SVNBrowser::Model::BranchCollection->new; |
my $branches = SVNBrowser::Model::BranchCollection->new; |
53 |
}; |
}; |
54 |
|
|
55 |
param rel_path => |
param rel_path => |
56 |
label is 'Path begins with'; |
label is _('Path begins with'); |
57 |
|
|
58 |
|
param path => |
59 |
|
label is _('Path contains'); |
60 |
|
|
61 |
param show_actions => |
param show_actions => |
62 |
label is 'Show file actions', |
label is _('Show file actions'), |
63 |
render as 'checkbox', |
render as 'checkbox', |
64 |
default is 1; |
default is 1; |
65 |
|
|
66 |
param page => |
param page => |
67 |
label is 'Current page'; |
label is _('Current page'); |
68 |
|
|
69 |
param per_page => |
param per_page => |
70 |
label is 'Commits on page', |
label is _('Commits on page'), |
71 |
render as 'Select', |
render as 'Select', |
72 |
available are qw( 10 20 30 50 100 ), |
available are qw( 10 20 30 50 100 ), |
73 |
default is 10; |
default is 10; |
74 |
|
|
75 |
param from_date => |
param from_date => |
76 |
label is 'From date', |
label is _('From date'), |
77 |
render as 'Date'; |
render as 'Date'; |
78 |
|
|
79 |
param to_date => |
param to_date => |
80 |
label is 'To date', |
label is _('To date'), |
81 |
render as 'Date'; |
render as 'Date'; |
82 |
|
|
83 |
param search => |
param search => |
84 |
label is 'Search in messages'; |
label is _('Search in messages'); |
85 |
|
|
86 |
}; |
}; |
87 |
|
|
124 |
$revisions->limit( alias => $rev_branches, column => 'branch', value => $b->id ); |
$revisions->limit( alias => $rev_branches, column => 'branch', value => $b->id ); |
125 |
} |
} |
126 |
|
|
127 |
|
my $rev_actions = $revisions->join( |
128 |
|
alias1 => 'main', column1 => 'revision', |
129 |
|
table2 => 'actions', column2 => 'revision' |
130 |
|
); |
131 |
|
|
132 |
if ( my $rel_path = $self->argument_value('rel_path') ) { |
if ( my $rel_path = $self->argument_value('rel_path') ) { |
|
my $rev_actions = $revisions->join( |
|
|
alias1 => 'main', column1 => 'revision', |
|
|
table2 => 'actions', column2 => 'revision' |
|
|
); |
|
133 |
$revisions->limit( alias => $rev_actions, column => 'rel_path', value => $rel_path, operator => 'STARTSWITH' ); |
$revisions->limit( alias => $rev_actions, column => 'rel_path', value => $rel_path, operator => 'STARTSWITH' ); |
134 |
} |
} |
135 |
|
|
136 |
|
if ( my $path = $self->argument_value('path') ) { |
137 |
|
$revisions->limit( alias => $rev_actions, column => 'rel_path', value => $path, operator => 'MATCHES' ); |
138 |
|
} |
139 |
|
|
140 |
$revisions->order_by({ column => 'commit_date', order => 'desc' }); |
$revisions->order_by({ column => 'commit_date', order => 'desc' }); |
141 |
$revisions->set_page_info( |
$revisions->set_page_info( |
142 |
current_page => $self->argument_value('page'), |
current_page => $self->argument_value('page'), |