diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-06-13 20:21:48 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-06-13 20:21:48 +0300 |
commit | eb7845682d3e9f66694ce6a5a97765fda898a4d2 (patch) | |
tree | 967807c7372063899dcb6cd554426a7bb3d75119 /app/views/snippets | |
parent | 2af8ace1dc49e5ff59be01c2063139a3244b9cee (diff) | |
download | gitlab-ce-eb7845682d3e9f66694ce6a5a97765fda898a4d2.tar.gz |
Improve files/snippets action buttons
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/views/snippets')
-rw-r--r-- | app/views/snippets/_blob.html.haml | 16 | ||||
-rw-r--r-- | app/views/snippets/show.html.haml | 4 |
2 files changed, 11 insertions, 9 deletions
diff --git a/app/views/snippets/_blob.html.haml b/app/views/snippets/_blob.html.haml index 15867f071ef..4a907011ad1 100644 --- a/app/views/snippets/_blob.html.haml +++ b/app/views/snippets/_blob.html.haml @@ -1,11 +1,13 @@ .file-holder .file-title %i.icon-file - %strong= @snippet.file_name - %span.options - .btn-group.tree-btn-group.pull-right - - if @snippet.author == current_user - = link_to "Edit", edit_snippet_path(@snippet), class: "btn btn-tiny", title: 'Edit Snippet' - = link_to "Delete", snippet_path(@snippet), method: :delete, data: { confirm: "Are you sure?" }, class: "btn btn-tiny", title: 'Delete Snippet' - = link_to "Raw", raw_snippet_path(@snippet), class: "btn btn-tiny", target: "_blank" + %span.file_name + = @snippet.file_name + .options + .btn-group + - if can?(current_user, :modify_personal_snippet, @snippet) + = link_to "edit", edit_snippet_path(@snippet), class: "btn btn-small", title: 'Edit Snippet' + = link_to "raw", raw_snippet_path(@snippet), class: "btn btn-small", target: "_blank" + - if can?(current_user, :admin_personal_snippet, @snippet) + = link_to "remove", snippet_path(@snippet), method: :delete, data: { confirm: "Are you sure?" }, class: "btn btn-small btn-remove", title: 'Delete Snippet' = render 'snippets/blob_content' diff --git a/app/views/snippets/show.html.haml b/app/views/snippets/show.html.haml index a680e5eb5b7..655ff947d20 100644 --- a/app/views/snippets/show.html.haml +++ b/app/views/snippets/show.html.haml @@ -7,9 +7,9 @@ private .pull-right - = link_to new_snippet_path, class: "btn btn-new btn-small", title: "New Snippet" do + = link_to new_snippet_path, class: "btn btn-new", title: "New Snippet" do Add new snippet - +%hr .append-bottom-20 .pull-right |