... | ... |
@@ -2444,4 +2444,19 @@ button.close { |
2444 | 2444 |
color: #fff; |
2445 | 2445 |
border-radius:3px; |
2446 | 2446 |
padding:1px 3px; |
2447 |
-} |
|
2447 |
+} |
|
2448 |
+ |
|
2449 |
+.branches .branches-overview-more { |
|
2450 |
+ text-align:center; |
|
2451 |
+ padding:0; |
|
2452 |
+} |
|
2453 |
+.branches-overview-more a { |
|
2454 |
+ width:100%; |
|
2455 |
+ display:block; |
|
2456 |
+ background: #f1f7fa; |
|
2457 |
+ padding:8px; |
|
2458 |
+} |
|
2459 |
+ |
|
2460 |
+.branches-overview-more a:hover { |
|
2461 |
+ background:#e0ffff; |
|
2462 |
+} |
... | ... |
@@ -167,79 +167,91 @@ |
167 | 167 |
</li> |
168 | 168 |
% if (@$branches) { |
169 | 169 |
% for (my $i = 0; $i < @$branches; $i++) { |
170 |
- % my $branch = $branches->[$i]; |
|
171 |
- % my $bname = $branch->{name}; |
|
172 |
- <li> |
|
173 |
- <ul> |
|
174 |
- <li> |
|
175 |
- <div class="branches-name"> |
|
176 |
- <a href="<%= url_for("/$user/$project/tree/$bname") %>"> |
|
177 |
- <%= $bname %> |
|
178 |
- </a> |
|
179 |
- </div> |
|
180 |
- <div class="branches-age" title="<%= $branch->{commit}{age_string_datetime_local} %>"> |
|
181 |
- Updated <%= $branch->{commit}{age_string} %> by |
|
182 |
- </div> |
|
183 |
- <div class="branches-author" title="<%= $branch->{commit}{author_email} %>"> |
|
184 |
- <%= $branch->{commit}{author_name} %> |
|
185 |
- </div> |
|
186 |
- </li> |
|
187 |
- <li class="second-child"> |
|
188 |
- % if ($bname eq $default_branch_name) { |
|
189 |
- <div style="padding-left:80px;padding-top:3px"> |
|
190 |
- <div class="branches-default"> |
|
191 |
- Default |
|
192 |
- </div> |
|
170 |
+ <% |
|
171 |
+ my $branch = $branches->[$i]; |
|
172 |
+ my $bname = $branch->{name}; |
|
173 |
+ %> |
|
174 |
+ % if ($display eq 'overview' && $i > 4) { |
|
175 |
+ <li class="branches-overview-more"> |
|
176 |
+ <a href="<%= url_for("/$user/$project/branches/$branch_type") %>"> |
|
177 |
+ View more <%= $branch_type %> branches |
|
178 |
+ </a> |
|
179 |
+ </li> |
|
180 |
+ % last; |
|
181 |
+ % } else { |
|
182 |
+ |
|
183 |
+ <li> |
|
184 |
+ <ul> |
|
185 |
+ <li> |
|
186 |
+ <div class="branches-name"> |
|
187 |
+ <a href="<%= url_for("/$user/$project/tree/$bname") %>"> |
|
188 |
+ <%= $bname %> |
|
189 |
+ </a> |
|
193 | 190 |
</div> |
194 |
- % } else { |
|
195 |
- <table class="ahead-behind"> |
|
196 |
- <tr> |
|
197 |
- <td class="ahead-behind-behind-count"> |
|
198 |
- <%= $branch->{status}{behind} %> |
|
199 |
- </td> |
|
200 |
- <td class="ahead-behind-separate"> |
|
201 |
- </td> |
|
202 |
- <td style="padding-left:3px"> |
|
203 |
- <%= $branch->{status}{ahead} %> |
|
204 |
- </td> |
|
205 |
- </tr> |
|
206 |
- <tr> |
|
207 |
- <td style="width:100px"> |
|
208 |
- <div style="margin-left:auto;margin-right:0;background:#dcdcdc;width:<%= $max != 0 ? 100 * ($branch->{status}{behind} / $max) : 0 %>%;height:4px"></div> |
|
209 |
- </td> |
|
210 |
- <td class="ahead-behind-separate"> |
|
211 |
- </td> |
|
212 |
- <td style="width:100px"> |
|
213 |
- <div style="background:#dcdcdc;width:<%= $max != 0 ? 100 * ($branch->{status}{ahead} / $max) : 0 %>%;height:4px"></div> |
|
214 |
- </td> |
|
215 |
- </tr> |
|
216 |
- </table> |
|
217 |
- % } |
|
218 |
- </li> |
|
219 |
- <li class="last-child"> |
|
220 |
- % if ($bname eq $default_branch_name) { |
|
221 |
- % if ($api->logined($user)) { |
|
222 |
- <a href="<%= url_for("/$user/$project/settings") %>" type="submit" class="btn btn-small">Change default branch</a> |
|
223 |
- % } |
|
224 |
- % } else { |
|
225 |
- <a class="btn btn-small" href="<%= url_for("/$user/$project/compare/$default_branch->{name}...$bname") %>"> |
|
226 |
- Compare |
|
227 |
- </a> |
|
228 |
- % if ($api->logined($user)) { |
|
229 |
- <form action="<%= url_for->query(op => 'delete') %>" method="post" style="display:inline-block"> |
|
230 |
- <input type="submit" class="btn btn-small delete-branch" style="color:#900;" value="Delete"> |
|
231 |
- %= hidden_field branch => $bname; |
|
232 |
- </form> |
|
191 |
+ <div class="branches-age" title="<%= $branch->{commit}{age_string_datetime_local} %>"> |
|
192 |
+ Updated <%= $branch->{commit}{age_string} %> by |
|
193 |
+ </div> |
|
194 |
+ <div class="branches-author" title="<%= $branch->{commit}{author_email} %>"> |
|
195 |
+ <%= $branch->{commit}{author_name} %> |
|
196 |
+ </div> |
|
197 |
+ </li> |
|
198 |
+ <li class="second-child"> |
|
199 |
+ % if ($bname eq $default_branch_name) { |
|
200 |
+ <div style="padding-left:80px;padding-top:3px"> |
|
201 |
+ <div class="branches-default"> |
|
202 |
+ Default |
|
203 |
+ </div> |
|
204 |
+ </div> |
|
205 |
+ % } else { |
|
206 |
+ <table class="ahead-behind"> |
|
207 |
+ <tr> |
|
208 |
+ <td class="ahead-behind-behind-count"> |
|
209 |
+ <%= $branch->{status}{behind} %> |
|
210 |
+ </td> |
|
211 |
+ <td class="ahead-behind-separate"> |
|
212 |
+ </td> |
|
213 |
+ <td style="padding-left:3px"> |
|
214 |
+ <%= $branch->{status}{ahead} %> |
|
215 |
+ </td> |
|
216 |
+ </tr> |
|
217 |
+ <tr> |
|
218 |
+ <td style="width:100px"> |
|
219 |
+ <div style="margin-left:auto;margin-right:0;background:#dcdcdc;width:<%= $max != 0 ? 100 * ($branch->{status}{behind} / $max) : 0 %>%;height:4px"></div> |
|
220 |
+ </td> |
|
221 |
+ <td class="ahead-behind-separate"> |
|
222 |
+ </td> |
|
223 |
+ <td style="width:100px"> |
|
224 |
+ <div style="background:#dcdcdc;width:<%= $max != 0 ? 100 * ($branch->{status}{ahead} / $max) : 0 %>%;height:4px"></div> |
|
225 |
+ </td> |
|
226 |
+ </tr> |
|
227 |
+ </table> |
|
233 | 228 |
% } |
234 |
- % if (app->config->{basic}{show_ignore_space_change_link}) { |
|
235 |
- (<a style="font-size:90%;color:#9999FF" href="<%= url_for("/$user/$project/compare/$default_branch->{name}...$bname?w=") %>"> |
|
236 |
- ignore space |
|
237 |
- </a>) |
|
229 |
+ </li> |
|
230 |
+ <li class="last-child"> |
|
231 |
+ % if ($bname eq $default_branch_name) { |
|
232 |
+ % if ($api->logined($user)) { |
|
233 |
+ <a href="<%= url_for("/$user/$project/settings") %>" type="submit" class="btn btn-small">Change default branch</a> |
|
234 |
+ % } |
|
235 |
+ % } else { |
|
236 |
+ <a class="btn btn-small" href="<%= url_for("/$user/$project/compare/$default_branch->{name}...$bname") %>"> |
|
237 |
+ Compare |
|
238 |
+ </a> |
|
239 |
+ % if ($api->logined($user)) { |
|
240 |
+ <form action="<%= url_for->query(op => 'delete') %>" method="post" style="display:inline-block"> |
|
241 |
+ <input type="submit" class="btn btn-small delete-branch" style="color:#900;" value="Delete"> |
|
242 |
+ %= hidden_field branch => $bname; |
|
243 |
+ </form> |
|
244 |
+ % } |
|
245 |
+ % if (app->config->{basic}{show_ignore_space_change_link}) { |
|
246 |
+ (<a style="font-size:90%;color:#9999FF" href="<%= url_for("/$user/$project/compare/$default_branch->{name}...$bname?w=") %>"> |
|
247 |
+ ignore space |
|
248 |
+ </a>) |
|
249 |
+ % } |
|
238 | 250 |
% } |
239 |
- % } |
|
240 |
- </li> |
|
241 |
- </ul> |
|
242 |
- </li> |
|
251 |
+ </li> |
|
252 |
+ </ul> |
|
253 |
+ </li> |
|
254 |
+ % } |
|
243 | 255 |
% } |
244 | 256 |
% } else { |
245 | 257 |
<li style="text-align:center;text-color:#767676"> |