Commit da64959b authored by Phil Hughes's avatar Phil Hughes

Started new dropdown

parent c30a9013
...@@ -65,8 +65,11 @@ ...@@ -65,8 +65,11 @@
return label.title === boardFrom.title; return label.title === boardFrom.title;
}); });
} else { } else {
if (boardTo.label !== null) { if (boardTo.label) {
BoardsStore.removeIssueFromBoard(issue, boardFrom); if (boardFrom.id !== 'backlog') {
BoardsStore.removeIssueFromBoard(issue, boardFrom);
}
foundLabel = _.find(issue.labels, (label) => { foundLabel = _.find(issue.labels, (label) => {
return label.title === boardTo.title; return label.title === boardTo.title;
}); });
......
...@@ -2,6 +2,19 @@ ...@@ -2,6 +2,19 @@
display: none; display: none;
} }
.dropdown-menu-issues-board-new {
width: 320px;
}
.issue-board-dropdown-content {
padding: 0px 8px;
> p {
margin: 0;
color: #9c9c9c;
}
}
.issue-boards-page { .issue-boards-page {
.page-with-sidebar { .page-with-sidebar {
display: flex; display: flex;
......
...@@ -30,8 +30,18 @@ ...@@ -30,8 +30,18 @@
- if controller.controller_name != 'boards' - if controller.controller_name != 'boards'
= render 'shared/sort_dropdown' = render 'shared/sort_dropdown'
- else - else
%button.btn.btn-create{ type: "button" } .dropdown
Create new list %button.btn.btn-create{ type: "button", data: { toggle: "dropdown" } }
Create new list
.dropdown-menu.dropdown-menu-paging.dropdown-menu-align-right.dropdown-menu-issues-board-new
= dropdown_title("Create a new list")
.issue-board-dropdown-content
%p
Add a list to issue boards by selecting a label below. The list will automatically be populated with issues that have that label. To create a list for a label that doesn't exist yet, simply create the label below.
= render partial: "shared/issuable/label_page_default", locals: { show_title: false, show_footer: true, show_create: true }
- if can?(current_user, :admin_label, @project)
= render partial: "shared/issuable/label_page_create"
= dropdown_loading
- if controller.controller_name == 'issues' - if controller.controller_name == 'issues'
.issues_bulk_update.hide .issues_bulk_update.hide
......
- title = local_assigns.fetch(:title, 'Assign labels') - title = local_assigns.fetch(:title, 'Assign labels')
- show_create = local_assigns.fetch(:show_create, true) - show_create = local_assigns.fetch(:show_create, true)
- show_footer = local_assigns.fetch(:show_footer, true) - show_footer = local_assigns.fetch(:show_footer, true)
- show_title = local_assigns.fetch(:show_title, true)
- filter_placeholder = local_assigns.fetch(:filter_placeholder, 'Search labels') - filter_placeholder = local_assigns.fetch(:filter_placeholder, 'Search labels')
.dropdown-page-one .dropdown-page-one
= dropdown_title(title) - if show_title
= dropdown_title(title)
= dropdown_filter(filter_placeholder) = dropdown_filter(filter_placeholder)
= dropdown_content = dropdown_content
- if @project && show_footer - if @project && show_footer
......
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