/[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 4 by dpavlin, Tue Dec 5 11:51:26 2006 UTC revision 42 by dpavlin, Mon Dec 25 15:26:34 2006 UTC
# Line 1  Line 1 
1  <%args>  <%args>
2  $page => 1  $next
3  </%args>  </%args>
4    
5  <%init>  <%init>
6  my $revisions = SVNBrowser::Model::RevisionCollection->new();  my $filter = Jifty->web->new_action(
7  $revisions->unlimit();          class => 'Filter',
8  $revisions->order_by({ column => 'commit_date', order => 'desc' });          moniker => 'filter_list',
9  $revisions->set_page_info(          arguments => { %ARGS },
         current_page => $page,  
         per_page => 50,  
10  );  );
 $revisions->goto_first_item;  
   
11  </%init>  </%init>
12    
13  <&| /_elements/wrapper, title => "Statistics" &>  <&| /_elements/wrapper, title => "SVN Reporitory Browser" &>
14    
15    <% Jifty->web->form->start %>
16    
17    <% $filter->form_field('author') %>
18    <% $filter->form_field('branch') %>
19    <% $filter->form_field('search') %>
20    
21    <div class="inline">
22    <% $filter->form_field('from_date') %>
23    <% $filter->form_field('to_date') %>
24    <% $filter->form_field('per_page') %>
25    <% $filter->form_field('show_actions') %>
26    </div>
27    
28    <div style="clear: left">
29    <% $filter->button( label => 'Filter commits' ) %>
30    </div>
31    
32  <%perl>  % if ( $filter->result and my $revisions = $filter->result->content('revisions') ) {
 if (my $nr = $revisions->pager->total_entries) {  
         $m->out("Found $nr revisions");  
 } else {  
         $m->out("No revisions found.")          
 }                                                                                  
 </%perl>  
33    
34    % my $actions = SVNBrowser::Model::ActionCollection->new();
35  <dl>  <dl>
36  % while (my $r = $revisions->next) {  % while (my $r = $revisions->next) {
37          <dt><% Jifty->web->tangent(          <dt><% Jifty->web->tangent(
38                  url => '/revision/' . $r->revision,                  url => '/rev/' . $r->revision,
39                  label => $r->revision,                  label => $r->revision,
40                    continuation => $next,
41          ) %>          ) %>
42          <span class="author"><% $r->author %></span>          <span class="author"><% $r->author %></span>
43          <span class="commit_date"><% $r->commit_date %></span>          <span class="commit_date"><% $r->commit_date %></span>
44          </dt>          </dt>
45          <dd>          <dd>
46          <pre>          <pre class="commit_message"><% $r->message %></pre>
47          <% $r->message %>  %       if ($filter->argument_value('show_actions')) {
48          </pre>                  <ul class="actions">
49    %               $actions->unlimit;
50    %               $actions->limit( column => 'revision', value => $r->revision );
51    %               while (my $a = $actions->next) {
52    %                       my $full_path = $a->branch . $a->rel_path ;
53                            <li><tt class="action-<% $a->type %>"><% $a->type %> <% $full_path %>
54                            <% Jifty->web->tangent( url => '/rev/' . $r->revision . $full_path, label => 'diff', continuation => $next ) %>
55                            </tt></li>
56    %               }
57                    </ul>
58    %       }
59    
60          </dd>          </dd>
61  % }  % }
62  </dl>  </dl>
63    
64  % if ($revisions->pager->previous_page) {  % if ($revisions->pager->previous_page) {
65   <% Jifty->web->link(   <% $filter->button(
66          label => "Previous",          label => "&lt;&lt;",
67          onclick => { args => { page => $revisions->pager->previous_page } }          escape_label => 0,
68            arguments => {
69                    page => $revisions->pager->previous_page,
70            }
71   ) %>   ) %>
72  % }  % }
73    
74  % if ($revisions->pager->last_page > 1) {  % if ($revisions->pager->last_page > 1) {
75  page <% $page %> of <% $revisions->pager->last_page %>  page <% $revisions->pager->current_page %> of <% $revisions->pager->last_page %>
76  % }  % }
77    
78  % if ($revisions->pager->next_page) {  % if ($revisions->pager->next_page) {
79   <% Jifty->web->link(   <% $filter->button(
80          label => "Next",          label => "&gt;&gt;",
81          onclick => { args => { page => $revisions->pager->next_page } }          escape_label => 0,
82            arguments => {
83                    page => $revisions->pager->next_page,
84            }
85   ) %>   ) %>
86  % }  % }
87    
88  </&>  <!-- no $revisions -->
89    % }
90    
91    <% Jifty->web->form->end %>
92    
93    </&>

Legend:
Removed from v.4  
changed lines
  Added in v.42

  ViewVC Help
Powered by ViewVC 1.1.26