... | ... |
@@ -49,137 +49,78 @@ |
49 | 49 |
%> |
50 | 50 |
|
51 | 51 |
% layout 'common'; |
52 |
- %= include '/css/common'; |
|
53 |
- |
|
54 |
- %= stylesheet begin |
|
55 |
- .commit_header { |
|
56 |
- border:1px solid #c5d5dd; |
|
57 |
- border-radius:4px; |
|
58 |
- margin:10px 0; |
|
59 |
- padding:0; |
|
60 |
- } |
|
61 |
- .commit_header .htop { |
|
62 |
- padding:8px; |
|
63 |
- padding-bottom:0; |
|
64 |
- margin-bottom:0; |
|
65 |
- background-color:#e6f1f6; |
|
66 |
- overflow:hidden; |
|
67 |
- } |
|
68 |
- .commit_header .htitle { |
|
69 |
- float:left; |
|
70 |
- font-weight:bold; |
|
71 |
- font-size:120%; |
|
72 |
- padding-top:2px; |
|
73 |
- } |
|
74 |
- .commit_header .hcode { |
|
75 |
- float:right; |
|
76 |
- border:1px solid #c5d5dd; |
|
77 |
- border-radius:2px; |
|
78 |
- padding:4px; |
|
79 |
- } |
|
80 |
- .commit_header .hcomment { |
|
81 |
- background-color:#e6f1f6; |
|
82 |
- border-bottom:1px solid #c5d5dd; |
|
83 |
- padding-left:8px; |
|
84 |
- padding-bottom:10px; |
|
85 |
- color:gray; |
|
86 |
- } |
|
87 |
- .commit_header .hbottom { |
|
88 |
- padding:8px; |
|
89 |
- overflow:hidden; |
|
90 |
- } |
|
91 |
- .commit_header .hbottom_left { |
|
92 |
- float:left; |
|
93 |
- } |
|
94 |
- .commit_header .hauthor { |
|
95 |
- font-weight:bold; |
|
96 |
- } |
|
97 |
- .commit_header .hdate { |
|
98 |
- color:#999; |
|
99 |
- } |
|
100 |
- .commit_header .hbottom_right { |
|
101 |
- float:right; |
|
102 |
- } |
|
103 |
- % end |
|
104 | 52 |
|
105 | 53 |
%= include '/include/header', title => 'Commit diff', project => $project; |
106 | 54 |
|
107 |
- <div class="main_panel"> |
|
108 |
- %= include '/include/sub_header'; |
|
109 |
- |
|
110 |
- %= include '/include/code_menu'; |
|
111 |
- %= stylesheet begin |
|
112 |
- /* Code menu */ |
|
113 |
- .code_menu_commits { |
|
114 |
- border:1px solid #E5E5E5; |
|
115 |
- border-bottom:none; |
|
116 |
- background-color:white; |
|
117 |
- font-weight:bold; |
|
118 |
- } |
|
119 |
- .code_menu_commits a { |
|
120 |
- color:#333 |
|
121 |
- } |
|
122 |
- % end |
|
55 |
+ <div class="container"> |
|
56 |
+ %= include '/include/project_header'; |
|
57 |
+ %= include '/include/code_menu', display => 'commits'; |
|
123 | 58 |
|
124 |
- <div class="commit_header"> |
|
125 |
- <div class="htop"> |
|
126 |
- <div class="htitle"> |
|
127 |
- <%= $commit->{title_short} %> |
|
128 |
- % unless ($commit->{title_short} eq $commit->{title}) { |
|
129 |
- ... |
|
130 |
- % } |
|
131 |
- </div> |
|
132 |
- <div class="hcode"> |
|
133 |
- <a class="ubar" style="color:blue" href="<%= url_for("/$user/$project/tree/$commit->{id}") %>"> |
|
134 |
- Browse code |
|
135 |
- </a> |
|
59 |
+ <div class="row" style="margin-bottom:10px"> |
|
60 |
+ <div class="span12 bk-blue-light vpadding5 border-gray" style="border-bottom:none"> |
|
61 |
+ <div class="row"> |
|
62 |
+ <div class="span8"> |
|
63 |
+ <div class="space5"></div> |
|
64 |
+ <b> |
|
65 |
+ <big> |
|
66 |
+ <%= $commit->{title_short} %> |
|
67 |
+ % unless ($commit->{title_short} eq $commit->{title}) { |
|
68 |
+ ... |
|
69 |
+ % } |
|
70 |
+ </big> |
|
71 |
+ </b> |
|
72 |
+ % for (my $i = 0; $i < @{$commit->{comment}}; $i++) { |
|
73 |
+ % my $comment = $commit->{comment}[$i]; |
|
74 |
+ % if ($i == 0) { |
|
75 |
+ % $comment =~ s/^\Q$commit->{title_short}//; |
|
76 |
+ % } |
|
77 |
+ % if ($comment ne '') { |
|
78 |
+ <div> |
|
79 |
+ <div class="space5"></div> |
|
80 |
+ <%= $comment %> |
|
81 |
+ </div> |
|
82 |
+ % } |
|
83 |
+ % } |
|
84 |
+ </div> |
|
85 |
+ <div class="span4 text-right"> |
|
86 |
+ <a class="btn btn-primary" href="<%= url_for("/$user/$project/tree/$commit->{id}") %>"> |
|
87 |
+ Browse code |
|
88 |
+ </a> |
|
89 |
+ <div class="space5"></div> |
|
90 |
+ </div> |
|
136 | 91 |
</div> |
137 | 92 |
</div> |
138 |
- <div class="hcomment"> |
|
139 |
- % for (my $i = 0; $i < @{$commit->{comment}}; $i++) { |
|
140 |
- % my $comment = $commit->{comment}[$i]; |
|
141 |
- % if ($i == 0) { |
|
142 |
- % $comment =~ s/^\Q$commit->{title_short}//; |
|
143 |
- % } |
|
144 |
- % if ($comment ne '') { |
|
145 |
- <p><%= $comment %></p> |
|
146 |
- % } |
|
147 |
- % } |
|
93 |
+ <div class="span12 border-gray vpadding5" style="border-bottom:none"> |
|
94 |
+ <div class="space5"></div> |
|
95 |
+ <span><%= $commit->{author_name} %></span> |
|
96 |
+ <span class="muted">authored <%= $commit->{age_string_age} %></span> |
|
148 | 97 |
</div> |
149 |
- <div class="hbottom"> |
|
150 |
- <div class="hbottom_left"> |
|
151 |
- <span class="hauthor"><%= $commit->{author_name} %></span> |
|
152 |
- <span class="hdate">authored <%= $commit->{age_string_age} %></span> |
|
153 |
- </div> |
|
154 |
- <div class="hbottom_right"> |
|
155 |
- % my $parent = $commit->{parent}; |
|
156 |
- % my $parents = $commit->{parents}; |
|
157 |
- |
|
158 |
- % if (!defined $parent) { |
|
159 |
- 0 <span style="color:#999">parent</span> |
|
160 |
- % } elsif (@$parents == 1) { |
|
161 |
- 1 <span style="color:#999">parent</span> |
|
162 |
- <a style="color:gray" class="ubar" href="<%= url_for("/$user/$project/commit/$parent") %>"> |
|
98 |
+ <div class="span12 border-gray vpadding5" style="padding-top:0;border-top:none"> |
|
99 |
+ % my $parent = $commit->{parent}; |
|
100 |
+ % my $parents = $commit->{parents}; |
|
101 |
+ |
|
102 |
+ <div class="space5"></div> |
|
103 |
+ % if (!defined $parent) { |
|
104 |
+ 0 <span class="muted">parent</span> |
|
105 |
+ % } elsif (@$parents == 1) { |
|
106 |
+ 1 <span class="muted">parent</span> |
|
107 |
+ <a class="font-black" href="<%= url_for("/$user/$project/commit/$parent") %>"> |
|
108 |
+ <%= substr($parent, 0, 7) %> |
|
109 |
+ </a> |
|
110 |
+ % } else { |
|
111 |
+ <%= @$parents %> <span class="muted">parents</span>: |
|
112 |
+ % for my $parent (@$parents) { |
|
113 |
+ <a class="font-black" href="<%= url_for("/$user/$project/commit/$parent") %>"> |
|
163 | 114 |
<%= substr($parent, 0, 7) %> |
164 | 115 |
</a> |
165 |
- % } else { |
|
166 |
- <%= @$parents %> <span style="color:#999">parents</span>: |
|
167 |
- % for my $parent (@$parents) { |
|
168 |
- <a style="color:gray" class="ubar" href="<%= url_for("/$user/$project/commit/$parent") %>"> |
|
169 |
- <%= substr($parent, 0, 7) %> |
|
170 |
- </a> |
|
171 |
- % } |
|
172 | 116 |
% } |
173 |
- |
|
174 |
- <span style="color:#999">commit</span> <%= $commit->{id} %> |
|
175 |
- </div> |
|
117 |
+ % } |
|
118 |
+ <span class="muted">commit</span> <%= $commit->{id} %> |
|
176 | 119 |
</div> |
177 | 120 |
</div> |
178 | 121 |
|
179 |
- <div style="margin-top:10px;margin-bottom:10px;"> |
|
180 |
- <%= include '/include/difftree', id => $commit->{id}, from_id => $commit->{parent}, |
|
181 |
- difftrees => $difftrees, parents => $commit->{parents}, project_ns => $project %> |
|
182 |
- </div> |
|
122 |
+ <%= include '/include/difftree', id => $commit->{id}, from_id => $commit->{parent}, |
|
123 |
+ difftrees => $difftrees, parents => $commit->{parents}, project_ns => $project %> |
|
183 | 124 |
|
184 | 125 |
<div class="patchset"> |
185 | 126 |
% for (my $i = 0; $i < @$blobdiffs; $i++) { |