diff options
author | Tucker Chapman <tucker.r.chapman@gmail.com> | 2019-04-05 15:50:21 +0000 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2019-04-05 15:50:21 +0000 |
commit | cca4a5fd37b18590767f1ff8d2e2240f06060c0d (patch) | |
tree | 64bb5d7c17ad98bc7bd1e662b1b0019416281305 /app/views | |
parent | e4a371582cf044dc3027f48cb923c8c7309a7b6d (diff) | |
download | gitlab-ce-cca4a5fd37b18590767f1ff8d2e2240f06060c0d.tar.gz |
Add checkbox to choose to create new list when creating new label
Diffstat (limited to 'app/views')
3 files changed, 10 insertions, 2 deletions
diff --git a/app/views/shared/boards/components/sidebar/_labels.html.haml b/app/views/shared/boards/components/sidebar/_labels.html.haml index c6eade3bbbc..47cc912a9a1 100644 --- a/app/views/shared/boards/components/sidebar/_labels.html.haml +++ b/app/views/shared/boards/components/sidebar/_labels.html.haml @@ -28,4 +28,4 @@ .dropdown-menu.dropdown-select.dropdown-menu-paging.dropdown-menu-labels.dropdown-menu-selectable = render partial: "shared/issuable/label_page_default" - if can?(current_user, :admin_label, current_board_parent) - = render partial: "shared/issuable/label_page_create" + = render partial: "shared/issuable/label_page_create", locals: { show_add_list: true } diff --git a/app/views/shared/issuable/_board_create_list_dropdown.html.haml b/app/views/shared/issuable/_board_create_list_dropdown.html.haml index fd413bd68c8..416b4a34651 100644 --- a/app/views/shared/issuable/_board_create_list_dropdown.html.haml +++ b/app/views/shared/issuable/_board_create_list_dropdown.html.haml @@ -4,5 +4,5 @@ .dropdown-menu.dropdown-extended-height.dropdown-menu-paging.dropdown-menu-right.dropdown-menu-issues-board-new.dropdown-menu-selectable.js-tab-container-labels = render partial: "shared/issuable/label_page_default", locals: { show_footer: true, show_create: true, show_boards_content: true, title: "Add list" } - if can?(current_user, :admin_label, board.parent) - = render partial: "shared/issuable/label_page_create" + = render partial: "shared/issuable/label_page_create", locals: { show_add_list: true, add_list: true, add_list_class: 'd-none' } = dropdown_loading diff --git a/app/views/shared/issuable/_label_page_create.html.haml b/app/views/shared/issuable/_label_page_create.html.haml index 55edaa7eda4..d173e3c0192 100644 --- a/app/views/shared/issuable/_label_page_create.html.haml +++ b/app/views/shared/issuable/_label_page_create.html.haml @@ -1,4 +1,7 @@ - show_close = local_assigns.fetch(:show_close, true) +- show_add_list = local_assigns.fetch(:show_add_list, false) +- add_list = local_assigns.fetch(:add_list, false) +- add_list_class = local_assigns.fetch(:add_list_class, '') - subject = @project || @group .dropdown-page-two.dropdown-new-label = dropdown_title(create_label_title(subject), options: { back: true, close: show_close }) @@ -12,6 +15,11 @@ .dropdown-label-color-input .dropdown-label-color-preview.js-dropdown-label-color-preview %input#new_label_color.default-dropdown-input{ type: "text", placeholder: _('Assign custom color like #FF0000') } + - if show_add_list + .dropdown-label-input{ class: add_list_class } + %label + %input.js-add-list{ type: "checkbox", name: "add_list", checked: add_list } + %span= _('Add list') .clearfix %button.btn.btn-primary.float-left.js-new-label-btn{ type: "button" } = _('Create') |