Welcome to mirror list, hosted at ThFree Co, Russian Federation.

index.html.haml « labels « projects « views « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: e1c904d000f7e540be6eeef9f8c7b01bacff54e3 (plain)
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
- page_title _("Labels")
- can_admin_label = can?(current_user, :admin_label, @project)
- search = params[:search]
- subscribed = params[:subscribed]
- labels_or_filters = @labels.exists? || @prioritized_labels.exists? || search.present? || subscribed.present?
= render_if_exists 'shared/ultimate_feature_removal_banner', project: @project

- if labels_or_filters
  #js-promote-label-modal
  = render 'shared/labels/nav', labels_or_filters: labels_or_filters, can_admin_label: can_admin_label

  - if can_admin_label && search.blank?
    %p.text-muted.gl-mt-5
      = _('Labels can be applied to issues and merge requests. Star a label to make it a priority label.')

  .labels-container
    -# Only show it in the first page
    - hide = @available_labels.empty? || (params[:page].present? && params[:page] != '1')
    .prioritized-labels.gl-new-card{ class: [('hide' if hide), ('is-not-draggable' unless can_admin_label)] }
      .gl-new-card-header
        .gl-new-card-title-wrapper.gl-flex-direction-column
          %h3.gl-new-card-title
            = _('Prioritized labels')
          .gl-new-card-description
            = _('Drag to reorder prioritized labels and change their relative priority.')
      .js-prioritized-labels.gl-px-3.gl-rounded-base.manage-labels-list{ data: { url: set_priorities_project_labels_path(@project), sortable: can_admin_label } }
        #js-priority-labels-empty-state.priority-labels-empty-state{ class: "#{'hidden' unless @prioritized_labels.empty? && search.blank?}" }
          = render 'shared/empty_states/priority_labels'
        - if @prioritized_labels.any?
          = render partial: 'shared/label', collection: @prioritized_labels, as: :label, locals: { force_priority: true, subject: @project }
        - elsif search.present?
          .nothing-here-block
            = _('No prioritized labels with such name or description')

    - if @labels.any?
      .other-labels.gl-new-card
        .gl-new-card-header
          .gl-new-card-title-wrapper
            %h3.gl-new-card-title{ class: ('hide' if hide) }= _('Other labels')
        .gl-new-card-body
          .js-other-labels.manage-labels-list.gl-new-card-content
            = render partial: 'shared/label', collection: @labels, as: :label, locals: { subject: @project }
            = paginate @labels, theme: 'gitlab'

    - elsif search.present?
      .other-labels
        - if @available_labels.any?
          %h4
            = _('Other labels')
          .nothing-here-block
            = _('No other labels with such name or description')
        - else
          .nothing-here-block
            = _('No labels with such name or description')
    - elsif subscribed.present?
      .nothing-here-block
        = _('You do not have any subscriptions yet')

- else
  = render 'shared/empty_states/labels'

%template#js-badge-item-template
  %li.js-priority-badge.inline.gl-mr-3
    .label-badge.gl-bg-blue-50= _('Prioritized')