2016-03-31 14:25:08 -04:00
|
|
|
- if params[:label_name].present?
|
2016-03-16 15:14:31 -04:00
|
|
|
= hidden_field_tag(:label_name, params[:label_name])
|
|
|
|
.dropdown
|
2016-04-07 06:00:36 -04:00
|
|
|
%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"}}
|
2016-03-16 15:14:31 -04:00
|
|
|
%span.dropdown-toggle-text
|
2016-03-18 08:21:07 -04:00
|
|
|
= h(params[:label_name].presence || "Label")
|
2016-03-16 15:14:31 -04:00
|
|
|
= 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
|
2016-03-22 05:45:05 -04:00
|
|
|
.dropdown-page-two.dropdown-new-label
|
2016-03-16 15:14:31 -04:00
|
|
|
= dropdown_title("Create new label", back: true)
|
|
|
|
= dropdown_content do
|
2016-03-22 10:56:00 -04:00
|
|
|
.dropdown-labels-error.js-label-error
|
2016-03-16 15:14:31 -04:00
|
|
|
%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
|
|
|
|
 
|
2016-03-22 05:45:05 -04:00
|
|
|
.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
|
2016-03-16 15:14:31 -04:00
|
|
|
= dropdown_loading
|