File: index.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 (27 lines) | stat: -rw-r--r-- 1,381 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
- page_title _("Labels")
- add_page_specific_style 'page_bundles/labels'
- page_description = s_('AdminLabels|Labels created here will be automatically added to new projects.')

%div{ data: { event_tracking_load: 'true', event_tracking: 'view_admin_labels_pageload' } }

- if @labels.present?
  = render ::Layouts::CrudComponent.new(_('Labels'), description: page_description, count: number_with_delimiter(@labels.total_count), count_options: { class: 'js-admin-labels-count' }, icon: 'label', options: { class: 'labels other-labels gl-mt-5 js-admin-labels-container' }) do |c|
    - c.with_actions do
      = render Pajamas::ButtonComponent.new(variant: :default,
        size: :small,
        href: new_admin_label_path) do
        = _('New label')
    - c.with_body do
      %ul.content-list.manage-labels-list.js-other-labels
        = render @labels
    - c.with_pagination do
      = paginate @labels, theme: 'gitlab'

.js-admin-labels-empty-state{ class: ('gl-hidden' if @labels.present?) }
  = render Pajamas::EmptyStateComponent.new(svg_path: 'illustrations/empty-state/empty-labels-md.svg',
    title: s_('AdminLabels|Define your default set of project labels'),
    primary_button_text: _('New label'),
    primary_button_link: new_admin_label_path) do |c|

    - c.with_description do
      = s_('AdminLabels|They can be used to categorize issues and merge requests.')