Restyled git tags page. Added truncated tags message

This commit is contained in:
Dmitriy Zaporozhets 2012-10-26 18:37:12 +03:00
parent f73e46eece
commit b4708d006c
4 changed files with 19 additions and 11 deletions

View file

@ -29,6 +29,7 @@
.underlined_link { text-decoration: underline; }
.borders { border: 1px solid #ccc; @include shade; }
.hint { font-style: italic; color: #999; }
.light { color: #888 }
/** PILLS & TABS**/
.nav-pills a:hover { background-color:#888; }

View file

@ -34,6 +34,11 @@ table {
border-color:#f1f1f1;
line-height:28px;
.s16 {
margin-top: 5px;
margin-right: 5px;
}
&:first-child {
border-left:1px solid #bbb;
}

View file

@ -50,7 +50,7 @@ class CommitDecorator < ApplicationDecorator
# avatar: true will prepend avatar image
def author_link(options)
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}"
else
author_name

View file

@ -5,27 +5,29 @@
%tr
%th Name
%th Last commit
%th Updated at
%th
- @tags.each do |tag|
- commit = Commit.new(tag.commit)
- commit = CommitDecorator.decorate(commit)
%tr
%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
= link_to project_commit_path(@project, commit.id) do
%code= commit.short_id
= image_tag gravatar_icon(commit.author_email), class: "", width: 16
= gfm escape_once(truncate(commit.title, length: 40))
%td
%span.update-author.right
= image_tag gravatar_icon(commit.author_email), class: "avatar s16"
= link_to project_commit_path(@project, commit.id), class: 'commit_short_id' do
= commit.short_id
%span.light
= time_ago_in_words(commit.committed_date)
ago
&nbsp;
%td
- 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
%h3 No tags