debian-mirror-gitlab/app/views/projects/snippets/index.html.haml

16 lines
665 B
Text
Raw Normal View History

2018-11-08 19:23:39 +05:30
- page_title _("Snippets")
2015-09-25 12:07:36 +05:30
2019-07-07 11:18:12 +05:30
- if @snippets.exists?
- if current_user
.top-area
- include_private = @project.team.member?(current_user) || current_user.admin?
= render partial: 'snippets/snippets_scope_menu', locals: { subject: @project, include_private: include_private }
2017-08-17 22:00:37 +05:30
- if can?(current_user, :create_project_snippet, @project)
2019-07-07 11:18:12 +05:30
.nav-controls
2020-01-01 13:55:28 +05:30
= link_to _("New snippet"), new_project_snippet_path(@project), class: "btn btn-success", title: _("New snippet")
2014-09-02 18:07:02 +05:30
2019-07-07 11:18:12 +05:30
= render 'shared/snippets/list'
- else
= render 'shared/empty_states/snippets', button_path: new_namespace_project_snippet_path(@project.namespace, @project)