From 1aeebdf68112a42f5aea97267cec5c732e1065f1 Mon Sep 17 00:00:00 2001 From: Jack Weeden Date: Mon, 24 Jun 2013 23:55:37 +0100 Subject: [PATCH] Added delete button to snippet view --- app/views/snippets/_blob.html.haml | 1 + 1 file changed, 1 insertion(+), 0 deletions(-) diff --git a/app/views/snippets/_blob.html.haml b/app/views/snippets/_blob.html.haml index 6f62ea0..c538da0 100644 --- a/app/views/snippets/_blob.html.haml +++ b/app/views/snippets/_blob.html.haml @@ -6,6 +6,7 @@ .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, confirm: "Are you sure?", class: "btn btn-tiny", title: 'Delete Snippet' = link_to "Raw", raw_snippet_path(@snippet), class: "btn btn-tiny", target: "_blank" .file_content.code - unless @snippet.content.empty? -- libgit2 0.21.2