Showing 6 changed files with 53 additions and 26 deletions
+1 -1
templates/blob.html.ep
... ...
@@ -46,7 +46,7 @@
46 46
     <div class="border-gray" style="margin-bottom:20px">
47 47
       <div class="bk-blue-light" style="padding:5px">
48 48
         <a style="color:#333;font-weight:bold" href="#" title="<%= $commit->{author_email} %>"><%= $commit->{author_name} %></a>
49
-        <span class="muted" title="<%= $commit->{age_string_date} %>"><%= $commit->{age_string} %></span>
49
+        <span class="muted" title="<%= $commit->{age_string_datetime} %>"><%= $commit->{age_string} %></span>
50 50
         <a style="color:#666" href="<%= url_for("/$user/$project/commit/$rev") %>">
51 51
           <%= $commit->{title} %>
52 52
         </a>
+2 -2
templates/commit.html.ep
... ...
@@ -33,7 +33,7 @@
33 33
   my $difftrees_h = {};
34 34
   for my $difftree (@$difftrees) {
35 35
     my $file = $difftree->{file};
36
-    $difftrees_h->{$file} = $difftree;
36
+    $difftrees_h->{$file} = $difftree if defined $file;
37 37
   }
38 38
   
39 39
   # Get blob diffs
... ...
@@ -143,7 +143,7 @@
143 143
       <div class="row">
144 144
         <div class="span4 padding5">
145 145
           <span><b><%= $commit->{author_name} %></b></span>
146
-          <span class="muted">authored <%= $commit->{age_string} %></span>
146
+          <span class="muted">authored <span title="<%= $commit->{age_string_datetime} %>"><%= $commit->{age_string} %></span>
147 147
         </div>
148 148
         <div class="span7 padding5 text-right" style="margin-left:75px">
149 149
           % my $parent = $commit->{parent};
+1 -1
templates/commits.html.ep
... ...
@@ -86,7 +86,7 @@
86 86
           <div class="border-blue <%= $num eq @$commits - 1 ? 'radius-bottom' : '' %>" style="font-size:12px;border-top:none; padding:1px 5px 5px 5px">
87 87
             <div class="row">
88 88
               <div class="span8">
89
-                <%= $commit->{author_name} %> <span class="muted"><%= $commit->{age_string} %></span>
89
+                <%= $commit->{author_name} %> <span class="muted" title="<%= $commit->{age_string_datetime} %>"><%= $commit->{age_string} %></span>
90 90
               </div>
91 91
               <div class="text-right">
92 92
                 <a class="muted" style="padding-right:18px;font-weight:bold" href="<%= url_for("/$user/$project/commit/$commit->{id}") %>">                  Browse code
+22 -18
templates/include/page_path.html.ep
... ...
@@ -16,24 +16,28 @@
16 16
 
17 17
   <a href="<%= url_for("/$user/$project" . ($operation eq 'commits' ? '/commits' : '')) %>">
18 18
     <b><%= $project %></b>
19
-  </a> /
20
-  % my @parts = split('/', $Path);
21
-  % my $path;
22
-  % for (my $i = 0; $i < @parts; $i++) {
23
-    % my $part = $parts[$i];
24
-    % $path .= $part;
25
-    
26
-    % if ($type eq 'blob' && $i == @parts - 1) {
27
-      <b><%= $part %></b>
28
-    % } else {
29
-      <a href=
30
-          "<%= url_for("/$user/$project/$operation/$rev/$path") %>">
31
-        <%= $part %>
32
-      </a>
33
-      % $path .= '/';
34
-    % }
35
-    % unless ($type eq 'blob' && $i == @parts - 1) {
36
-      /
19
+  </a>
20
+  
21
+  % if (defined $Path) {
22
+    /
23
+    % my @parts = split('/', $Path);
24
+    % my $path;
25
+    % for (my $i = 0; $i < @parts; $i++) {
26
+      % my $part = $parts[$i];
27
+      % $path .= $part;
28
+      
29
+      % if ($type eq 'blob' && $i == @parts - 1) {
30
+        <b><%= $part %></b>
31
+      % } else {
32
+        <a href=
33
+            "<%= url_for("/$user/$project/$operation/$rev/$path") %>">
34
+          <%= $part %>
35
+        </a>
36
+        % $path .= '/';
37
+      % }
38
+      % unless ($type eq 'blob' && $i == @parts - 1) {
39
+        /
40
+      % }
37 41
     % }
38 42
   % }
39 43
 </div>
-1
templates/tree.html.ep
... ...
@@ -32,7 +32,6 @@
32 32
     commit => $commit,
33 33
     trees => $trees,
34 34
     dir => $dir,
35
-    title => "$project/$dir at $rev - $user/$project",
36 35
     readme => $readme
37 36
   );
38 37
 %>
+27 -3
xt/basic.t
... ...
@@ -77,6 +77,9 @@ note 'Commit page - first commit';
77 77
   # Commit message
78 78
   $t->content_like(qr/first commit/);
79 79
   
80
+  # Commit datetime
81
+  $t->content_like(qr/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/);
82
+  
80 83
   # Parent not eixsts
81 84
   $t->content_like(qr/0 <span .*?>parent/);
82 85
   
... ...
@@ -101,8 +104,8 @@ note 'Commits page';
101 104
   # Page access
102 105
   $t->get_ok("/$user/$project/commits/master");
103 106
   
104
-  # Date
105
-  $t->content_like(qr/\d{4}-\d{2}-\d{2}/);
107
+  # Commit date time
108
+  $t->content_like(qr/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/);
106 109
 }
107 110
 
108 111
 note 'Tags page';
... ...
@@ -126,11 +129,32 @@ note 'Tags page';
126 129
   $t->content_like(qr#/$user/$project/archive/t1.tar.gz#);
127 130
 }
128 131
 
129
-note 'blob page';
132
+note 'Tree page';
133
+{
134
+  # Page access
135
+  $t->get_ok("/$user/$project/tree/e891266d8aeab864c8eb36b7115416710b2cdc2e");
136
+  
137
+  # Commit datetime
138
+  $t->content_like(qr/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/);
139
+  
140
+  # README
141
+  $t->content_like(qr/README.*bbb/s);
142
+  
143
+  # tree directory link
144
+  $t->content_like(qr#/$user/$project/tree/e891266d8aeab864c8eb36b7115416710b2cdc2e/dir#);
145
+
146
+  # tree file link
147
+  $t->content_like(qr#/$user/$project/blob/e891266d8aeab864c8eb36b7115416710b2cdc2e/README#);
148
+}
149
+
150
+note 'Blob page';
130 151
 {
131 152
   # Page access
132 153
   $t->get_ok("/$user/$project/blob/b9f0f107672b910a44d22d4623ce7445d40565aa/a_renamed.txt");
133 154
   
155
+  # Commit datetime
156
+  $t->content_like(qr/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/);
157
+  
134 158
   # Content
135 159
   $t->content_like(qr/あああ/);
136 160
 }