| ... | ... |
@@ -467,7 +467,7 @@ sub startup {
|
| 467 | 467 |
$r->get('/commits/*rev_file' => sub { shift->render_maybe('/commits') });
|
| 468 | 468 |
|
| 469 | 469 |
# Branches |
| 470 |
- $r->any('/branches/:display' => {display => undef} => sub { shift->render_maybe('/branches') });
|
|
| 470 |
+ $r->any('/branches' => sub { shift->render_maybe('/branches') });
|
|
| 471 | 471 |
|
| 472 | 472 |
# Tags |
| 473 | 473 |
$r->get('/tags' => sub { shift->render_maybe('/tags') });
|
| ... | ... |
@@ -6,7 +6,6 @@ |
| 6 | 6 |
my $user_id = param('user');
|
| 7 | 7 |
my $project_id = param('project');
|
| 8 | 8 |
my $op = param('op') || '';
|
| 9 |
- my $display = 'all'; |
|
| 10 | 9 |
my $page = param('page') || 1;
|
| 11 | 10 |
|
| 12 | 11 |
# Git |
| ... | ... |
@@ -57,17 +56,17 @@ |
| 57 | 56 |
my $default_branch = $git->branch($self->app->rep_info($user_id, $project_id), $default_branch_name); |
| 58 | 57 |
|
| 59 | 58 |
# Branches |
| 60 |
- my $branch_types; |
|
| 59 |
+ my $all_branches = []; |
|
| 61 | 60 |
my $branches = []; |
| 62 | 61 |
|
| 63 | 62 |
# Pagenation |
| 64 | 63 |
my $page_count = 20; |
| 65 | 64 |
my $skip = $page_count * ($page - 1); |
| 66 | 65 |
|
| 67 |
- my $branches = $git->branches($self->app->rep_info($user_id, $project_id)); |
|
| 66 |
+ my $all_branches = $git->branches($self->app->rep_info($user_id, $project_id)); |
|
| 68 | 67 |
my $max = 0; |
| 69 | 68 |
my $all_count = 0; |
| 70 |
- for my $branch (@$branches) {
|
|
| 69 |
+ for my $branch (@$all_branches) {
|
|
| 71 | 70 |
$branch->{status} = $git->branch_status(
|
| 72 | 71 |
$self->app->rep_info($user_id, $project_id), |
| 73 | 72 |
$default_branch->{name},
|
| ... | ... |
@@ -285,7 +284,7 @@ |
| 285 | 284 |
% } else {
|
| 286 | 285 |
% my $newer_page = $page - 1; |
| 287 | 286 |
<li> |
| 288 |
- <a href="<%= url_for("/$user_id/$project_id/branches/$display?page=$newer_page") %>">Newer</a>
|
|
| 287 |
+ <a href="<%= url_for("/$user_id/$project_id/branches?page=$newer_page") %>">Newer</a>
|
|
| 289 | 288 |
</li> |
| 290 | 289 |
% } |
| 291 | 290 |
% if ($branches_count < $page_count) {
|
| ... | ... |
@@ -293,18 +292,13 @@ |
| 293 | 292 |
% } else {
|
| 294 | 293 |
% my $older_page = $page + 1; |
| 295 | 294 |
<li> |
| 296 |
- <a href="<%= url_for("/$user_id/$project_id/branches/$display?page=$older_page") %>">Older</a>
|
|
| 295 |
+ <a href="<%= url_for("/$user_id/$project_id/branches?page=$older_page") %>">Older</a>
|
|
| 297 | 296 |
</li> |
| 298 | 297 |
% } |
| 299 | 298 |
</ul> |
| 300 | 299 |
</div> |
| 301 | 300 |
% } else {
|
| 302 | 301 |
<li style="text-align:center;text-color:#767676"> |
| 303 |
- <% |
|
| 304 |
- my $branch_type_name; |
|
| 305 |
- $branch_type_name = ''; |
|
| 306 |
- %> |
|
| 307 |
- |
|
| 308 | 302 |
There aren’t any branches. |
| 309 | 303 |
</li> |
| 310 | 304 |
% } |