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

_label_dropdown.html.haml « issuable « shared « views « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 4ded2d98f375826cb38c4be7a3cd0a05bf33f8f9 (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
- if params[:label_name].present?
  = hidden_field_tag(:label_name, params[:label_name])
.dropdown
  %button.dropdown-menu-toggle.js-label-select.js-filter-submit.js-extra-options{type: "button", data: {toggle: "dropdown", field_name: "label_name", show_no: "true", show_any: "true", selected: params[:label_name], project_id: @project.try(:id), labels: labels_filter_path, default_label: "Label"}}
  %button.dropdown-menu-toggle.js-label-select.js-filter-submit.js-multiselect.js-extra-options{type: "button", data: {toggle: "dropdown", field_name: "label_name[]", show_no: "true", show_any: "true", selected: params[:label_name], project_id: @project.try(:id), labels: labels_filter_path, default_label: "Label"}}
    %span.dropdown-toggle-text
      = h(multi_label_name(params[:label_name], "Label"))
    = icon('chevron-down')
  .dropdown-menu.dropdown-select.dropdown-menu-paging.dropdown-menu-labels.dropdown-menu-selectable
    .dropdown-page-one
      = dropdown_title("Filter by label")
      = dropdown_filter("Search labels")
      = dropdown_content
      - if @project
        = dropdown_footer do
          %ul.dropdown-footer-list
            - if can? current_user, :admin_label, @project
              %li
                %a.dropdown-toggle-page{href: "#"}
                  Create new
            %li
              = link_to namespace_project_labels_path(@project.namespace, @project) do
                - if can? current_user, :admin_label, @project
                  Manage labels
                - else
                  View labels
    - if can? current_user, :admin_label, @project and @project
      .dropdown-page-two.dropdown-new-label
        = dropdown_title("Create new label", back: true)
        = dropdown_content do
          .dropdown-labels-error.js-label-error
          %input#new_label_name.dropdown-input-field{type: "text", placeholder: "Name new label"}
          .suggest-colors.suggest-colors-dropdown
            - suggested_colors.each do |color|
              = link_to '#', style: "background-color: #{color}", data: { color: color } do
                &nbsp
          .dropdown-label-color-input
            .dropdown-label-color-preview.js-dropdown-label-color-preview
            %input#new_label_color.dropdown-input-field{ type: "text" }
          .clearfix
            %button.btn.btn-primary.pull-left.js-new-label-btn{type: "button"}
              Create
            %button.btn.btn-default.pull-right.js-cancel-label-btn{type: "button"}
              Cancel
    = dropdown_loading