/[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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 14 - (hide annotations)
Wed Dec 6 20:42:13 2006 UTC (17 years, 4 months ago) by dpavlin
File size: 1383 byte(s)
added from/to date limit
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 dpavlin 10 param show_actions =>
35     label is 'Show file actions',
36     render as 'checkbox';
37    
38 dpavlin 13 param page =>
39     label is 'Current page';
40    
41     param per_page =>
42     label is 'Commits on page',
43     render as 'Select',
44     available are qw( 10 20 30 50 100 );
45    
46 dpavlin 14 param from_date =>
47     label is 'From date',
48     render as 'Date';
49    
50     param to_date =>
51     label is 'To date',
52     render as 'Date';
53    
54    
55 dpavlin 5 };
56    
57     sub sticky_on_success { 1; }
58    
59     =head2 take_action
60    
61     =cut
62    
63     sub take_action {
64     my $self = shift;
65    
66     my $author = $self->argument_value('author');
67 dpavlin 10 my $msg = '';
68     $msg .= "Showing only commits for $author" if ($author);
69 dpavlin 14 $msg .= ( $msg ? ' and file actions' : 'Showing file actions for each commit' ) if ( $self->argument_value('show_actions') );
70 dpavlin 10 $self->result->message($msg) if ($msg);
71 dpavlin 5
72     return 1;
73     }
74    
75    
76     1;
77    

  ViewVC Help
Powered by ViewVC 1.1.26