/[SVNBrowser]/trunk/lib/SVNBrowser/View.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/View.pm

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

revision 72 by dpavlin, Tue Sep 4 16:40:26 2007 UTC revision 73 by dpavlin, Thu Jan 31 20:03:43 2008 UTC
# Line 9  use Jifty::View::Declare -base; Line 9  use Jifty::View::Declare -base;
9    
10  use Data::Dump qw/dump/;  use Data::Dump qw/dump/;
11    
12  template '/x' => page {  template '/x-list' => page {
13          h1 { _("SVN Repository browser") };          h1 { _("SVN Repository browser") };
14    
15          form {          form {
# Line 37  template '/x' => page { Line 37  template '/x' => page {
37                  label => _("Filter commits")                  label => _("Filter commits")
38          );          );
39    
40          warn "####",dump( $filter->result->content );          #warn "####",dump( $filter->result->content );
41    
42          my $revisions = $filter->result->content('revisions');          my $revisions = $filter->result->content('revisions');
43          if ( $revisions ) {          if ( $revisions ) {
44    
45                  sub pager {                  sub pager {
46                            my $revisions = shift;
47    
48                          div {                          div {
49                                  attr { class => 'pager' };                                  attr { class => 'pager' };
# Line 71  template '/x' => page { Line 72  template '/x' => page {
72                          }                          }
73                  }                  }
74    
75                  pager;                  pager( $revisions );
76    
77                    my $show_actions = get('show_actions') || $filter->argument_value('show_actions');
78                    my $rel_path = get('rel_path') || $filter->argument_value('rel_path');
79                    warn "### show_actions = $show_actions";
80    
81                  dl {                  dl {
82                          attr { class => 'results' };                          attr { class => 'results' };
# Line 80  template '/x' => page { Line 85  template '/x' => page {
85                                          tt { $r->revision }                                          tt { $r->revision }
86                                          span { attr { class => 'author' } $r->author }                                          span { attr { class => 'author' } $r->author }
87                                          span { attr { class => 'commit_date' } $r->commit_date }                                          span { attr { class => 'commit_date' } $r->commit_date }
                                         # actions  
                                         span { $r->id }  
88                                  }                                  }
89                                  dd {                                  dd {
90                                          pre { attr { class => 'commit_message' } $r->message }                                          pre { attr { class => 'commit_message' } $r->message }
91                                    };
92    
93                                    if ( $show_actions ) {
94                                            my $actions = SVNBrowser::Model::ActionCollection->new();
95                                            $actions->unlimit;
96                                            $actions->limit( column => 'revision', value => $r->revision );
97                                            $actions->limit( column => 'rel_path', value => $rel_path, operator => 'STARTSWITH' ) if ($rel_path);
98    
99                                            ul { attr { class => 'actions' };
100                                                    while (my $a = $actions->next) {
101                                                            li {
102                                                                    tt { attr { class => 'action-' . $a->type }
103                                                                            $a->type,
104                                                                            $a->branch,
105                                                                            $a->rel_path
106                                                                    }
107                                                            }
108                                                    }
109                                            }
110                                  }                                  }
111                          }                                }      
112                  }                  }
113    
114                  pager;                  pager( $revisions );
115    
116          }          }
117    
# Line 97  template '/x' => page { Line 119  template '/x' => page {
119    
120  };  };
121    
   

Legend:
Removed from v.72  
changed lines
  Added in v.73

  ViewVC Help
Powered by ViewVC 1.1.26