--- trunk/lib/SVNBrowser/Action/Filter.pm 2007/02/08 21:57:20 49 +++ trunk/lib/SVNBrowser/Action/Filter.pm 2008/01/31 22:41:30 75 @@ -15,7 +15,7 @@ use Jifty::Param::Schema; use Jifty::Action schema { param author => - label is 'Developer login', + label is _('Developer login'), render as 'combobox', available are defer { my $authors = SVNBrowser::Model::RevisionCollection->new; @@ -34,7 +34,7 @@ }; param branch => - label is 'In branch', + label is _('In branch'), render as 'combobox', available are defer { my $branches = SVNBrowser::Model::BranchCollection->new; @@ -53,32 +53,35 @@ }; param rel_path => - label is 'Path begins with'; + label is _('Path begins with'); + + param path => + label is _('Path contains'); param show_actions => - label is 'Show file actions', + label is _('Show file actions'), render as 'checkbox', default is 1; param page => - label is 'Current page'; + label is _('Current page'); param per_page => - label is 'Commits on page', + label is _('Commits on page'), render as 'Select', available are qw( 10 20 30 50 100 ), default is 10; param from_date => - label is 'From date', + label is _('From date'), render as 'Date'; param to_date => - label is 'To date', + label is _('To date'), render as 'Date'; param search => - label is 'Search in messages'; + label is _('Search in messages'); }; @@ -121,14 +124,19 @@ $revisions->limit( alias => $rev_branches, column => 'branch', value => $b->id ); } + my $rev_actions = $revisions->join( + alias1 => 'main', column1 => 'revision', + table2 => 'actions', column2 => 'revision' + ); + if ( my $rel_path = $self->argument_value('rel_path') ) { - my $rev_actions = $revisions->join( - alias1 => 'main', column1 => 'revision', - table2 => 'actions', column2 => 'revision' - ); $revisions->limit( alias => $rev_actions, column => 'rel_path', value => $rel_path, operator => 'STARTSWITH' ); } + if ( my $path = $self->argument_value('path') ) { + $revisions->limit( alias => $rev_actions, column => 'rel_path', value => $path, operator => 'MATCHES' ); + } + $revisions->order_by({ column => 'commit_date', order => 'desc' }); $revisions->set_page_info( current_page => $self->argument_value('page'),