2015-04-30 13:06:18 -04:00
|
|
|
- page_title "Snippets"
|
2015-09-17 06:16:24 -04:00
|
|
|
|
2016-12-07 17:35:53 -05:00
|
|
|
- if current_user
|
2016-12-07 17:48:26 -05:00
|
|
|
.top-area
|
2016-12-09 16:38:10 -05:00
|
|
|
- include_private = @project.team.member?(current_user) || current_user.admin?
|
|
|
|
= render partial: 'snippets/snippets_scope_menu', locals: { subject: @project, include_private: include_private }
|
2016-12-07 17:35:53 -05:00
|
|
|
|
2016-12-07 17:48:26 -05:00
|
|
|
.nav-controls.hidden-xs
|
|
|
|
- if can?(current_user, :create_project_snippet, @project)
|
|
|
|
= link_to new_namespace_project_snippet_path(@project.namespace, @project), class: "btn btn-new", title: "New snippet" do
|
|
|
|
New snippet
|
2016-12-07 17:35:53 -05:00
|
|
|
|
2016-12-07 17:48:26 -05:00
|
|
|
- if can?(current_user, :create_project_snippet, @project)
|
|
|
|
.visible-xs
|
|
|
|
|
|
|
|
= link_to new_namespace_project_snippet_path(@project.namespace, @project), class: "btn btn-new btn-block", title: "New snippet" do
|
2016-09-16 05:37:19 -04:00
|
|
|
New snippet
|
2013-08-12 05:08:52 -04:00
|
|
|
|
2015-10-18 07:03:26 -04:00
|
|
|
= render 'snippets/snippets'
|