/[SVNBrowser]/trunk/lib/SVNBrowser/Action/Filter.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /trunk/lib/SVNBrowser/Action/Filter.pm

Parent Directory Parent Directory | Revision Log Revision Log


Revision 10 - (show annotations)
Tue Dec 5 17:49:46 2006 UTC (17 years, 4 months ago) by dpavlin
File size: 1079 byte(s)
initial try to add "show actions" checkbox
1 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 param show_actions =>
35 label is 'Show file actions',
36 render as 'checkbox';
37
38 };
39
40 sub sticky_on_success { 1; }
41
42 =head2 take_action
43
44 =cut
45
46 sub take_action {
47 my $self = shift;
48
49 my $author = $self->argument_value('author');
50 my $msg = '';
51 $msg .= "Showing only commits for $author" if ($author);
52 $msg .= ( $msg ? ' and file actions' : ' File actions' ) if ( $self->argument_value('show_actions') );
53 $self->result->message($msg) if ($msg);
54
55 return 1;
56 }
57
58
59 1;
60

  ViewVC Help
Powered by ViewVC 1.1.26