--- trunk/lib/SVNBrowser/View.pm 2008/01/31 20:03:11 72 +++ trunk/lib/SVNBrowser/View.pm 2008/01/31 20:03:43 73 @@ -9,7 +9,7 @@ use Data::Dump qw/dump/; -template '/x' => page { +template '/x-list' => page { h1 { _("SVN Repository browser") }; form { @@ -37,12 +37,13 @@ label => _("Filter commits") ); - warn "####",dump( $filter->result->content ); + #warn "####",dump( $filter->result->content ); my $revisions = $filter->result->content('revisions'); if ( $revisions ) { sub pager { + my $revisions = shift; div { attr { class => 'pager' }; @@ -71,7 +72,11 @@ } } - pager; + pager( $revisions ); + + my $show_actions = get('show_actions') || $filter->argument_value('show_actions'); + my $rel_path = get('rel_path') || $filter->argument_value('rel_path'); + warn "### show_actions = $show_actions"; dl { attr { class => 'results' }; @@ -80,16 +85,33 @@ tt { $r->revision } span { attr { class => 'author' } $r->author } span { attr { class => 'commit_date' } $r->commit_date } - # actions - span { $r->id } } dd { pre { attr { class => 'commit_message' } $r->message } + }; + + if ( $show_actions ) { + my $actions = SVNBrowser::Model::ActionCollection->new(); + $actions->unlimit; + $actions->limit( column => 'revision', value => $r->revision ); + $actions->limit( column => 'rel_path', value => $rel_path, operator => 'STARTSWITH' ) if ($rel_path); + + ul { attr { class => 'actions' }; + while (my $a = $actions->next) { + li { + tt { attr { class => 'action-' . $a->type } + $a->type, + $a->branch, + $a->rel_path + } + } + } + } } } } - pager; + pager( $revisions ); } @@ -97,4 +119,3 @@ }; -