Snippet restyle

This commit is contained in:
Dmitriy Zaporozhets 2011-12-15 08:12:24 +02:00
parent ca4e2ad135
commit 0712e78597
4 changed files with 67 additions and 57 deletions

View file

@ -1,18 +1,12 @@
- unless snippet.expired?
%tr{ :id => dom_id(snippet), :class => "snippet", :url => project_snippet_path(@project, snippet) }
%td
= image_tag gravatar_icon(snippet.author.email), :class => "left", :width => 40, :style => "padding:0 5px;"
%span
%strong= html_escape snippet.title
%br
%br
%div.author
%strong= truncate snippet.author.name, :lenght => 20
%cite.cgray
= time_ago_in_words(snippet.updated_at)
ago
.right.action-links
- if can?(current_user, :admin_snippet, @project) || snippet.author == current_user
= link_to 'Edit', edit_project_snippet_path(@project, snippet), :class => "cgray"
- if can?(current_user, :admin_snippet, @project) || snippet.author == current_user
= link_to 'Destroy', [@project, snippet], :confirm => 'Are you sure?', :method => :delete, :remote => true, :class => "cred delete-snippet negative", :id => "destroy_snippet_#{snippet.id}"
%a.update-item{:href => project_snippet_path(snippet.project, snippet)}
= image_tag gravatar_icon(snippet.author_email), :class => "left", :width => 40
%span.update-title
= truncate(snippet.title, :length => 60)
%span.update-author
%strong= snippet.author_name
authored
= time_ago_in_words(snippet.created_at)
ago
.right
%span.tag.commit= snippet.file_name