File: _snippets.html.haml

package info (click to toggle)
gitlab 17.6.5-19
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 629,368 kB
  • sloc: ruby: 1,915,304; javascript: 557,307; sql: 60,639; xml: 6,509; sh: 4,567; makefile: 1,239; python: 406
file content (20 lines) | stat: -rw-r--r-- 1,165 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
- link_project = local_assigns.fetch(:link_project, false)
- illustration_path = 'illustrations/empty-state/empty-snippets-md.svg'
- current_user_empty_message_header = s_('UserProfile|You haven\'t created any snippets')
- current_user_empty_message_description = s_('UserProfile|Snippets in GitLab can either be private, internal, or public.')
- primary_button_label = _('New snippet')
- primary_button_link = new_snippet_path if can?(current_user, :create_snippet)
- visitor_empty_message = s_('UserProfile|No snippets found')

%ul.gl-p-0.gl-list-none
  = render partial: 'shared/snippets/snippet', collection: @snippets, locals: { link_project: link_project }
  - if @snippets.empty?
    %li
      = render partial: 'shared/empty_states/profile_tabs', locals: { illustration_path: illustration_path,
        current_user_empty_message_header: current_user_empty_message_header,
        current_user_empty_message_description: current_user_empty_message_description,
        primary_button_label: primary_button_label,
        primary_button_link: primary_button_link,
        visitor_empty_message: visitor_empty_message }

= paginate @snippets, theme: 'gitlab'