Commit 1aeebdf6 authored by Jack Weeden's avatar Jack Weeden

Added delete button to snippet view

parent 905eb176
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
.btn-group.tree-btn-group.pull-right .btn-group.tree-btn-group.pull-right
- if @snippet.author == current_user - if @snippet.author == current_user
= link_to "Edit", edit_snippet_path(@snippet), class: "btn btn-tiny", title: 'Edit Snippet' = 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" = link_to "Raw", raw_snippet_path(@snippet), class: "btn btn-tiny", target: "_blank"
.file_content.code .file_content.code
- unless @snippet.content.empty? - unless @snippet.content.empty?
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment