/[SVNBrowser]/trunk/share/web/templates/list
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/share/web/templates/list

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

revision 12 by dpavlin, Tue Dec 5 23:14:53 2006 UTC revision 39 by dpavlin, Sun Dec 17 15:05:20 2006 UTC
# Line 1  Line 1 
1  <%args>  <%args>
2  $page => undef;  $filter
3    $next
 $author => undef;  
   
 $show_actions => undef;  
   
4  </%args>  </%args>
5    
6  <%init>  <%init>
 my $filter = Jifty->web->new_action(  
         class => 'Filter',  
         moniker => 'filer_list',  
 #       arguments => {  
 #               author => $author,  
 #               show_actions => $show_actions,  
 #       },  
 );  
   
 my $revisions = SVNBrowser::Model::RevisionCollection->new();  
   
 $author ||= $filter->argument_value('author');  
 $show_actions ||= $filter->argument_value('show_actions');  
 $page ||= $filter->argument_value('page');  
   
 if ($author) {  
         $revisions->limit(  
                 column => 'author',  
                 value => $author,  
         );  
 } else {  
         $revisions->unlimit();  
 }  
 $revisions->order_by({ column => 'commit_date', order => 'desc' });  
 $revisions->set_page_info(  
         current_page => $page,  
         per_page => 10,  
 );  
 $revisions->goto_first_item;  
   
   
 my $actions = SVNBrowser::Model::ActionCollection->new();  
   
7  </%init>  </%init>
8    
9  <&| /_elements/wrapper, title => "SVN Reporitory Browser" &>  <&| /_elements/wrapper, title => "SVN Reporitory Browser" &>
10    
11  <% Jifty->web->form->start %>  <% Jifty->web->form->start %>
 <% $filter->form_field('author', default_value => $author ) %>  
 <% $filter->button( label => 'Show just this commiter' ) %>  
 <% $filter->form_field('show_actions', default_value => $show_actions ) %>  
   
 <%perl>  
 if (my $nr = $revisions->pager->total_entries) {  
         $m->out("Found $nr revisions");  
 } else {  
         $m->out("No revisions found.")          
 }                                                                                  
 </%perl>  
12    
13    <% $filter->form_field('author') %>
14    <% $filter->form_field('branch') %>
15    <% $filter->form_field('search') %>
16    
17    <div class="inline">
18    <% $filter->form_field('from_date') %>
19    <% $filter->form_field('to_date') %>
20    <% $filter->form_field('per_page') %>
21    <% $filter->form_field('show_actions') %>
22    </div>
23    
24    <div style="clear: left">
25    <% $filter->button( label => 'Filter commits' ) %>
26    </div>
27    
28    % if ( $filter->result and my $revisions = $filter->result->content('revisions') ) {
29    
30    % my $actions = SVNBrowser::Model::ActionCollection->new();
31  <dl>  <dl>
32  % while (my $r = $revisions->next) {  % while (my $r = $revisions->next) {
33          <dt><% Jifty->web->tangent(          <dt><% Jifty->web->tangent(
34                  url => '/revision/' . $r->revision,                  url => '/rev/' . $r->revision,
35                  label => $r->revision,                  label => $r->revision,
36                    continuation => $next,
37          ) %>          ) %>
38          <span class="author"><% $r->author %></span>          <span class="author"><% $r->author %></span>
39          <span class="commit_date"><% $r->commit_date %></span>          <span class="commit_date"><% $r->commit_date %></span>
40          </dt>          </dt>
41          <dd>          <dd>
42          <pre class="commit_message"><% $r->message %></pre>          <pre class="commit_message"><% $r->message %></pre>
43  %       if ($show_actions) {  %       if ($filter->argument_value('show_actions')) {
44                  <ul class="actions">                  <ul class="actions">
45    %               $actions->unlimit;
46  %               $actions->limit( column => 'revision', value => $r->revision );  %               $actions->limit( column => 'revision', value => $r->revision );
47  %               while (my $a = $actions->next) {  %               while (my $a = $actions->next) {
48                          <li><tt class="action-<% $a->type %>"><% $a->type %> <% $a->branch %> <% $a->rel_path %></tt></li>  %                       my $full_path = $a->branch . $a->rel_path ;
49                            <li><tt class="action-<% $a->type %>"><% $a->type %> <% $full_path %>
50                            <% Jifty->web->tangent( url => '/rev/' . $r->revision . $full_path, label => 'diff', continuation => $next ) %>
51                            </tt></li>
52  %               }  %               }
53                  </ul>                  </ul>
54  %       }  %       }
# Line 93  if (my $nr = $revisions->pager->total_en Line 68  if (my $nr = $revisions->pager->total_en
68  % }  % }
69    
70  % if ($revisions->pager->last_page > 1) {  % if ($revisions->pager->last_page > 1) {
71  page <% $page %> of <% $revisions->pager->last_page %>  page <% $revisions->pager->current_page %> of <% $revisions->pager->last_page %>
72  % }  % }
73    
74  % if ($revisions->pager->next_page) {  % if ($revisions->pager->next_page) {
# Line 106  page <% $page %> of <% $revisions->pager Line 81  page <% $page %> of <% $revisions->pager
81   ) %>   ) %>
82  % }  % }
83    
84    <!-- no $revisions -->
85    % }
86    
87  <% Jifty->web->form->end %>  <% Jifty->web->form->end %>
88    
89  </&>  </&>

Legend:
Removed from v.12  
changed lines
  Added in v.39

  ViewVC Help
Powered by ViewVC 1.1.26