Commit 1aeebdf68112a42f5aea97267cec5c732e1065f1

Authored by Jack Weeden
1 parent 905eb176

Added delete button to snippet view

Showing 1 changed file with 1 additions and 0 deletions   Show diff stats
app/views/snippets/_blob.html.haml
@@ -6,6 +6,7 @@ @@ -6,6 +6,7 @@
6 .btn-group.tree-btn-group.pull-right 6 .btn-group.tree-btn-group.pull-right
7 - if @snippet.author == current_user 7 - if @snippet.author == current_user
8 = link_to "Edit", edit_snippet_path(@snippet), class: "btn btn-tiny", title: 'Edit Snippet' 8 = link_to "Edit", edit_snippet_path(@snippet), class: "btn btn-tiny", title: 'Edit Snippet'
  9 + = link_to "Delete", snippet_path(@snippet), method: :delete, confirm: "Are you sure?", class: "btn btn-tiny", title: 'Delete Snippet'
9 = link_to "Raw", raw_snippet_path(@snippet), class: "btn btn-tiny", target: "_blank" 10 = link_to "Raw", raw_snippet_path(@snippet), class: "btn btn-tiny", target: "_blank"
10 .file_content.code 11 .file_content.code
11 - unless @snippet.content.empty? 12 - unless @snippet.content.empty?