Showing 3 changed files with 15 additions and 5 deletions
+4
templates/include/branch_select.html.ep
... ...
@@ -11,6 +11,8 @@
11 11
   my $type
12 12
     = $display eq 'tree' || $display eq 'tree_top' || $display eq 'files'
13 13
     ? 'tree' : 'commits';
14
+  
15
+  my $dir = stash('dir');
14 16
 %>
15 17
 
16 18
 %= javascript begin
... ...
@@ -115,6 +117,8 @@
115 117
         <input id="rep_url" type="text" style="width:550px;border-radius:0;padding:3px 7px;border-top-right-radius:3px;border-bottom-right-radius:3px">
116 118
       </div>
117 119
     </div>
120
+  % } elsif ($display eq 'tree') {
121
+    %= include '/include/page_path', Path => $dir;
118 122
   % }
119 123
 </div>
120 124
 
+3 -2
templates/include/page_path.html.ep
... ...
@@ -7,9 +7,10 @@
7 7
   
8 8
   my $rev = stash('id') || stash('rev');
9 9
   my $prefix = stash('prefix');
10
+  my $type = stash('type') || '';
10 11
 %>
11 12
 
12
-<div style="margin-bottom:10px;font-size:16px;display:inline-block;">
13
+<div style="margin-bottom:10px;font-size:16px;display:inline-block;padding-top:3px;">
13 14
   % if ($prefix) {
14 15
     <span class="muted">History for</span>
15 16
   % }
... ...
@@ -26,7 +27,7 @@
26 27
       % my $part = $parts[$i];
27 28
       % $path .= $part;
28 29
       
29
-      % if ($type eq 'blob' && $i == @parts - 1) {
30
+      % if ($i == @parts - 1) {
30 31
         <b><%= $part %></b>
31 32
       % } else {
32 33
         <a href=
+8 -3
templates/tree.html.ep
... ...
@@ -38,8 +38,13 @@
38 38
     my $commit = $git->get_commit($user, $project, $rev);
39 39
     
40 40
     # Tree
41
-    my $trees = $git->trees($user, $project, $rev);
42
-    
41
+    my $trees;
42
+    if (defined $dir && length $dir) {
43
+      $trees = $git->trees($user, $project, $rev, $dir);
44
+    }
45
+    else {
46
+      $trees = $git->trees($user, $project, $rev);
47
+    }
43 48
     # Commits number
44 49
     $commits_number = $git->commits_number($user, $project, $rev);
45 50
     
... ...
@@ -199,7 +204,7 @@
199 204
 
200 205
       <div style="margin-bottom:5px;">
201 206
         % my $display = defined $dir && length $dir ? 'tree' : 'tree_top';
202
-        %= include '/include/branch_select', display => $display;
207
+        %= include '/include/branch_select', display => $display, dir => $dir;
203 208
       </div>
204 209
       
205 210
       <div style="margin-bottom:30px">