Showing 2 changed files with 45 additions and 27 deletions
+42 -27
templates/tags.html.ep
... ...
@@ -11,6 +11,10 @@
11 11
   
12 12
   # Ref names
13 13
   my $tags  = $git->tags($user, $project);
14
+  @$tags = sort {
15
+    $b->{commit}{age_string_date} cmp $a->{commit}{age_string_date}
16
+    || $b->{name} cmp $a->{name}
17
+  } @$tags;
14 18
   for my $tag (@$tags) {
15 19
     $tag->{commit} = $git->get_commit($user, $project, $tag->{name});
16 20
   }
... ...
@@ -24,43 +28,54 @@
24 28
     %= include '/include/project_header';
25 29
     %= include '/include/code_menu', display => 'tags', tags_count => scalar @$tags;
26 30
     
27
-    <div>
28
-      % if (@$tags) {
31
+    <h3 style="font-size:20px">Tags</h3>
32
+    
33
+    % if (@$tags) {
34
+      % use D;d $tags;
35
+      <div style="margin-bottom:30px">
29 36
         % for (my $i = 0; $i < @$tags; $i++) {
30 37
           % my $tag = $tags->[$i];
31 38
           % my $name = $tag->{name};
32 39
           % my $tag_class = $i == @$tags - 1 ? 'tag tag_last' : 'tag';
33
-          <div class="padding5 border-bottom-gray">
40
+          <div class="border-gray" style="padding:7px 5px;border-left:none;border-right:none;border-bottom:none;">
34 41
             <div class="row">
35
-              <div class="span2">
36
-                <a class="font-black" href="<%= url_for("/$user/$project/tree/$name") %>">
37
-                  <b><%= $name %></b>
38
-                </a>
42
+              <div class="span3">
43
+                <a class="muted" href="<%= url_for("/$user/$project/tree/$name") %>" title="<%= $tag->{commit}{age_string_date} %>"><%= $tag->{commit}{age_string} %></a>
39 44
               </div>
40
-              <div class="span9 ofsset1-mini">
41
-                % my $commit_id = $tag->{commit}{id};
42
-                <a class="muted" href="<%= url_for("/$user/$project/commit/$commit_id") %>">
43
-                  <i class="icon-share-alt"></i>
44
-                  <%= substr($commit_id, 0, 7) %>
45
-                </a>
46
-                <a class="muted" href="<%= url_for("/$user/$project/archive/$name.zip") %>">
47
-                  <i class="icon-file"></i>
48
-                  zip
49
-                </a>
50
-                <a class="muted" href="<%= url_for("/$user/$project/archive/$name.tar.gz") %>">
51
-                  <i class="icon-file"></i>
52
-                  tar.gz
53
-                </a>
45
+              <div class="span8">
46
+                <div>
47
+                  <a class="font-black" href="<%= url_for("/$user/$project/tree/$name") %>">
48
+                    <b><%= $name %></b>
49
+                    % if (defined $tag->{comment_short}) {
50
+                      - <span style="color:#333"><%= $tag->{comment_short} %></span>
51
+                    % }
52
+                  </a>
53
+                </div>
54
+                <div>
55
+                  % my $commit_id = $tag->{commit}{id};
56
+                  <a class="muted" href="<%= url_for("/$user/$project/commit/$commit_id") %>">
57
+                    <i class="icon-share-alt"></i>
58
+                    <%= substr($commit_id, 0, 7) %>
59
+                  </a>
60
+                  <a class="muted" href="<%= url_for("/$user/$project/archive/$name.zip") %>">
61
+                    <i class="icon-file"></i>
62
+                    zip
63
+                  </a>
64
+                  <a class="muted" href="<%= url_for("/$user/$project/archive/$name.tar.gz") %>">
65
+                    <i class="icon-file"></i>
66
+                    tar.gz
67
+                  </a>
68
+                </div>
54 69
               </div>
55 70
             </div>
56 71
           </div>
57 72
         % }
58
-      % } else {
59
-        <div class="well">
60
-          No Tags.
61
-        </div>
62
-      % }
63
-    </div>
73
+      </div>
74
+    % } else {
75
+      <div class="well">
76
+        No Tags.
77
+      </div>
78
+    % }
64 79
   </div>
65 80
   
66 81
   %= include '/include/footer';
+3
xt/basic.t
... ...
@@ -105,6 +105,9 @@ note 'Tags page';
105 105
   # Page access
106 106
   $t->get_ok("/$user/$project/tags");
107 107
   
108
+  # Date
109
+  $t->content_like(qr/\d{4}-\d{2}-\d{2}/);
110
+  
108 111
   # Tree link
109 112
   $t->content_like(qr#/$user/$project/tree/t1#);
110 113