From 3c42abe07e12932a6e839ab3f635f86745cb39ed Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Thu, 18 Oct 2007 16:29:23 +0000 Subject: [PATCH] Added the ability to unassign issues with bulk edit. git-svn-id: http://redmine.rubyforge.org/svn/trunk@850 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/controllers/projects_controller.rb | 2 +- app/views/issues/_bulk_edit_form.rhtml | 4 +++- lang/bg.yml | 1 + lang/cs.yml | 1 + lang/de.yml | 1 + lang/en.yml | 1 + lang/es.yml | 1 + lang/fr.yml | 1 + lang/he.yml | 1 + lang/it.yml | 1 + lang/ja.yml | 1 + lang/nl.yml | 1 + lang/pl.yml | 1 + lang/pt-br.yml | 1 + lang/pt.yml | 1 + lang/ro.yml | 1 + lang/sv.yml | 1 + lang/zh.yml | 1 + 18 files changed, 20 insertions(+), 2 deletions(-) diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index f39c4536e..1fc7a82ff 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -350,7 +350,7 @@ class ProjectsController < ApplicationController issues.each do |issue| journal = issue.init_journal(User.current, params[:notes]) issue.priority = priority if priority - issue.assigned_to = assigned_to if assigned_to + issue.assigned_to = assigned_to if assigned_to || params[:assigned_to_id] == 'none' issue.category = category if category issue.fixed_version = fixed_version if fixed_version issue.start_date = params[:start_date] unless params[:start_date].blank? diff --git a/app/views/issues/_bulk_edit_form.rhtml b/app/views/issues/_bulk_edit_form.rhtml index a98c1f399..6ed947428 100644 --- a/app/views/issues/_bulk_edit_form.rhtml +++ b/app/views/issues/_bulk_edit_form.rhtml @@ -13,7 +13,9 @@

+<%= select_tag('assigned_to_id', content_tag('option', l(:label_no_change_option)) + + content_tag('option', l(:label_nobody), :value => 'none') + + options_from_collection_for_select(@project.assignable_users, :id, :name)) %>

