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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 7 by dpavlin, Tue Dec 5 16:48:10 2006 UTC revision 27 by dpavlin, Sun Dec 10 11:13:00 2006 UTC
# Line 24  use Jifty::Action schema { Line 24  use Jifty::Action schema {
24                                  function => 'distinct',                                  function => 'distinct',
25                          );                          );
26                          $authors->unlimit;                          $authors->unlimit;
27                            $authors->order_by({ column => 'author', order => 'ASC' });
28                            warn "authors ", $authors->build_select_query;
29                          [{                          [{
30                                  display_from => 'author',                                  display_from => 'author',
31                                  value_from => 'author',                                  value_from => 'author',
# Line 31  use Jifty::Action schema { Line 33  use Jifty::Action schema {
33                          }];                          }];
34                  };                  };
35    
36            param branch =>
37                    label is 'In branch',
38                    render as 'combobox',
39                    available are defer {
40                            my $branches = SVNBrowser::Model::BranchCollection->new;
41                            $branches->column(
42                                    column => 'path',
43                                    function => 'distinct',
44                            );
45                            $branches->unlimit;
46                            $branches->order_by({ column => 'path', order => 'ASC' });
47                            warn "branches ", $branches->build_select_query;
48                            [{
49                                    display_from => 'path',
50                                    value_from => 'path',
51                                    collection => $branches,
52                            }];
53                    };
54    
55            param show_actions =>
56                    label is 'Show file actions',
57                    render as 'checkbox';
58    
59            param page =>
60                    label is 'Current page';
61    
62            param per_page =>
63                    label is 'Commits on page',
64                    render as 'Select',
65                    available are qw( 10 20 30 50 100 );
66    
67            param from_date =>
68                    label is 'From date',
69                    render as 'Date';
70    
71            param to_date =>
72                    label is 'To date',
73                    render as 'Date';
74    
75            param search =>
76                    label is 'Search in messages';
77    
78  };  };
79    
80  sub sticky_on_success { 1; }  sub sticky_on_success { 1; }
# Line 43  sub take_action { Line 87  sub take_action {
87      my $self = shift;      my $self = shift;
88            
89          my $author = $self->argument_value('author');          my $author = $self->argument_value('author');
90          warn "author: $author\n";          my $msg = '';
91                $msg .= "Showing only commits for $author" if ($author);
92      $self->result->message("Showing only commits from $author");          $msg .= ( $msg ? ' and file actions' : 'Showing file actions for each commit' ) if ( $self->argument_value('show_actions') );
93        $self->result->message($msg) if ($msg);
94            
95      return 1;      return 1;
96  }  }

Legend:
Removed from v.7  
changed lines
  Added in v.27

  ViewVC Help
Powered by ViewVC 1.1.26