summaryrefslogtreecommitdiff
path: root/app/views/snippets/_actions.html.haml
blob: 1979ae6d5bc473ebf218d9633bee889a747408cc (plain)
1
2
3
4
5
6
7
8
9
10
11
= link_to new_snippet_path, class: 'btn btn-grouped new-snippet-link', title: "New Snippet" do
  = icon('plus')
  New Snippet
- if can?(current_user, :update_personal_snippet, @snippet)
  = link_to edit_snippet_path(@snippet), class: "btn btn-grouped snippable-edit" do
    = icon('pencil-square-o')
    Edit
- if can?(current_user, :admin_personal_snippet, @snippet)
  = link_to snippet_path(@snippet), method: :delete, data: { confirm: "Are you sure?" }, class: "btn btn-grouped btn-remove", title: 'Delete Snippet' do
    = icon('trash-o')
    Delete