/[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 32 by dpavlin, Sun Dec 10 19:00:32 2006 UTC revision 47 by dpavlin, Tue Feb 6 23:28:48 2007 UTC
# Line 52  use Jifty::Action schema { Line 52  use Jifty::Action schema {
52                          }];                          }];
53                  };                  };
54    
55            param rel_path =>
56                    label is 'File path',
57                    hint is 'enter beggining of file path to filter using it';
58    
59          param show_actions =>          param show_actions =>
60                  label is 'Show file actions',                  label is 'Show file actions',
61                  render as 'checkbox';                  render as 'checkbox';
# Line 94  sub take_action { Line 98  sub take_action {
98          }          }
99    
100          if ( my $from_date = $self->argument_value('from_date') ) {          if ( my $from_date = $self->argument_value('from_date') ) {
101                  $revisions->limit( column => 'commit_date', operator => '>=', value => $from_date, entry_aggregator => 'AND' );                  $revisions->limit( column => 'commit_date', operator => '>=', value => $from_date, entry_aggregator => 'AND', case_sensitive => 1 );
102          }          }
103    
104          if ( my $to_date = $self->argument_value('to_date') ) {          if ( my $to_date = $self->argument_value('to_date') ) {
105                  $revisions->limit( column => 'commit_date', operator => '>=', value => $to_date, entry_aggregator => 'AND' );                  $revisions->limit( column => 'commit_date', operator => '<=', value => $to_date, entry_aggregator => 'AND', case_sensitive => 1 );
106          }          }
107    
108          if ( my $search = $self->argument_value('search') ) {          if ( my $search = $self->argument_value('search') ) {
# Line 116  sub take_action { Line 120  sub take_action {
120                  $revisions->limit( alias => $rev_branches, column => 'branch', value => $b->id );                  $revisions->limit( alias => $rev_branches, column => 'branch', value => $b->id );
121          }          }
122    
123            if ( my $rel_path = $self->argument_value('rel_path') ) {
124                    my $rev_actions = $revisions->join(
125                            alias1 => 'main', column1 => 'revision',
126                            table2 => 'actions', column2 => 'revision'
127                    );
128                    $revisions->limit( alias => $rev_actions, column => 'rel_path', value => $rel_path, operator => 'STARTSWITH' );
129            }
130    
131          $revisions->order_by({ column => 'commit_date', order => 'desc' });          $revisions->order_by({ column => 'commit_date', order => 'desc' });
132          $revisions->set_page_info(          $revisions->set_page_info(
133                  current_page => $self->argument_value('page'),                  current_page => $self->argument_value('page'),
# Line 136  sub take_action { Line 148  sub take_action {
148      $self->result->message($msg);      $self->result->message($msg);
149    
150          $self->result->content( revisions => $revisions );          $self->result->content( revisions => $revisions );
       
         use Data::Dump qw/dump/;  
         warn "take_action revisions = ",dump($revisions);  
151    
152      return 1;      return 1;
153  }  }

Legend:
Removed from v.32  
changed lines
  Added in v.47

  ViewVC Help
Powered by ViewVC 1.1.26