diff options
author | Douwe Maan <douwe@gitlab.com> | 2017-06-29 23:43:53 +0000 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2017-06-29 23:43:53 +0000 |
commit | 6bbbc0ba80d98a5479cf1c962835487f73e00ef7 (patch) | |
tree | f73dad694828e397752f8ffc73163c6dafbacc75 | |
parent | 37011af0c08a9c22cf4df0fb5655a2f2eff1117d (diff) | |
parent | dfcf1b5a44a544ed4b253d88dffac0d35c576211 (diff) | |
download | gitlab-ce-6bbbc0ba80d98a5479cf1c962835487f73e00ef7.tar.gz |
Merge branch 'backport-license-issue-weights' into 'master'
Backport changes to Projects::IssuesController and the search bar
See merge request !12551
-rw-r--r-- | app/controllers/projects/issues_controller.rb | 20 | ||||
-rw-r--r-- | app/views/shared/_sort_dropdown.html.haml | 4 |
2 files changed, 19 insertions, 5 deletions
diff --git a/app/controllers/projects/issues_controller.rb b/app/controllers/projects/issues_controller.rb index dfc6baa34a4..ca483c105b6 100644 --- a/app/controllers/projects/issues_controller.rb +++ b/app/controllers/projects/issues_controller.rb @@ -267,10 +267,22 @@ class Projects::IssuesController < Projects::ApplicationController end def issue_params - params.require(:issue).permit( - :title, :assignee_id, :position, :description, :confidential, - :milestone_id, :due_date, :state_event, :task_num, :lock_version, label_ids: [], assignee_ids: [] - ) + params.require(:issue).permit(*issue_params_attributes) + end + + def issue_params_attributes + %i[ + title + assignee_id + position + description + confidential + milestone_id + due_date + state_event + task_num + lock_version + ] + [{ label_ids: [], assignee_ids: [] }] end def authenticate_user! diff --git a/app/views/shared/_sort_dropdown.html.haml b/app/views/shared/_sort_dropdown.html.haml index a212c714826..785a500e44e 100644 --- a/app/views/shared/_sort_dropdown.html.haml +++ b/app/views/shared/_sort_dropdown.html.haml @@ -1,3 +1,5 @@ +- viewing_issues = controller.controller_name == 'issues' || controller.action_name == 'issues' + .dropdown.inline.prepend-left-10 %button.dropdown-toggle{ type: 'button', data: {toggle: 'dropdown' } } - if @sort.present? @@ -23,7 +25,7 @@ = sort_title_milestone_soon = link_to page_filter_path(sort: sort_value_milestone_later, label: true) do = sort_title_milestone_later - - if controller.controller_name == 'issues' || controller.action_name == 'issues' + - if viewing_issues = link_to page_filter_path(sort: sort_value_due_date_soon, label: true) do = sort_title_due_date_soon = link_to page_filter_path(sort: sort_value_due_date_later, label: true) do |