Commit 5cf67cc1 authored by Phil Hughes's avatar Phil Hughes Committed by Douglas Barbosa Alexandre

Hides some data in milestone filter dropdown

Selects milestone value in dropdown
parent ec3470e1
......@@ -90,7 +90,14 @@ require('./board_new_form');
},
},
created() {
const $milestoneDropdown = $('.dropdown-menu-milestone');
this.state.currentBoard = this.currentBoard;
if (this.currentBoard.milestone_id) {
$milestoneDropdown.find('.dropdown-input').hide();
$milestoneDropdown.find('.dropdown-footer').hide();
}
},
});
})();
......@@ -28,7 +28,7 @@
placeholder: "Search assignee", data: { any_user: "Any Assignee", first_user: current_user.try(:username), null_user: true, current_user: true, project_id: @project.try(:id), selected: params[:assignee_id], field_name: "assignee_id", default_label: "Assignee" } })
.filter-item.inline.milestone-filter
= render "shared/issuable/milestone_dropdown", selected: finder.milestones.try(:first), name: :milestone_title, show_any: true, show_upcoming: true
= render "shared/issuable/milestone_dropdown", selected: finder.milestones.try(:first), name: :milestone_title, show_any: true, show_upcoming: true, board: board
.filter-item.inline.labels-filter
= render "shared/issuable/label_dropdown", selected: finder.labels.select(:title).uniq, use_id: false, selected_toggle: params[:label_name], data_options: { field_name: "label_name[]" }
......
- project = @target_project || @project
- extra_class = extra_class || ''
- show_menu_above = show_menu_above || false
- board = local_assigns.fetch(:board, nil)
- board_has_milestone = board.try(:milestone).present?
- selected = local_assigns.fetch(:selected, nil)
- if board_has_milestone
- selected = board.milestone
- selected_text = selected.try(:title) || params[:milestone_title]
- dropdown_title = local_assigns.fetch(:dropdown_title, "Filter by milestone")
- if selected.present? || params[:milestone_title].present?
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment