Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-11-25 20:57:44 +0400
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-11-25 20:57:44 +0400
commit11aa7b00251d8fd29bb7f8c5a6176eb9713ff3ae (patch)
treeea5eec7047242ce9b31ef409c2ae35ca727ea0c5 /app
parent75f0ff2ce1dffd3d034f8353e454349830166999 (diff)
Added ability to clear milestone/assignee during bulk update
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app')
-rw-r--r--app/helpers/issues_helper.rb8
-rw-r--r--app/views/projects/issues/_issues.html.haml4
2 files changed, 10 insertions, 2 deletions
diff --git a/app/helpers/issues_helper.rb b/app/helpers/issues_helper.rb
index 2221583912d..56b776cff46 100644
--- a/app/helpers/issues_helper.rb
+++ b/app/helpers/issues_helper.rb
@@ -68,4 +68,12 @@ module IssuesHelper
false
end
end
+
+ def bulk_update_milestone_options
+ options_for_select(["None (backlog)", nil]) + options_from_collection_for_select(project_active_milestones, "id", "title", params[:milestone_id])
+ end
+
+ def bulk_update_assignee_options
+ options_for_select(["None (unassigned)", nil]) + options_from_collection_for_select(@project.team.members, "id", "name", params[:assignee_id])
+ end
end
diff --git a/app/views/projects/issues/_issues.html.haml b/app/views/projects/issues/_issues.html.haml
index 1ad1f10e1ed..0cde7acfcd1 100644
--- a/app/views/projects/issues/_issues.html.haml
+++ b/app/views/projects/issues/_issues.html.haml
@@ -6,8 +6,8 @@
= form_tag bulk_update_project_issues_path(@project), method: :post do
%span Update selected issues with &nbsp;
= select_tag('update[status]', options_for_select(['open', 'closed']), prompt: "Status")
- = select_tag('update[assignee_id]', options_from_collection_for_select(@project.team.members, "id", "name", params[:assignee_id]), prompt: "Assignee")
- = select_tag('update[milestone_id]', options_from_collection_for_select(project_active_milestones, "id", "title", params[:milestone_id]), prompt: "Milestone")
+ = select_tag('update[assignee_id]', bulk_update_assignee_options, prompt: "Assignee")
+ = select_tag('update[milestone_id]', bulk_update_milestone_options, prompt: "Milestone")
= hidden_field_tag 'update[issues_ids]', []
= hidden_field_tag :status, params[:status]
= button_tag "Save", class: "btn update_selected_issues btn-small btn-save"