Commit b4708d00 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Restyled git tags page. Added truncated tags message

parent f73e46ee
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
.underlined_link { text-decoration: underline; } .underlined_link { text-decoration: underline; }
.borders { border: 1px solid #ccc; @include shade; } .borders { border: 1px solid #ccc; @include shade; }
.hint { font-style: italic; color: #999; } .hint { font-style: italic; color: #999; }
.light { color: #888 }
/** PILLS & TABS**/ /** PILLS & TABS**/
.nav-pills a:hover { background-color:#888; } .nav-pills a:hover { background-color:#888; }
......
...@@ -34,6 +34,11 @@ table { ...@@ -34,6 +34,11 @@ table {
border-color:#f1f1f1; border-color:#f1f1f1;
line-height:28px; line-height:28px;
.s16 {
margin-top: 5px;
margin-right: 5px;
}
&:first-child { &:first-child {
border-left:1px solid #bbb; border-left:1px solid #bbb;
} }
......
...@@ -50,7 +50,7 @@ class CommitDecorator < ApplicationDecorator ...@@ -50,7 +50,7 @@ class CommitDecorator < ApplicationDecorator
# avatar: true will prepend avatar image # avatar: true will prepend avatar image
def author_link(options) def author_link(options)
text = if options[:avatar] text = if options[:avatar]
avatar = h.image_tag h.gravatar_icon(author_email), class: "avatar", width: 16 avatar = h.image_tag h.gravatar_icon(author_email), class: "avatar s16", width: 16
"#{avatar} #{author_name}" "#{avatar} #{author_name}"
else else
author_name author_name
......
...@@ -5,27 +5,29 @@ ...@@ -5,27 +5,29 @@
%tr %tr
%th Name %th Name
%th Last commit %th Last commit
%th Updated at
%th %th
- @tags.each do |tag| - @tags.each do |tag|
- commit = Commit.new(tag.commit) - commit = Commit.new(tag.commit)
- commit = CommitDecorator.decorate(commit) - commit = CommitDecorator.decorate(commit)
%tr %tr
%td %td
%strong= link_to tag.name, project_commits_path(@project, tag.name), class: "" %strong
= link_to project_commits_path(@project, tag.name), class: "" do
%i.icon-tag
= tag.name
%small.light= truncate(tag.message, length: 70)
%td %td
= link_to project_commit_path(@project, commit.id) do = image_tag gravatar_icon(commit.author_email), class: "avatar s16"
%code= commit.short_id = link_to project_commit_path(@project, commit.id), class: 'commit_short_id' do
= image_tag gravatar_icon(commit.author_email), class: "", width: 16 = commit.short_id
= gfm escape_once(truncate(commit.title, length: 40)) %span.light
%td
%span.update-author.right
= time_ago_in_words(commit.committed_date) = time_ago_in_words(commit.committed_date)
ago ago
&nbsp;
%td %td
- if can? current_user, :download_code, @project - if can? current_user, :download_code, @project
= link_to "Download", archive_project_repository_path(@project, ref: tag.name), class: "visible_link download_repo_link" = link_to archive_project_repository_path(@project, ref: tag.name) do
%i.icon-download
Download
- else - else
%h3 No tags %h3 No tags
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment