diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2009-01-16 17:20:41 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2009-01-16 17:20:41 +0000 |
commit | ffa6c5fe3e1eb67fca0d965ca45a06c56921276d (patch) | |
tree | cb8a2f40fead6826a1a8468d172bb67b4a12272e | |
parent | d28d2d5ab8be4f54eb79f71be301edb659eb87ba (diff) | |
download | redmine-ffa6c5fe3e1eb67fca0d965ca45a06c56921276d.tar.gz redmine-ffa6c5fe3e1eb67fca0d965ca45a06c56921276d.zip |
Adds a 'Create and continue' button on the new issue form, that will create the issue and display the form again (#2523).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2265 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | app/controllers/issues_controller.rb | 3 | ||||
-rw-r--r-- | app/views/issues/new.rhtml | 1 | ||||
-rw-r--r-- | lang/bg.yml | 1 | ||||
-rw-r--r-- | lang/ca.yml | 1 | ||||
-rw-r--r-- | lang/cs.yml | 1 | ||||
-rw-r--r-- | lang/da.yml | 1 | ||||
-rw-r--r-- | lang/de.yml | 1 | ||||
-rw-r--r-- | lang/en.yml | 1 | ||||
-rw-r--r-- | lang/es.yml | 1 | ||||
-rw-r--r-- | lang/fi.yml | 1 | ||||
-rw-r--r-- | lang/fr.yml | 1 | ||||
-rw-r--r-- | lang/he.yml | 1 | ||||
-rw-r--r-- | lang/hu.yml | 1 | ||||
-rw-r--r-- | lang/it.yml | 1 | ||||
-rw-r--r-- | lang/ja.yml | 1 | ||||
-rw-r--r-- | lang/ko.yml | 1 | ||||
-rw-r--r-- | lang/lt.yml | 1 | ||||
-rw-r--r-- | lang/nl.yml | 1 | ||||
-rw-r--r-- | lang/no.yml | 1 | ||||
-rw-r--r-- | lang/pl.yml | 1 | ||||
-rw-r--r-- | lang/pt-br.yml | 1 | ||||
-rw-r--r-- | lang/pt.yml | 1 | ||||
-rw-r--r-- | lang/ro.yml | 1 | ||||
-rw-r--r-- | lang/ru.yml | 1 | ||||
-rw-r--r-- | lang/sk.yml | 1 | ||||
-rw-r--r-- | lang/sr.yml | 1 | ||||
-rw-r--r-- | lang/sv.yml | 1 | ||||
-rw-r--r-- | lang/th.yml | 1 | ||||
-rw-r--r-- | lang/tr.yml | 1 | ||||
-rw-r--r-- | lang/uk.yml | 1 | ||||
-rw-r--r-- | lang/vn.yml | 1 | ||||
-rw-r--r-- | lang/zh-tw.yml | 1 | ||||
-rw-r--r-- | lang/zh.yml | 1 | ||||
-rw-r--r-- | test/functional/issues_controller_test.rb | 10 |
34 files changed, 44 insertions, 1 deletions
diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb index a2b659f90..3b7587c15 100644 --- a/app/controllers/issues_controller.rb +++ b/app/controllers/issues_controller.rb @@ -148,7 +148,8 @@ class IssuesController < ApplicationController flash[:notice] = l(:notice_successful_create) Mailer.deliver_issue_add(@issue) if Setting.notified_events.include?('issue_added') call_hook(:controller_issues_new_after_save, { :params => params, :issue => @issue}) - redirect_to :controller => 'issues', :action => 'show', :id => @issue + redirect_to(params[:continue] ? { :action => 'new', :tracker_id => @issue.tracker } : + { :action => 'show', :id => @issue }) return end end diff --git a/app/views/issues/new.rhtml b/app/views/issues/new.rhtml index 732a562a3..1bae6abaa 100644 --- a/app/views/issues/new.rhtml +++ b/app/views/issues/new.rhtml @@ -7,6 +7,7 @@ <%= render :partial => 'issues/form', :locals => {:f => f} %> </div> <%= submit_tag l(:button_create) %> + <%= submit_tag l(:button_create_and_continue), :name => 'continue' %> <%= link_to_remote l(:label_preview), { :url => { :controller => 'issues', :action => 'preview', :project_id => @project }, :method => 'post', diff --git a/lang/bg.yml b/lang/bg.yml index df1869040..61f75209d 100644 --- a/lang/bg.yml +++ b/lang/bg.yml @@ -698,3 +698,4 @@ text_diff_truncated: '... This diff was truncated because it exceeds the maximum setting_diff_max_lines_displayed: Max number of diff lines displayed text_plugin_assets_writable: Plugin assets directory writable warning_attachments_not_saved: "%d file(s) could not be saved." +button_create_and_continue: Create and continue diff --git a/lang/ca.yml b/lang/ca.yml index d0d6b8278..0ce265f9f 100644 --- a/lang/ca.yml +++ b/lang/ca.yml @@ -699,3 +699,4 @@ text_diff_truncated: '... This diff was truncated because it exceeds the maximum setting_diff_max_lines_displayed: Max number of diff lines displayed
text_plugin_assets_writable: Plugin assets directory writable
warning_attachments_not_saved: "%d file(s) could not be saved."
+button_create_and_continue: Create and continue
diff --git a/lang/cs.yml b/lang/cs.yml index 16fde6274..534da679a 100644 --- a/lang/cs.yml +++ b/lang/cs.yml @@ -703,3 +703,4 @@ text_diff_truncated: '... This diff was truncated because it exceeds the maximum setting_diff_max_lines_displayed: Max number of diff lines displayed text_plugin_assets_writable: Plugin assets directory writable warning_attachments_not_saved: "%d file(s) could not be saved." +button_create_and_continue: Create and continue diff --git a/lang/da.yml b/lang/da.yml index 8f1049d05..2edbc5243 100644 --- a/lang/da.yml +++ b/lang/da.yml @@ -699,3 +699,4 @@ text_diff_truncated: '... This diff was truncated because it exceeds the maximum setting_diff_max_lines_displayed: Max number of diff lines displayed text_plugin_assets_writable: Plugin assets directory writable warning_attachments_not_saved: "%d file(s) could not be saved." +button_create_and_continue: Create and continue diff --git a/lang/de.yml b/lang/de.yml index 4697aae6a..c403b4817 100644 --- a/lang/de.yml +++ b/lang/de.yml @@ -700,3 +700,4 @@ enumeration_doc_categories: Dokumentenkategorien enumeration_activities: Aktivitäten (Zeiterfassung) text_plugin_assets_writable: Plugin assets directory writable warning_attachments_not_saved: "%d file(s) could not be saved." +button_create_and_continue: Create and continue diff --git a/lang/en.yml b/lang/en.yml index 01a7fcee1..01ac078cf 100644 --- a/lang/en.yml +++ b/lang/en.yml @@ -592,6 +592,7 @@ button_check_all: Check all button_uncheck_all: Uncheck all button_delete: Delete button_create: Create +button_create_and_continue: Create and continue button_test: Test button_edit: Edit button_add: Add diff --git a/lang/es.yml b/lang/es.yml index 83c51e6ca..1729292e7 100644 --- a/lang/es.yml +++ b/lang/es.yml @@ -683,3 +683,4 @@ text_wiki_destroy_confirmation: ¿Seguro que quiere borrar el wiki y todo su con text_workflow_edit: Seleccionar un flujo de trabajo para actualizar text_plugin_assets_writable: Plugin assets directory writable warning_attachments_not_saved: "%d file(s) could not be saved." +button_create_and_continue: Create and continue diff --git a/lang/fi.yml b/lang/fi.yml index 236338600..244f858eb 100644 --- a/lang/fi.yml +++ b/lang/fi.yml @@ -698,3 +698,4 @@ text_diff_truncated: '... This diff was truncated because it exceeds the maximum setting_diff_max_lines_displayed: Max number of diff lines displayed text_plugin_assets_writable: Plugin assets directory writable warning_attachments_not_saved: "%d file(s) could not be saved." +button_create_and_continue: Create and continue diff --git a/lang/fr.yml b/lang/fr.yml index c3210a554..374a0d868 100644 --- a/lang/fr.yml +++ b/lang/fr.yml @@ -592,6 +592,7 @@ button_check_all: Tout cocher button_uncheck_all: Tout décocher button_delete: Supprimer button_create: Créer +button_create_and_continue: Créer et continuer button_test: Tester button_edit: Modifier button_add: Ajouter diff --git a/lang/he.yml b/lang/he.yml index 617b3acbb..b10b73296 100644 --- a/lang/he.yml +++ b/lang/he.yml @@ -698,3 +698,4 @@ setting_diff_max_lines_displayed: Max number of diff lines displayed text_plugin_assets_writable: Plugin assets directory writable text_diff_truncated: '... This diff was truncated because it exceeds the maximum size that can be displayed.' warning_attachments_not_saved: "%d file(s) could not be saved." +button_create_and_continue: Create and continue diff --git a/lang/hu.yml b/lang/hu.yml index 1768cedbb..059b3ee68 100644 --- a/lang/hu.yml +++ b/lang/hu.yml @@ -699,3 +699,4 @@ text_diff_truncated: '... A diff fájl vége nem jelenik meg, mert hosszab, mint setting_diff_max_lines_displayed: A megjelenítendő sorok száma (maximum) a diff fájloknál text_plugin_assets_writable: Plugin assets directory writable warning_attachments_not_saved: "%d file(s) could not be saved." +button_create_and_continue: Create and continue diff --git a/lang/it.yml b/lang/it.yml index 134096ba0..f3798b477 100644 --- a/lang/it.yml +++ b/lang/it.yml @@ -698,3 +698,4 @@ text_diff_truncated: '... This diff was truncated because it exceeds the maximum setting_diff_max_lines_displayed: Max number of diff lines displayed text_plugin_assets_writable: Plugin assets directory writable warning_attachments_not_saved: "%d file(s) could not be saved." +button_create_and_continue: Create and continue diff --git a/lang/ja.yml b/lang/ja.yml index 2ca1a4e4e..c1279b3f9 100644 --- a/lang/ja.yml +++ b/lang/ja.yml @@ -699,3 +699,4 @@ text_diff_truncated: '... This diff was truncated because it exceeds the maximum setting_diff_max_lines_displayed: Max number of diff lines displayed text_plugin_assets_writable: Plugin assets directory writable warning_attachments_not_saved: "%d file(s) could not be saved." +button_create_and_continue: Create and continue diff --git a/lang/ko.yml b/lang/ko.yml index cc072e104..f7958f97b 100644 --- a/lang/ko.yml +++ b/lang/ko.yml @@ -698,3 +698,4 @@ text_diff_truncated: '... 이 차이점은 표시할 수 있는 최대 줄수를 setting_diff_max_lines_displayed: 차이점보기에 표시할 최대 줄수 text_plugin_assets_writable: Plugin assets directory writable warning_attachments_not_saved: "%d file(s) could not be saved." +button_create_and_continue: Create and continue diff --git a/lang/lt.yml b/lang/lt.yml index ef2978e80..3cdbcf09c 100644 --- a/lang/lt.yml +++ b/lang/lt.yml @@ -700,3 +700,4 @@ enumeration_doc_categories: Dokumento kategorijos enumeration_activities: Veiklos (laiko sekimas) text_plugin_assets_writable: Plugin assets directory writable warning_attachments_not_saved: "%d file(s) could not be saved." +button_create_and_continue: Create and continue diff --git a/lang/nl.yml b/lang/nl.yml index bbffbf111..ed10b4db6 100644 --- a/lang/nl.yml +++ b/lang/nl.yml @@ -700,3 +700,4 @@ text_diff_truncated: '... This diff was truncated because it exceeds the maximum setting_diff_max_lines_displayed: Max number of diff lines displayed text_plugin_assets_writable: Plugin assets directory writable warning_attachments_not_saved: "%d file(s) could not be saved." +button_create_and_continue: Create and continue diff --git a/lang/no.yml b/lang/no.yml index 9d0ccc932..c8f131ff9 100644 --- a/lang/no.yml +++ b/lang/no.yml @@ -699,3 +699,4 @@ text_diff_truncated: '... This diff was truncated because it exceeds the maximum setting_diff_max_lines_displayed: Max number of diff lines displayed text_plugin_assets_writable: Plugin assets directory writable warning_attachments_not_saved: "%d file(s) could not be saved." +button_create_and_continue: Create and continue diff --git a/lang/pl.yml b/lang/pl.yml index 9742e19a1..6b28f0e0d 100644 --- a/lang/pl.yml +++ b/lang/pl.yml @@ -717,3 +717,4 @@ text_diff_truncated: '... Ten plik różnic został przycięty ponieważ jest zb setting_diff_max_lines_displayed: Maksymalna liczba linii różnicy do pokazania text_plugin_assets_writable: Plugin assets directory writable warning_attachments_not_saved: "%d file(s) could not be saved." +button_create_and_continue: Create and continue diff --git a/lang/pt-br.yml b/lang/pt-br.yml index 90e7e770c..ecbbc0ce5 100644 --- a/lang/pt-br.yml +++ b/lang/pt-br.yml @@ -699,3 +699,4 @@ text_diff_truncated: '... This diff was truncated because it exceeds the maximum setting_diff_max_lines_displayed: Max number of diff lines displayed
text_plugin_assets_writable: Plugin assets directory writable
warning_attachments_not_saved: "%d file(s) could not be saved."
+button_create_and_continue: Create and continue
diff --git a/lang/pt.yml b/lang/pt.yml index 17cc36b04..ec42386de 100644 --- a/lang/pt.yml +++ b/lang/pt.yml @@ -700,3 +700,4 @@ text_diff_truncated: '... Este diff foi truncado porque excede o tamanho máximo setting_diff_max_lines_displayed: Número máximo de linhas de diff mostradas text_plugin_assets_writable: Plugin assets directory writable warning_attachments_not_saved: "%d file(s) could not be saved." +button_create_and_continue: Create and continue diff --git a/lang/ro.yml b/lang/ro.yml index 25684ced3..b0df48d26 100644 --- a/lang/ro.yml +++ b/lang/ro.yml @@ -698,3 +698,4 @@ text_diff_truncated: '... This diff was truncated because it exceeds the maximum setting_diff_max_lines_displayed: Max number of diff lines displayed text_plugin_assets_writable: Plugin assets directory writable warning_attachments_not_saved: "%d file(s) could not be saved." +button_create_and_continue: Create and continue diff --git a/lang/ru.yml b/lang/ru.yml index 2a8bd3c63..4943eea0f 100644 --- a/lang/ru.yml +++ b/lang/ru.yml @@ -732,3 +732,4 @@ text_workflow_edit: Выберите роль и трекер для редак text_plugin_assets_writable: Plugin assets directory writable warning_attachments_not_saved: "%d file(s) could not be saved." +button_create_and_continue: Create and continue diff --git a/lang/sk.yml b/lang/sk.yml index f1a96fcca..ffae2d644 100644 --- a/lang/sk.yml +++ b/lang/sk.yml @@ -704,3 +704,4 @@ text_diff_truncated: '... This diff was truncated because it exceeds the maximum setting_diff_max_lines_displayed: Max number of diff lines displayed
text_plugin_assets_writable: Plugin assets directory writable
warning_attachments_not_saved: "%d file(s) could not be saved."
+button_create_and_continue: Create and continue
diff --git a/lang/sr.yml b/lang/sr.yml index dbe5c5ef5..7070c4a22 100644 --- a/lang/sr.yml +++ b/lang/sr.yml @@ -699,3 +699,4 @@ text_diff_truncated: '... This diff was truncated because it exceeds the maximum setting_diff_max_lines_displayed: Max number of diff lines displayed text_plugin_assets_writable: Plugin assets directory writable warning_attachments_not_saved: "%d file(s) could not be saved." +button_create_and_continue: Create and continue diff --git a/lang/sv.yml b/lang/sv.yml index 8cd5cbe1a..852c7fe50 100644 --- a/lang/sv.yml +++ b/lang/sv.yml @@ -699,3 +699,4 @@ enumeration_doc_categories: Dokumentkategorier enumeration_activities: Aktiviteter (tidsuppföljning) text_plugin_assets_writable: Plugin assets directory writable warning_attachments_not_saved: "%d file(s) could not be saved." +button_create_and_continue: Create and continue diff --git a/lang/th.yml b/lang/th.yml index cd3c481c2..c0a38592b 100644 --- a/lang/th.yml +++ b/lang/th.yml @@ -701,3 +701,4 @@ text_diff_truncated: '... This diff was truncated because it exceeds the maximum setting_diff_max_lines_displayed: Max number of diff lines displayed text_plugin_assets_writable: Plugin assets directory writable warning_attachments_not_saved: "%d file(s) could not be saved." +button_create_and_continue: Create and continue diff --git a/lang/tr.yml b/lang/tr.yml index d6f32ce3c..81363678c 100644 --- a/lang/tr.yml +++ b/lang/tr.yml @@ -699,3 +699,4 @@ text_diff_truncated: '... This diff was truncated because it exceeds the maximum setting_diff_max_lines_displayed: Max number of diff lines displayed text_plugin_assets_writable: Plugin assets directory writable warning_attachments_not_saved: "%d file(s) could not be saved." +button_create_and_continue: Create and continue diff --git a/lang/uk.yml b/lang/uk.yml index 845fdece2..be121cb5c 100644 --- a/lang/uk.yml +++ b/lang/uk.yml @@ -700,3 +700,4 @@ text_diff_truncated: '... This diff was truncated because it exceeds the maximum setting_diff_max_lines_displayed: Max number of diff lines displayed text_plugin_assets_writable: Plugin assets directory writable warning_attachments_not_saved: "%d file(s) could not be saved." +button_create_and_continue: Create and continue diff --git a/lang/vn.yml b/lang/vn.yml index 59176772f..908e2326d 100644 --- a/lang/vn.yml +++ b/lang/vn.yml @@ -701,3 +701,4 @@ text_diff_truncated: '... This diff was truncated because it exceeds the maximum setting_diff_max_lines_displayed: Max number of diff lines displayed
text_plugin_assets_writable: Plugin assets directory writable
warning_attachments_not_saved: "%d file(s) could not be saved."
+button_create_and_continue: Create and continue
diff --git a/lang/zh-tw.yml b/lang/zh-tw.yml index 5679069a2..50eccf434 100644 --- a/lang/zh-tw.yml +++ b/lang/zh-tw.yml @@ -700,3 +700,4 @@ enumeration_doc_categories: 文件分類 enumeration_activities: 活動 (時間追蹤) text_plugin_assets_writable: Plugin assets directory writable warning_attachments_not_saved: "%d file(s) could not be saved." +button_create_and_continue: Create and continue diff --git a/lang/zh.yml b/lang/zh.yml index e1e30d27e..989f329c6 100644 --- a/lang/zh.yml +++ b/lang/zh.yml @@ -700,3 +700,4 @@ enumeration_doc_categories: 文档类别 enumeration_activities: 活动(时间跟踪) text_plugin_assets_writable: Plugin assets directory writable warning_attachments_not_saved: "%d file(s) could not be saved." +button_create_and_continue: Create and continue diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb index 14afd68d1..093797e38 100644 --- a/test/functional/issues_controller_test.rb +++ b/test/functional/issues_controller_test.rb @@ -313,6 +313,16 @@ class IssuesControllerTest < Test::Unit::TestCase assert_equal 'Value for field 2', v.value end + def test_post_new_and_continue + @request.session[:user_id] = 2 + post :new, :project_id => 1, + :issue => {:tracker_id => 3, + :subject => 'This is first issue', + :priority_id => 5}, + :continue => '' + assert_redirected_to :controller => 'issues', :action => 'new', :tracker_id => 3 + end + def test_post_new_without_custom_fields_param @request.session[:user_id] = 2 post :new, :project_id => 1, |