add diff status bar to commi...
|
1 |
<% |
cleanup
|
2 |
my $rev = stash('rev'); |
3 |
my $from_rev = stash('from_rev'); |
|
add diff status bar to commi...
|
4 |
%> |
improved branches page and c...
|
5 |
|
add diff status bar to commi...
|
6 |
<table style="margin-bottom:10px;width:100%"> |
added commit page
|
7 |
|
improved commit page design
|
8 |
% my $toggle = 0; |
9 |
% my $num = 0; |
|
cleanup
|
10 |
% for my $diff_tree (@$diff_trees) { |
add diff status bar to commi...
|
11 |
<tr style="<%= $num + 1 ne @$diff_trees ? 'border-bottom:1px #ddd solid' : '' %>"> |
improve commit page design
|
12 |
<% |
13 |
my $status = $diff_tree->{status}; |
|
14 |
my $file = $diff_tree->{to_file}; |
|
15 |
my $file_type = $diff_tree->{to_file_type}; |
|
16 |
my $mode = $diff_tree->{to_mode}; |
|
17 |
my $mode_str = $diff_tree->{to_mode_str}; |
|
18 |
my $mode_oct = $diff_tree->{to_mode_oct}; |
|
19 |
my $from_file = $diff_tree->{from_file}; |
|
20 |
my $from_mode_str = $diff_tree->{from_mode_str}; |
|
21 |
%> |
|
22 |
<td style="padding:0 5px 0 0; width:12px;"> |
|
impved merge commit logic
|
23 |
% if ($status eq 'A') { |
24 |
<div class="file-add" title="added">+</div> |
|
25 |
% } elsif ($status eq 'D') { |
|
26 |
<div class="file-del" title="deleted">-</div> |
|
27 |
% } elsif ($status eq 'M' || $status eq 'T') { |
|
28 |
<div class="file-modified" title="modified">●</div> |
|
29 |
% } elsif ($status eq 'R') { |
|
30 |
<div class="file-renamed" title="renamed">▶</div> |
|
31 |
% } elsif ($status eq 'C') { |
|
32 |
<div class="file-copied" title="copied">→</div> |
|
improved commit page design ...
|
33 |
% } |
impved merge commit logic
|
34 |
</td> |
35 |
<td> |
|
36 |
% if ($status eq 'A' || $status eq 'M' || $status eq 'D') { |
|
37 |
<a style="margin-left:5px" href="#<%= "diff-$num" %>"><%= $file %></a> |
|
38 |
% } elsif ($status eq 'T') { |
|
39 |
|
|
40 |
% } elsif ($status eq 'R' || $status eq 'C') { |
|
41 |
|
|
42 |
<a href="#<%= "diff-$num" %>"><%= $diff_tree->{from_file} %> → <%= $file %></a> |
|
improved commit page design ...
|
43 |
% } |
impved merge commit logic
|
44 |
% if ($status ne 'A' && $status ne 'D' && $from_mode_str ne $mode_str) { |
45 |
<%= "100$from_mode_str → 100$mode_str" %> |
|
46 |
% } |
|
47 |
</td> |
|
48 |
<td style="text-align:right"> |
|
49 |
%= include '/include/diff_status_bar', diff_tree => $diff_tree, fragment => "diff-$num"; |
|
50 |
</td> |
|
improved commit page design ...
|
51 |
</tr> |
improved commit page design
|
52 |
% $num++; |
copy gitweblite soruce code
|
53 |
% } |
54 |
</table> |