diff options
author | Dmitriy Zaporozhets <dzaporozhets@sphereconsultinginc.com> | 2011-11-12 12:41:34 +0200 |
---|---|---|
committer | Dmitriy Zaporozhets <dzaporozhets@sphereconsultinginc.com> | 2011-11-12 12:41:34 +0200 |
commit | 48a1e31010f331db1ec0d7947bfb10b1b3c700ec (patch) | |
tree | 9961917242b2cc2b1f1c4c92f48c542281ec4960 /app/views | |
parent | 9d913789803a04b76e0ad2cf5a35971f2218305e (diff) | |
download | gitlab-ce-48a1e31010f331db1ec0d7947bfb10b1b3c700ec.tar.gz |
snippet table restyle
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/snippets/_snippet.html.haml | 22 | ||||
-rw-r--r-- | app/views/snippets/index.html.haml | 7 |
2 files changed, 16 insertions, 13 deletions
diff --git a/app/views/snippets/_snippet.html.haml b/app/views/snippets/_snippet.html.haml index ddfba6bf80f..dc45e132c9f 100644 --- a/app/views/snippets/_snippet.html.haml +++ b/app/views/snippets/_snippet.html.haml @@ -2,11 +2,17 @@ %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;" - = truncate snippet.author.name, :lenght => 20 - %td= html_escape snippet.title - %td= html_escape snippet.file_name - %td - - if can?(current_user, :admin_snippet, @project) || snippet.author == current_user - = link_to 'Edit', edit_project_snippet_path(@project, snippet), :class => "lbutton positive" - - 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 => "lbutton delete-snippet negative", :id => "destroy_snippet_#{snippet.id}" + %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}" diff --git a/app/views/snippets/index.html.haml b/app/views/snippets/index.html.haml index 3f2610004bf..58e6085f388 100644 --- a/app/views/snippets/index.html.haml +++ b/app/views/snippets/index.html.haml @@ -3,11 +3,8 @@ .left= link_to 'New Snippet', new_project_snippet_path(@project), :class => "lbutton vm" %table.round-borders#snippets-table - %tr - %th Author - %th Title - %th File name - %th + %thead + %th = render @snippets.fresh :javascript $('.delete-snippet').live('ajax:success', function() { |