Commit b4708d006c7a423a1682916403cfab848a9a48b8
1 parent
f73e46ee
Exists in
master
and in
4 other branches
Restyled git tags page. Added truncated tags message
Showing
4 changed files
with
19 additions
and
11 deletions
Show diff stats
app/assets/stylesheets/gitlab_bootstrap/common.scss
@@ -29,6 +29,7 @@ | @@ -29,6 +29,7 @@ | ||
29 | .underlined_link { text-decoration: underline; } | 29 | .underlined_link { text-decoration: underline; } |
30 | .borders { border: 1px solid #ccc; @include shade; } | 30 | .borders { border: 1px solid #ccc; @include shade; } |
31 | .hint { font-style: italic; color: #999; } | 31 | .hint { font-style: italic; color: #999; } |
32 | +.light { color: #888 } | ||
32 | 33 | ||
33 | /** PILLS & TABS**/ | 34 | /** PILLS & TABS**/ |
34 | .nav-pills a:hover { background-color:#888; } | 35 | .nav-pills a:hover { background-color:#888; } |
app/assets/stylesheets/gitlab_bootstrap/tables.scss
@@ -34,6 +34,11 @@ table { | @@ -34,6 +34,11 @@ table { | ||
34 | border-color:#f1f1f1; | 34 | border-color:#f1f1f1; |
35 | line-height:28px; | 35 | line-height:28px; |
36 | 36 | ||
37 | + .s16 { | ||
38 | + margin-top: 5px; | ||
39 | + margin-right: 5px; | ||
40 | + } | ||
41 | + | ||
37 | &:first-child { | 42 | &:first-child { |
38 | border-left:1px solid #bbb; | 43 | border-left:1px solid #bbb; |
39 | } | 44 | } |
app/decorators/commit_decorator.rb
@@ -50,7 +50,7 @@ class CommitDecorator < ApplicationDecorator | @@ -50,7 +50,7 @@ class CommitDecorator < ApplicationDecorator | ||
50 | # avatar: true will prepend avatar image | 50 | # avatar: true will prepend avatar image |
51 | def author_link(options) | 51 | def author_link(options) |
52 | text = if options[:avatar] | 52 | text = if options[:avatar] |
53 | - avatar = h.image_tag h.gravatar_icon(author_email), class: "avatar", width: 16 | 53 | + avatar = h.image_tag h.gravatar_icon(author_email), class: "avatar s16", width: 16 |
54 | "#{avatar} #{author_name}" | 54 | "#{avatar} #{author_name}" |
55 | else | 55 | else |
56 | author_name | 56 | author_name |
app/views/repositories/tags.html.haml
@@ -5,27 +5,29 @@ | @@ -5,27 +5,29 @@ | ||
5 | %tr | 5 | %tr |
6 | %th Name | 6 | %th Name |
7 | %th Last commit | 7 | %th Last commit |
8 | - %th Updated at | ||
9 | %th | 8 | %th |
10 | - @tags.each do |tag| | 9 | - @tags.each do |tag| |
11 | - commit = Commit.new(tag.commit) | 10 | - commit = Commit.new(tag.commit) |
12 | - commit = CommitDecorator.decorate(commit) | 11 | - commit = CommitDecorator.decorate(commit) |
13 | %tr | 12 | %tr |
14 | %td | 13 | %td |
15 | - %strong= link_to tag.name, project_commits_path(@project, tag.name), class: "" | 14 | + %strong |
15 | + = link_to project_commits_path(@project, tag.name), class: "" do | ||
16 | + %i.icon-tag | ||
17 | + = tag.name | ||
18 | + %small.light= truncate(tag.message, length: 70) | ||
16 | %td | 19 | %td |
17 | - = link_to project_commit_path(@project, commit.id) do | ||
18 | - %code= commit.short_id | ||
19 | - = image_tag gravatar_icon(commit.author_email), class: "", width: 16 | ||
20 | - = gfm escape_once(truncate(commit.title, length: 40)) | ||
21 | - %td | ||
22 | - %span.update-author.right | 20 | + = image_tag gravatar_icon(commit.author_email), class: "avatar s16" |
21 | + = link_to project_commit_path(@project, commit.id), class: 'commit_short_id' do | ||
22 | + = commit.short_id | ||
23 | + %span.light | ||
23 | = time_ago_in_words(commit.committed_date) | 24 | = time_ago_in_words(commit.committed_date) |
24 | ago | 25 | ago |
25 | - | ||
26 | %td | 26 | %td |
27 | - if can? current_user, :download_code, @project | 27 | - if can? current_user, :download_code, @project |
28 | - = link_to "Download", archive_project_repository_path(@project, ref: tag.name), class: "visible_link download_repo_link" | 28 | + = link_to archive_project_repository_path(@project, ref: tag.name) do |
29 | + %i.icon-download | ||
30 | + Download | ||
29 | 31 | ||
30 | - else | 32 | - else |
31 | %h3 No tags | 33 | %h3 No tags |