... | ... |
@@ -46,8 +46,8 @@ |
46 | 46 |
<div class="container"> |
47 | 47 |
<div style="margin-bottom:20px;"> |
48 | 48 |
%= include '/include/branch_select', display => 'files'; |
49 |
+ %= include '/include/page_path', type => 'blob', Path => $file; |
|
49 | 50 |
</div> |
50 |
- %= include '/include/page_path', type => 'blob', Path => $file; |
|
51 | 51 |
|
52 | 52 |
<div class="border-gray" style="margin-bottom:20px"> |
53 | 53 |
<div class="bk-blue-light" style="padding:5px"> |
... | ... |
@@ -5,16 +5,18 @@ |
5 | 5 |
my $rev = stash('rev'); |
6 | 6 |
$rev = '' unless defined $rev; |
7 | 7 |
my $branches = stash('branches'); |
8 |
- my $tree_top= stash('tree_top'); |
|
9 | 8 |
|
10 | 9 |
my $logined = $api->logined; |
10 |
+ |
|
11 |
+ my $type |
|
12 |
+ = $display eq 'tree' || $display eq 'tree_top' || $display eq 'files' |
|
13 |
+ ? 'tree' : 'commits'; |
|
11 | 14 |
%> |
12 | 15 |
|
13 | 16 |
%= javascript begin |
14 | 17 |
$(document).ready(function () { |
15 | 18 |
|
16 |
- % if ($display eq 'files' || $display eq 'commits') { |
|
17 |
- % my $type = $display eq 'files' ? 'tree' : 'commits'; |
|
19 |
+ % if ($display eq 'tree' || $display eq 'tree_top' || $display eq 'files' || $display eq 'commits') { |
|
18 | 20 |
|
19 | 21 |
// Switch branches and tags |
20 | 22 |
var revs_init = false; |
... | ... |
@@ -95,7 +97,7 @@ |
95 | 97 |
|
96 | 98 |
|
97 | 99 |
<div class="row"> |
98 |
- % if ($display eq 'files' || $display eq 'commits' || $display eq 'branches') { |
|
100 |
+ % if ($display eq 'tree' || $display eq 'tree_top' || $display eq 'files' || $display eq 'commits' || $display eq 'branches') { |
|
99 | 101 |
<% |
100 | 102 |
my $title; |
101 | 103 |
my $rev_short; |
... | ... |
@@ -114,7 +116,7 @@ |
114 | 116 |
</button> |
115 | 117 |
</div> |
116 | 118 |
% } |
117 |
- % if ($tree_top) { |
|
119 |
+ % if ($display eq 'tree_top') { |
|
118 | 120 |
<div class="span10" style="text-algin:right;overflow:hidden"> |
119 | 121 |
<a class="btn" style="margin-left:5px;float:right;font-size:12px;font-weight:bold;color:#333;padding:3px 6px" href="<%= url_for("/$user/$project/archive/$rev.zip") %>"> |
120 | 122 |
Download ZIP |
... | ... |
@@ -133,7 +135,7 @@ |
133 | 135 |
</div> |
134 | 136 |
|
135 | 137 |
<div style="position:relative"> |
136 |
- % if ($display eq 'files' || $display eq 'commits') { |
|
138 |
+ % if ($display eq 'tree' || $display eq 'tree_top' || $display eq 'files' || $display eq 'commits') { |
|
137 | 139 |
<div id="rev-popup" style="display:none;width:330px;position:absolute"> |
138 | 140 |
<div class="radius-top border-gray" style="background:#E6E6FA;padding:10px"> |
139 | 141 |
<div class="row"> |
... | ... |
@@ -9,7 +9,7 @@ |
9 | 9 |
my $prefix = stash('prefix'); |
10 | 10 |
%> |
11 | 11 |
|
12 |
-<div style="margin-bottom:10px;font-size:16px"> |
|
12 |
+<div style="margin-bottom:10px;font-size:16px;display:inline-block;"> |
|
13 | 13 |
% if ($prefix) { |
14 | 14 |
<span class="muted">History for</span> |
15 | 15 |
% } |
... | ... |
@@ -69,7 +69,6 @@ |
69 | 69 |
my $branches_count = app->git->branches_count($user, $project); |
70 | 70 |
my $default_branch_name = app->manager->default_branch($user, $project); |
71 | 71 |
my $tags_count = app->git->tags_count($user, $project); |
72 |
- my $display = 'files'; |
|
73 | 72 |
|
74 | 73 |
my $logined = $api->logined; |
75 | 74 |
|
... | ... |
@@ -199,7 +198,8 @@ |
199 | 198 |
% } |
200 | 199 |
|
201 | 200 |
<div style="margin-bottom:5px;"> |
202 |
- %= include '/include/branch_select', display => 'files', ((defined $dir && length $dir) ? () : (tree_top => 1)); |
|
201 |
+ % my $display = defined $dir && length $dir ? 'tree' : 'tree_top'; |
|
202 |
+ %= include '/include/branch_select', display => $display; |
|
203 | 203 |
</div> |
204 | 204 |
|
205 | 205 |
<div style="margin-bottom:30px"> |