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 .btn-group.tree-btn-group.pull-right
7 7 - if @snippet.author == current_user
8 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 10 = link_to "Raw", raw_snippet_path(@snippet), class: "btn btn-tiny", target: "_blank"
10 11 .file_content.code
11 12 - unless @snippet.content.empty?
... ...