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

17 lines
738 B
Text
Raw Normal View History

2018-11-08 19:23:39 +05:30
- page_title _("Snippets")
2020-03-13 15:44:24 +05:30
- new_project_snippet_link = new_project_snippet_path(@project) if can?(current_user, :create_snippet, @project)
2015-09-25 12:07:36 +05:30
2019-07-07 11:18:12 +05:30
- if @snippets.exists?
- if current_user
.top-area
2023-07-09 08:55:56 +05:30
- include_private = @project.member?(current_user) || current_user.admin?
2020-03-13 15:44:24 +05:30
= render partial: 'snippets/snippets_scope_menu', locals: { subject: @project, include_private: include_private, counts: @snippet_counts }
2017-08-17 22:00:37 +05:30
2020-03-13 15:44:24 +05:30
- if new_project_snippet_link.present?
2019-07-07 11:18:12 +05:30
.nav-controls
2021-04-29 21:17:54 +05:30
= link_to _("New snippet"), new_project_snippet_link, class: "gl-button btn btn-confirm", title: _("New snippet")
2014-09-02 18:07:02 +05:30
2019-07-07 11:18:12 +05:30
= render 'shared/snippets/list'
- else
2020-03-13 15:44:24 +05:30
= render 'shared/empty_states/snippets', button_path: new_project_snippet_link