]> source.dussan.org Git - redmine.git/commitdiff
Adds a 'Create and continue' button on the new issue form, that will create the issue...
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Fri, 16 Jan 2009 17:20:41 +0000 (17:20 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Fri, 16 Jan 2009 17:20:41 +0000 (17:20 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2265 e93f8b46-1217-0410-a6f0-8f06a7374b81

34 files changed:
app/controllers/issues_controller.rb
app/views/issues/new.rhtml
lang/bg.yml
lang/ca.yml
lang/cs.yml
lang/da.yml
lang/de.yml
lang/en.yml
lang/es.yml
lang/fi.yml
lang/fr.yml
lang/he.yml
lang/hu.yml
lang/it.yml
lang/ja.yml
lang/ko.yml
lang/lt.yml
lang/nl.yml
lang/no.yml
lang/pl.yml
lang/pt-br.yml
lang/pt.yml
lang/ro.yml
lang/ru.yml
lang/sk.yml
lang/sr.yml
lang/sv.yml
lang/th.yml
lang/tr.yml
lang/uk.yml
lang/vn.yml
lang/zh-tw.yml
lang/zh.yml
test/functional/issues_controller_test.rb

index a2b659f9041f18c8039155a447e47f067fd66038..3b7587c1588ccdae7a0006ffac7814ee1f1b78c3 100644 (file)
@@ -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        
index 732a562a368e62d6a736e3bd3d170e5f35d626be..1bae6abaa7117964ce01db1f6645c4e369366f16 100644 (file)
@@ -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',
index df186904019617315ab87d39cbe4d1d9cf6327ec..61f75209da047c132390ceff1c660a63204b1b61 100644 (file)
@@ -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
index d0d6b8278410486d9a1236898d2ed1d1b42a98ce..0ce265f9f2560455b3d4ddfdd886e86f6675702b 100644 (file)
@@ -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\r
 text_plugin_assets_writable: Plugin assets directory writable\r
 warning_attachments_not_saved: "%d file(s) could not be saved."\r
+button_create_and_continue: Create and continue\r
index 16fde627408c7ff06918cfbd8a77cfde9520a049..534da679a2e4eab63ce6653e8e29c75e62b693b5 100644 (file)
@@ -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
index 8f1049d05e4491f9cfa9e523ee74c7a7cc021db3..2edbc5243bb99fb1aa7c6ef89aed29c63c352a5d 100644 (file)
@@ -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
index 4697aae6a30aae470c8945eccafe02e2b353d243..c403b4817a9d18090e225452d0165481d5a95b6e 100644 (file)
@@ -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
index 01a7fcee167166cf515a236c358c0c3225f7686a..01ac078cf1b36eeed5e390881ab814c2cc446297 100644 (file)
@@ -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
index 83c51e6ca72b6d2788e212acbf1d24214657035b..1729292e767f4623ae9734a2b5847841360ab21f 100644 (file)
@@ -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
index 236338600b7238ac48869756088d330bfa6e33da..244f858eb92dfb10f36ed883638507f9b88ce955 100644 (file)
@@ -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
index c3210a55498fcee064adca15f9869dd1079eaf56..374a0d868417f769584a4b2bd4552d8f4c2d3978 100644 (file)
@@ -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
index 617b3acbb47d83141b1b64751a6593b7a1a57967..b10b73296d101a0b2c4f65af7e37f9a0810ad808 100644 (file)
@@ -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
index 1768cedbbe5b41cc0cad135543c1575ae7b74d74..059b3ee68e3333d058ff381c86480183aa01570f 100644 (file)
@@ -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
index 134096ba02f1e8b780195dfc4872a74073706706..f3798b477a675b0969a885a98fdad68aa054d218 100644 (file)
@@ -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
index 2ca1a4e4e5993cfdc4ae42e3333e7f16e4a658b1..c1279b3f92d62cf6cf5aac0cd0ba3471fe59626d 100644 (file)
@@ -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
index cc072e10419f7694a94036185d1a2114437e089a..f7958f97bfe5935fadbbfcb2cb1d3836709e8356 100644 (file)
@@ -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
index ef2978e80345956ecc780d9a810f52a44dc09d83..3cdbcf09c2357f42923b812e3db3b329ceb7076a 100644 (file)
@@ -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
index bbffbf111434325df1f83d44806970a443776389..ed10b4db6e095d910a6e1b21c7c8abcf574e9abf 100644 (file)
@@ -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
index 9d0ccc932b785206a0eca0a631a9ede167e7e2f2..c8f131ff9230e5476d818d2a08a77375da1f5032 100644 (file)
@@ -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
index 9742e19a1a1c9e41a1ae58863a28e30c224036a2..6b28f0e0d8707378937cbaf5436669e8843a0f4c 100644 (file)
@@ -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
index 90e7e770c33404f3d2242146de0bdc6dd7aa25b1..ecbbc0ce524797152b1614592c83c72294b3b6c2 100644 (file)
@@ -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\r
 text_plugin_assets_writable: Plugin assets directory writable\r
 warning_attachments_not_saved: "%d file(s) could not be saved."\r
+button_create_and_continue: Create and continue\r
index 17cc36b045be7eb8eb6324599f6e92f33164fa74..ec42386de44653f4230042fb4afbea45b56cb8c8 100644 (file)
@@ -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
index 25684ced373ebe7741f848d22e99cb62b45af3d2..b0df48d261838784a400b3acb3641a57a6280063 100644 (file)
@@ -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
index 2a8bd3c6301faddc42e5c7e5f83dd280e375d739..4943eea0f607c3d6fcac169d0214fa3133fd3be3 100644 (file)
@@ -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
index f1a96fccabdbd1cca9191d956f7fe7a06f472a0c..ffae2d644fbe53cf3c82ec7f9dc73ba9268c7575 100644 (file)
@@ -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\r
 text_plugin_assets_writable: Plugin assets directory writable\r
 warning_attachments_not_saved: "%d file(s) could not be saved."\r
+button_create_and_continue: Create and continue\r
index dbe5c5ef560739ed239cf835c0f5fd3dd98957b4..7070c4a22ae58c70560eb7b0c1a934f5a0b23c6f 100644 (file)
@@ -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
index 8cd5cbe1a8445593c5aba85a0d28cdbd91436ec8..852c7fe50f27c54ca6bd7d0e4f103e74c87252ef 100644 (file)
@@ -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
index cd3c481c276b01a8730108b236b222bf837ccec7..c0a38592ba55b5a6f6cca98682ccb373f321b712 100644 (file)
@@ -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
index d6f32ce3c98a9c4885b8566e7ee0d9d485bd1a2c..81363678c28f16e4c2c0ade547cfecf87c8c1f30 100644 (file)
@@ -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
index 845fdece202f8b2f4db7dcb6a766a3c4775d5f3c..be121cb5ce1062139401819d036bcdbfd7e8d6d3 100644 (file)
@@ -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
index 59176772ff4747057cdc692d1381dad16601b343..908e2326d81db0c1bc3edcd426cf53539f2139ef 100644 (file)
@@ -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\r
 text_plugin_assets_writable: Plugin assets directory writable\r
 warning_attachments_not_saved: "%d file(s) could not be saved."\r
+button_create_and_continue: Create and continue\r
index 5679069a2e42f7628f6bcb7415e26d18f0cb460a..50eccf4346fb370ffeae667e562bf43ac3bfc110 100644 (file)
@@ -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
index e1e30d27e302d071417314ac884cc97cc1c4cac6..989f329c6c465e23adceffe8d749df2588fbee17 100644 (file)
@@ -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
index 14afd68d1436f631253d67fd089ddfef6ad951b5..093797e38d78b8aa26c916a460f21986e3f67a39 100644 (file)
@@ -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,