1 |
dpavlin |
5 |
use strict; |
2 |
|
|
use warnings; |
3 |
|
|
|
4 |
|
|
=head1 NAME |
5 |
|
|
|
6 |
|
|
SVNBrowser::Action::Filter |
7 |
|
|
|
8 |
|
|
=cut |
9 |
|
|
|
10 |
|
|
package SVNBrowser::Action::Filter; |
11 |
|
|
use base qw/SVNBrowser::Action Jifty::Action/; |
12 |
|
|
|
13 |
|
|
use Data::Dump qw/dump/; |
14 |
|
|
|
15 |
|
|
use Jifty::Param::Schema; |
16 |
|
|
use Jifty::Action schema { |
17 |
|
|
param author => |
18 |
|
|
label is 'Developer login', |
19 |
|
|
render as 'combobox', |
20 |
|
|
available are defer { |
21 |
|
|
my $authors = SVNBrowser::Model::RevisionCollection->new; |
22 |
|
|
$authors->column( |
23 |
|
|
column => 'author', |
24 |
|
|
function => 'distinct', |
25 |
|
|
); |
26 |
|
|
$authors->unlimit; |
27 |
|
|
[{ |
28 |
|
|
display_from => 'author', |
29 |
|
|
value_from => 'author', |
30 |
|
|
collection => $authors, |
31 |
|
|
}]; |
32 |
|
|
}; |
33 |
|
|
|
34 |
|
|
}; |
35 |
|
|
|
36 |
|
|
sub sticky_on_success { 1; } |
37 |
|
|
|
38 |
|
|
=head2 take_action |
39 |
|
|
|
40 |
|
|
=cut |
41 |
|
|
|
42 |
|
|
sub take_action { |
43 |
|
|
my $self = shift; |
44 |
|
|
|
45 |
|
|
my $author = $self->argument_value('author'); |
46 |
|
|
warn "author: $author\n"; |
47 |
|
|
|
48 |
|
|
$self->result->message('Success'); |
49 |
|
|
|
50 |
|
|
return 1; |
51 |
|
|
} |
52 |
|
|
|
53 |
|
|
|
54 |
|
|
1; |
55 |
|
|
|