1 |
dpavlin |
43 |
<%args> |
2 |
|
|
$revision |
3 |
|
|
$next => undef |
4 |
|
|
$show_actions => 0 |
5 |
|
|
$r => undef |
6 |
dpavlin |
47 |
$rel_path => undef |
7 |
dpavlin |
43 |
</%args> |
8 |
|
|
<%init> |
9 |
|
|
|
10 |
|
|
my $actions = SVNBrowser::Model::ActionCollection->new(); |
11 |
|
|
$actions->unlimit; |
12 |
|
|
$actions->limit( column => 'revision', value => $revision ); |
13 |
dpavlin |
47 |
$actions->limit( column => 'rel_path', value => $rel_path, operator => 'STARTSWITH' ) if ($rel_path); |
14 |
dpavlin |
43 |
|
15 |
|
|
if (! $r) { |
16 |
dpavlin |
44 |
warn "loading revision $revision\n"; |
17 |
dpavlin |
43 |
$r = SVNBrowser::Model::Revision->new(); |
18 |
|
|
$r->load_by_cols( revision => $revision ); |
19 |
|
|
} |
20 |
|
|
|
21 |
|
|
</%init> |
22 |
|
|
|
23 |
|
|
<dt> |
24 |
|
|
% if ($next) { |
25 |
|
|
<% Jifty->web->tangent( |
26 |
|
|
url => '/rev/' . $revision, |
27 |
|
|
label => $revision, |
28 |
|
|
continuation => $next, |
29 |
|
|
) %> |
30 |
|
|
% } else { |
31 |
|
|
<tt><% $revision %></tt> |
32 |
|
|
% } |
33 |
|
|
<span class="author"><% $r->author %></span> |
34 |
|
|
<span class="commit_date"><% $r->commit_date %></span> |
35 |
|
|
</dt> |
36 |
|
|
<dd> |
37 |
|
|
<pre class="commit_message"><% $r->message %></pre> |
38 |
|
|
% if ($show_actions) { |
39 |
|
|
<ul class="actions"> |
40 |
|
|
% while (my $a = $actions->next) { |
41 |
dpavlin |
47 |
<li><tt class="action-<% $a->type %>"><% $a->type %> <% $a->branch %><% Jifty->web->link( |
42 |
|
|
label => $a->rel_path, |
43 |
|
|
parameters => { |
44 |
|
|
rel_path => $a->rel_path, |
45 |
|
|
} |
46 |
|
|
) %> |
47 |
|
|
% if ($next) { |
48 |
dpavlin |
43 |
% my $full_path = $a->branch . $a->rel_path ; |
49 |
|
|
<% Jifty->web->tangent( url => '/rev/' . $revision . $full_path, label => 'diff', continuation => $next ) %> |
50 |
|
|
% } |
51 |
|
|
</tt></li> |
52 |
|
|
% } |
53 |
|
|
</ul> |
54 |
|
|
% } # if $show_actions |
55 |
|
|
|
56 |
|
|
</dd> |
57 |
|
|
|