diff --git a/lang/bg.yml b/lang/bg.yml index 249729db5..15bbb5239 100644 --- a/lang/bg.yml +++ b/lang/bg.yml @@ -525,3 +525,4 @@ notice_failed_to_save_issues: "Неуспешен запис на %d задач label_theme: Тема label_default: По подразбиране label_search_titles_only: Само в заглавията +label_nobody: nobody diff --git a/lang/cs.yml b/lang/cs.yml index 325533353..8e5f91b41 100644 --- a/lang/cs.yml +++ b/lang/cs.yml @@ -525,3 +525,4 @@ notice_failed_to_save_issues: "Failed to save %d issue(s) on %d selected: %s." label_theme: Theme label_default: Default label_search_titles_only: Search titles only +label_nobody: nobody diff --git a/lang/de.yml b/lang/de.yml index e2f8f7900..dae960579 100644 --- a/lang/de.yml +++ b/lang/de.yml @@ -525,3 +525,4 @@ notice_failed_to_save_issues: "Failed to save %d issue(s) on %d selected: %s." label_theme: Theme label_default: Default label_search_titles_only: Search titles only +label_nobody: nobody diff --git a/lang/en.yml b/lang/en.yml index 2dda3dd16..7d23e4fbe 100644 --- a/lang/en.yml +++ b/lang/en.yml @@ -299,6 +299,7 @@ label_current_status: Current status label_new_statuses_allowed: New statuses allowed label_all: all label_none: none +label_nobody: nobody label_next: Next label_previous: Previous label_used_by: Used by diff --git a/lang/es.yml b/lang/es.yml index 387600346..c3392b2d4 100644 --- a/lang/es.yml +++ b/lang/es.yml @@ -528,3 +528,4 @@ notice_failed_to_save_issues: "Failed to save %d issue(s) on %d selected: %s." label_theme: Theme label_default: Default label_search_titles_only: Search titles only +label_nobody: nobody diff --git a/lang/fr.yml b/lang/fr.yml index d5941ef7f..4b46189f5 100644 --- a/lang/fr.yml +++ b/lang/fr.yml @@ -299,6 +299,7 @@ label_current_status: Statut actuel label_new_statuses_allowed: Nouveaux statuts autorisés label_all: tous label_none: aucun +label_nobody: personne label_next: Suivant label_previous: Précédent label_used_by: Utilisé par diff --git a/lang/he.yml b/lang/he.yml index 736743f74..106bc0096 100644 --- a/lang/he.yml +++ b/lang/he.yml @@ -525,3 +525,4 @@ enumeration_issue_priorities: עדיפות נושאים enumeration_doc_categories: קטגוריות מסמכים enumeration_activities: פעילויות (מעקב אחר זמנים) label_search_titles_only: Search titles only +label_nobody: nobody diff --git a/lang/it.yml b/lang/it.yml index 55ba18109..8dad1566a 100644 --- a/lang/it.yml +++ b/lang/it.yml @@ -525,3 +525,4 @@ notice_failed_to_save_issues: "Failed to save %d issue(s) on %d selected: %s." label_theme: Theme label_default: Default label_search_titles_only: Search titles only +label_nobody: nobody diff --git a/lang/ja.yml b/lang/ja.yml index 5c33d2826..ce70a4c32 100644 --- a/lang/ja.yml +++ b/lang/ja.yml @@ -526,3 +526,4 @@ notice_failed_to_save_issues: "%d件の問題が保存できませんでした(% label_theme: テーマ label_default: 既定 label_search_titles_only: Search titles only +label_nobody: nobody diff --git a/lang/nl.yml b/lang/nl.yml index aa05904ec..c5928c23c 100644 --- a/lang/nl.yml +++ b/lang/nl.yml @@ -526,3 +526,4 @@ notice_failed_to_save_issues: "Failed to save %d issue(s) on %d selected: %s." label_theme: Theme label_default: Default label_search_titles_only: Search titles only +label_nobody: nobody diff --git a/lang/pl.yml b/lang/pl.yml index e6b14da18..23b028ba6 100644 --- a/lang/pl.yml +++ b/lang/pl.yml @@ -525,3 +525,4 @@ notice_failed_to_save_issues: "Błąd podczas zapisu zagadnień %d z %d zaznaczo label_theme: Temat label_default: Domyślne label_search_titles_only: Przeszukuj tylko tytuły +label_nobody: nobody diff --git a/lang/pt-br.yml b/lang/pt-br.yml index d1624c020..bb335b082 100644 --- a/lang/pt-br.yml +++ b/lang/pt-br.yml @@ -525,3 +525,4 @@ notice_failed_to_save_issues: "Failed to save %d issue(s) on %d selected: %s." label_theme: Theme label_default: Default label_search_titles_only: Search titles only +label_nobody: nobody diff --git a/lang/pt.yml b/lang/pt.yml index 2b6587e74..2fcfbd334 100644 --- a/lang/pt.yml +++ b/lang/pt.yml @@ -525,3 +525,4 @@ notice_failed_to_save_issues: "Failed to save %d issue(s) on %d selected: %s." label_theme: Theme label_default: Default label_search_titles_only: Search titles only +label_nobody: nobody diff --git a/lang/ro.yml b/lang/ro.yml index 730fa2148..08eb75b0b 100644 --- a/lang/ro.yml +++ b/lang/ro.yml @@ -525,3 +525,4 @@ notice_failed_to_save_issues: "Failed to save %d issue(s) on %d selected: %s." label_theme: Theme label_default: Default label_search_titles_only: Search titles only +label_nobody: nobody diff --git a/lang/sv.yml b/lang/sv.yml index 53549b244..17b57b5dc 100644 --- a/lang/sv.yml +++ b/lang/sv.yml @@ -526,3 +526,4 @@ notice_failed_to_save_issues: "Failed to save %d issue(s) on %d selected: %s." label_theme: Theme label_default: Default label_search_titles_only: Search titles only +label_nobody: nobody diff --git a/lang/zh.yml b/lang/zh.yml index 2bfc3e065..3826be6d4 100644 --- a/lang/zh.yml +++ b/lang/zh.yml @@ -528,3 +528,4 @@ notice_failed_to_save_issues: "Failed to save %d issue(s) on %d selected: %s." label_theme: Theme label_default: Default label_search_titles_only: Search titles only +label_nobody: nobody -- 2.39.5