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