@@ -35,9 +35,16 class TrackersController < ApplicationController | |||||
35 | def new |
|
35 | def new | |
36 | @tracker = Tracker.new(params[:tracker]) |
|
36 | @tracker = Tracker.new(params[:tracker]) | |
37 | if request.post? and @tracker.save |
|
37 | if request.post? and @tracker.save | |
|
38 | # workflow copy | |||
|
39 | if params[:copy_workflow_from] && (copy_from = Tracker.find_by_id(params[:copy_workflow_from])) | |||
|
40 | copy_from.workflows.each do |w| | |||
|
41 | @tracker.workflows << w.clone | |||
|
42 | end | |||
|
43 | end | |||
38 | flash[:notice] = l(:notice_successful_create) |
|
44 | flash[:notice] = l(:notice_successful_create) | |
39 | redirect_to :action => 'list' |
|
45 | redirect_to :action => 'list' | |
40 | end |
|
46 | end | |
|
47 | @trackers = Tracker.find :all | |||
41 | end |
|
48 | end | |
42 |
|
49 | |||
43 | def edit |
|
50 | def edit |
@@ -4,5 +4,8 | |||||
4 | <p><%= f.text_field :name, :required => true %></p> |
|
4 | <p><%= f.text_field :name, :required => true %></p> | |
5 | <p><%= f.check_box :is_in_chlog %></p> |
|
5 | <p><%= f.check_box :is_in_chlog %></p> | |
6 | <p><%= f.check_box :is_in_roadmap %></p> |
|
6 | <p><%= f.check_box :is_in_roadmap %></p> | |
|
7 | <% if @tracker.new_record? %> | |||
|
8 | <p><label><%= l(:label_copy_workflow_from) %></label> <%= select_tag(:copy_workflow_from, content_tag("option") + options_from_collection_for_select(@trackers, :id, :name)) %></p> | |||
|
9 | <% end %> | |||
7 | <!--[eoform:tracker]--> |
|
10 | <!--[eoform:tracker]--> | |
8 | </div> |
|
11 | </div> |
@@ -354,6 +354,7 label_view_diff: View differences | |||||
354 | label_diff_inline: inline |
|
354 | label_diff_inline: inline | |
355 | label_diff_side_by_side: side by side |
|
355 | label_diff_side_by_side: side by side | |
356 | label_options: Options |
|
356 | label_options: Options | |
|
357 | label_copy_workflow_from: Copy workflow from | |||
357 |
|
358 | |||
358 | button_login: Einloggen |
|
359 | button_login: Einloggen | |
359 | button_submit: OK |
|
360 | button_submit: OK |
@@ -354,6 +354,7 label_view_diff: View differences | |||||
354 | label_diff_inline: inline |
|
354 | label_diff_inline: inline | |
355 | label_diff_side_by_side: side by side |
|
355 | label_diff_side_by_side: side by side | |
356 | label_options: Options |
|
356 | label_options: Options | |
|
357 | label_copy_workflow_from: Copy workflow from | |||
357 |
|
358 | |||
358 | button_login: Login |
|
359 | button_login: Login | |
359 | button_submit: Submit |
|
360 | button_submit: Submit |
@@ -354,6 +354,7 label_view_diff: View differences | |||||
354 | label_diff_inline: inline |
|
354 | label_diff_inline: inline | |
355 | label_diff_side_by_side: side by side |
|
355 | label_diff_side_by_side: side by side | |
356 | label_options: Options |
|
356 | label_options: Options | |
|
357 | label_copy_workflow_from: Copy workflow from | |||
357 |
|
358 | |||
358 | button_login: Conexión |
|
359 | button_login: Conexión | |
359 | button_submit: Someter |
|
360 | button_submit: Someter |
@@ -354,6 +354,7 label_view_diff: Voir les différences | |||||
354 | label_diff_inline: en ligne |
|
354 | label_diff_inline: en ligne | |
355 | label_diff_side_by_side: côte à côte |
|
355 | label_diff_side_by_side: côte à côte | |
356 | label_options: Options |
|
356 | label_options: Options | |
|
357 | label_copy_workflow_from: Copier le workflow de | |||
357 |
|
358 | |||
358 | button_login: Connexion |
|
359 | button_login: Connexion | |
359 | button_submit: Soumettre |
|
360 | button_submit: Soumettre |
@@ -354,6 +354,7 label_view_diff: View differences | |||||
354 | label_diff_inline: inline |
|
354 | label_diff_inline: inline | |
355 | label_diff_side_by_side: side by side |
|
355 | label_diff_side_by_side: side by side | |
356 | label_options: Options |
|
356 | label_options: Options | |
|
357 | label_copy_workflow_from: Copy workflow from | |||
357 |
|
358 | |||
358 | button_login: Login |
|
359 | button_login: Login | |
359 | button_submit: Invia |
|
360 | button_submit: Invia |
@@ -355,6 +355,7 label_view_diff: 差分を見る | |||||
355 | label_diff_inline: インライン |
|
355 | label_diff_inline: インライン | |
356 | label_diff_side_by_side: 横に並べる |
|
356 | label_diff_side_by_side: 横に並べる | |
357 | label_options: Options |
|
357 | label_options: Options | |
|
358 | label_copy_workflow_from: Copy workflow from | |||
358 |
|
359 | |||
359 | button_login: ログイン |
|
360 | button_login: ログイン | |
360 | button_submit: 変更 |
|
361 | button_submit: 変更 |
@@ -357,6 +357,7 label_view_diff: View differences | |||||
357 | label_diff_inline: inline |
|
357 | label_diff_inline: inline | |
358 | label_diff_side_by_side: side by side |
|
358 | label_diff_side_by_side: side by side | |
359 | label_options: Options |
|
359 | label_options: Options | |
|
360 | label_copy_workflow_from: Copy workflow from | |||
360 |
|
361 | |||
361 | button_login: 登录 |
|
362 | button_login: 登录 | |
362 | button_submit: 提交 |
|
363 | button_submit: 提交 |
General Comments 0
You need to be logged in to leave comments.
Login now