39 lines
1.9 KiB
Text
39 lines
1.9 KiB
Text
- if params[:label_name]
|
|
= hidden_field_tag(:label_name, params[:label_name])
|
|
.dropdown
|
|
%button.dropdown-menu-toggle.js-label-select.js-filter-submit{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(params[:label_name].presence || "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_title("Create new label", back: true)
|
|
= dropdown_content do
|
|
%input#new_label_color{type: "hidden"}
|
|
%input#new_label_name.dropdown-input-field{type: "text", placeholder: "Name new label"}
|
|
.dropdown-label-color-preview.js-dropdown-label-color-preview
|
|
.suggest-colors.suggest-colors-dropdown
|
|
- suggested_colors.each do |color|
|
|
= link_to '#', style: "background-color: #{color}", data: { color: color } do
|
|
 
|
|
%button.btn.btn-primary.js-new-label-btn{type: "button"}
|
|
Create
|
|
= dropdown_loading
|