imprved compare page and branch page and commit page...
...design
... | ... |
@@ -64,6 +64,7 @@ sub blobdiffs { |
64 | 64 |
|
65 | 65 |
return unless defined $from_id; |
66 | 66 |
|
67 |
+ # Files changing infomation |
|
67 | 68 |
my $blobdiffs = []; |
68 | 69 |
my @cmd = $self->cmd( |
69 | 70 |
$user, |
... | ... |
@@ -221,7 +221,6 @@ |
221 | 221 |
</tr> |
222 | 222 |
<tr> |
223 | 223 |
<td style="width:100px"> |
224 |
- % warn $branch->{status}{behind} / $behind_max; |
|
225 | 224 |
<div style="margin-left:auto;margin-right:0;background:#b2d0dd;width:<%= $behind_max != 0 ? 100 * ($branch->{status}{behind} / $behind_max) : 0 %>%;height:8px"></div> |
226 | 225 |
</td> |
227 | 226 |
<td style="background:#333"> |
... | ... |
@@ -106,7 +106,7 @@ |
106 | 106 |
% for my $date (reverse sort keys %$commits_date) { |
107 | 107 |
% my $commits = $commits_date->{$date}; |
108 | 108 |
|
109 |
- <div class="bk-gray-light border-gray" style="padding:5px;border-bottom:none"> |
|
109 |
+ <div class="bk-gray-light border-gray" style="padding:5px;"> |
|
110 | 110 |
<%= $date %> |
111 | 111 |
</div> |
112 | 112 |
|
... | ... |
@@ -144,9 +144,10 @@ |
144 | 144 |
</div> |
145 | 145 |
<div> |
146 | 146 |
<div> |
147 |
+ % my $num = 0; |
|
147 | 148 |
% for (my $i = 0; $i < @$blobdiffs; $i++) { |
148 | 149 |
% my $blobdiff = $blobdiffs->[$i]; |
149 |
- <div class="patch" id="<%= $i + 1 %>"> |
|
150 |
+ <div id="diff-<%= $i %>" > |
|
150 | 151 |
% my $lines = $blobdiff->{lines}; |
151 | 152 |
% my $file = $blobdiff->{file}; |
152 | 153 |
% my $from_file = $blobdiff->{from_file}; |
... | ... |
@@ -1,3 +1,7 @@ |
1 |
+<% |
|
2 |
+ my $status = stash('status') || ''; |
|
3 |
+%> |
|
4 |
+ |
|
1 | 5 |
<div style="margin-bottom:20px;"> |
2 | 6 |
<div class="border-gray bk-gray-light" style="padding:5px"> |
3 | 7 |
<div class="row"> |
... | ... |
@@ -5,9 +9,15 @@ |
5 | 9 |
<%= $file %> |
6 | 10 |
</div> |
7 | 11 |
<div class="text-right"> |
8 |
- <a class="btn" href="<%= url_for("/$user/$project/blob/$id/$file") %>"> |
|
9 |
- View file @ <%= substr($id, 0, 7) %> |
|
10 |
- </a> |
|
12 |
+ % if ($status eq 'D') { |
|
13 |
+ <a class="btn" href="<%= url_for("/$user/$project/blob/$from_id/$file") %>"> |
|
14 |
+ View file @ <%= substr($from_id, 0, 7) %> |
|
15 |
+ </a> |
|
16 |
+ % } else { |
|
17 |
+ <a class="btn" href="<%= url_for("/$user/$project/blob/$id/$file") %>"> |
|
18 |
+ View file @ <%= substr($id, 0, 7) %> |
|
19 |
+ </a> |
|
20 |
+ % } |
|
11 | 21 |
</div> |
12 | 22 |
</div> |
13 | 23 |
</div> |
... | ... |
@@ -15,7 +25,6 @@ |
15 | 25 |
% for my $line (@$lines) { |
16 | 26 |
% my $class = $line->{class}; |
17 | 27 |
% my $value = $line->{value}; |
18 |
- % my $status = stash('status') || ''; |
|
19 | 28 |
% if ($class eq 'binary_file') { |
20 | 29 |
Binary files |
21 | 30 |
<a href="<%= url_for("/$user/$project/blob/$from_id/$file") %>">a/<%= $file %></a> |
... | ... |
@@ -1,33 +1,44 @@ |
1 | 1 |
%= stylesheet begin |
2 | 2 |
.file-add { |
3 |
- margin-left:3px; |
|
4 |
- padding:1px; |
|
5 |
- line-height:10px; |
|
6 |
- display:inline-block; |
|
7 | 3 |
color:#32CD32; |
8 | 4 |
border:2px #32CD32 solid; |
5 |
+ margin-left:3px; |
|
9 | 6 |
font-weight:bold; |
7 |
+ line-height:0; |
|
8 |
+ display:table-cell; |
|
9 |
+ text-align:center; |
|
10 |
+ vertical-align:middle; |
|
11 |
+ width:9px; |
|
12 |
+ height:9px; |
|
13 |
+ font-size:13px; |
|
10 | 14 |
} |
11 | 15 |
|
12 | 16 |
.file-del { |
13 |
- margin-left:3px; |
|
14 |
- padding:1px; |
|
15 |
- line-height:10px; |
|
16 |
- display:inline-block; |
|
17 | 17 |
color:red; |
18 | 18 |
border:2px red solid; |
19 |
+ margin-left:3px; |
|
19 | 20 |
font-weight:bold; |
21 |
+ line-height:0; |
|
22 |
+ display:table-cell; |
|
23 |
+ text-align:center; |
|
24 |
+ vertical-align:middle; |
|
25 |
+ width:9px; |
|
26 |
+ height:9px; |
|
27 |
+ font-size:15px; |
|
20 | 28 |
} |
21 | 29 |
|
22 | 30 |
.file-modified { |
23 |
- margin-left:3px; |
|
24 |
- padding:1px; |
|
25 |
- line-height:10px; |
|
26 |
- display:inline-block; |
|
27 | 31 |
color:#A9A9A9; |
28 | 32 |
border:2px #A9A9A9 solid; |
33 |
+ margin-left:3px; |
|
29 | 34 |
font-weight:bold; |
30 |
- font-size:90%; |
|
35 |
+ line-height:0; |
|
36 |
+ display:table-cell; |
|
37 |
+ text-align:center; |
|
38 |
+ vertical-align:middle; |
|
39 |
+ width:9px; |
|
40 |
+ height:9px; |
|
41 |
+ font-size:13px; |
|
31 | 42 |
} |
32 | 43 |
% end |
33 | 44 |
|
... | ... |
@@ -131,11 +142,11 @@ |
131 | 142 |
% my $from_mode_oct = $difftree->{from_mode_oct}; |
132 | 143 |
<td> |
133 | 144 |
% if ($status eq 'A') { |
134 |
- <span class="file-add">+</span> |
|
145 |
+ <div class="file-add">+</div> |
|
135 | 146 |
% } elsif ($status eq 'D') { |
136 |
- <span class="file-del">-</span> |
|
147 |
+ <div class="file-del">-</div> |
|
137 | 148 |
% } elsif ($status eq 'M' || $status eq 'T') { |
138 |
- <span class="file-modified">●</span> |
|
149 |
+ <div class="file-modified">●</div> |
|
139 | 150 |
% if ($from_mode != $mode) { |
140 | 151 |
<span> |
141 | 152 |
[ |