Commit f62a1827 authored by Eric Davis's avatar Eric Davis

Updated issue delete confirmation when it has child issues. #6191

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4105 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 1809eefe
...@@ -382,6 +382,11 @@ class Issue < ActiveRecord::Base ...@@ -382,6 +382,11 @@ class Issue < ActiveRecord::Base
done_date = start_date + ((due_date - start_date+1)* done_ratio/100).floor done_date = start_date + ((due_date - start_date+1)* done_ratio/100).floor
return done_date <= Date.today return done_date <= Date.today
end end
# Does this issue have children?
def children?
!leaf?
end
# Users the issue can be assigned to # Users the issue can be assigned to
def assignable_users def assignable_users
......
...@@ -6,5 +6,5 @@ ...@@ -6,5 +6,5 @@
<%= link_to_if_authorized l(:button_duplicate), {:controller => 'issues', :action => 'new', :project_id => @project, :copy_from => @issue }, :class => 'icon icon-duplicate' %> <%= link_to_if_authorized l(:button_duplicate), {:controller => 'issues', :action => 'new', :project_id => @project, :copy_from => @issue }, :class => 'icon icon-duplicate' %>
<%= link_to_if_authorized l(:button_copy), new_issue_move_path(:id => @issue, :copy_options => {:copy => 't'}), :class => 'icon icon-copy' %> <%= link_to_if_authorized l(:button_copy), new_issue_move_path(:id => @issue, :copy_options => {:copy => 't'}), :class => 'icon icon-copy' %>
<%= link_to_if_authorized l(:button_move), new_issue_move_path(:id => @issue), :class => 'icon icon-move' %> <%= link_to_if_authorized l(:button_move), new_issue_move_path(:id => @issue), :class => 'icon icon-move' %>
<%= link_to_if_authorized l(:button_delete), {:controller => 'issues', :action => 'destroy', :id => @issue}, :confirm => l(:text_are_you_sure), :method => :post, :class => 'icon icon-del' %> <%= link_to_if_authorized l(:button_delete), {:controller => 'issues', :action => 'destroy', :id => @issue}, :confirm => (@issue.leaf? ? l(:text_are_you_sure) : l(:text_are_you_sure_with_children)), :method => :post, :class => 'icon icon-del' %>
</div> </div>
...@@ -910,3 +910,4 @@ bg: ...@@ -910,3 +910,4 @@ bg:
field_member_of_group: Member of Group field_member_of_group: Member of Group
field_assigned_to_role: Member of Role field_assigned_to_role: Member of Role
button_edit_associated_wikipage: "Edit associated Wiki page: {{page_title}}" button_edit_associated_wikipage: "Edit associated Wiki page: {{page_title}}"
text_are_you_sure_with_children: Delete issue and all child issues?
...@@ -930,3 +930,4 @@ bs: ...@@ -930,3 +930,4 @@ bs:
field_member_of_group: Member of Group field_member_of_group: Member of Group
field_assigned_to_role: Member of Role field_assigned_to_role: Member of Role
button_edit_associated_wikipage: "Edit associated Wiki page: {{page_title}}" button_edit_associated_wikipage: "Edit associated Wiki page: {{page_title}}"
text_are_you_sure_with_children: Delete issue and all child issues?
...@@ -919,3 +919,4 @@ ca: ...@@ -919,3 +919,4 @@ ca:
field_member_of_group: Member of Group field_member_of_group: Member of Group
field_assigned_to_role: Member of Role field_assigned_to_role: Member of Role
button_edit_associated_wikipage: "Edit associated Wiki page: {{page_title}}" button_edit_associated_wikipage: "Edit associated Wiki page: {{page_title}}"
text_are_you_sure_with_children: Delete issue and all child issues?
...@@ -916,3 +916,4 @@ cs: ...@@ -916,3 +916,4 @@ cs:
field_member_of_group: Member of Group field_member_of_group: Member of Group
field_assigned_to_role: Member of Role field_assigned_to_role: Member of Role
button_edit_associated_wikipage: "Edit associated Wiki page: {{page_title}}" button_edit_associated_wikipage: "Edit associated Wiki page: {{page_title}}"
text_are_you_sure_with_children: Delete issue and all child issues?
...@@ -932,3 +932,4 @@ da: ...@@ -932,3 +932,4 @@ da:
field_member_of_group: Member of Group field_member_of_group: Member of Group
field_assigned_to_role: Member of Role field_assigned_to_role: Member of Role
button_edit_associated_wikipage: "Edit associated Wiki page: {{page_title}}" button_edit_associated_wikipage: "Edit associated Wiki page: {{page_title}}"
text_are_you_sure_with_children: Delete issue and all child issues?
...@@ -935,3 +935,4 @@ de: ...@@ -935,3 +935,4 @@ de:
field_member_of_group: Member of Group field_member_of_group: Member of Group
field_assigned_to_role: Member of Role field_assigned_to_role: Member of Role
text_are_you_sure_with_children: Delete issue and all child issues?
...@@ -916,3 +916,4 @@ el: ...@@ -916,3 +916,4 @@ el:
field_member_of_group: Member of Group field_member_of_group: Member of Group
field_assigned_to_role: Member of Role field_assigned_to_role: Member of Role
button_edit_associated_wikipage: "Edit associated Wiki page: {{page_title}}" button_edit_associated_wikipage: "Edit associated Wiki page: {{page_title}}"
text_are_you_sure_with_children: Delete issue and all child issues?
...@@ -920,3 +920,4 @@ en-GB: ...@@ -920,3 +920,4 @@ en-GB:
field_member_of_group: Member of Group field_member_of_group: Member of Group
field_assigned_to_role: Member of Role field_assigned_to_role: Member of Role
button_edit_associated_wikipage: "Edit associated Wiki page: {{page_title}}" button_edit_associated_wikipage: "Edit associated Wiki page: {{page_title}}"
text_are_you_sure_with_children: Delete issue and all child issues?
...@@ -838,6 +838,7 @@ en: ...@@ -838,6 +838,7 @@ en:
text_subprojects_destroy_warning: "Its subproject(s): {{value}} will be also deleted." text_subprojects_destroy_warning: "Its subproject(s): {{value}} will be also deleted."
text_workflow_edit: Select a role and a tracker to edit the workflow text_workflow_edit: Select a role and a tracker to edit the workflow
text_are_you_sure: Are you sure ? text_are_you_sure: Are you sure ?
text_are_you_sure_with_children: "Delete issue and all child issues?"
text_journal_changed: "{{label}} changed from {{old}} to {{new}}" text_journal_changed: "{{label}} changed from {{old}} to {{new}}"
text_journal_set_to: "{{label}} set to {{value}}" text_journal_set_to: "{{label}} set to {{value}}"
text_journal_deleted: "{{label}} deleted ({{old}})" text_journal_deleted: "{{label}} deleted ({{old}})"
......
...@@ -956,3 +956,4 @@ es: ...@@ -956,3 +956,4 @@ es:
field_member_of_group: Member of Group field_member_of_group: Member of Group
field_assigned_to_role: Member of Role field_assigned_to_role: Member of Role
button_edit_associated_wikipage: "Edit associated Wiki page: {{page_title}}" button_edit_associated_wikipage: "Edit associated Wiki page: {{page_title}}"
text_are_you_sure_with_children: Delete issue and all child issues?
...@@ -920,3 +920,4 @@ eu: ...@@ -920,3 +920,4 @@ eu:
field_member_of_group: Member of Group field_member_of_group: Member of Group
field_assigned_to_role: Member of Role field_assigned_to_role: Member of Role
button_edit_associated_wikipage: "Edit associated Wiki page: {{page_title}}" button_edit_associated_wikipage: "Edit associated Wiki page: {{page_title}}"
text_are_you_sure_with_children: Delete issue and all child issues?
...@@ -941,3 +941,4 @@ fi: ...@@ -941,3 +941,4 @@ fi:
field_member_of_group: Member of Group field_member_of_group: Member of Group
field_assigned_to_role: Member of Role field_assigned_to_role: Member of Role
button_edit_associated_wikipage: "Edit associated Wiki page: {{page_title}}" button_edit_associated_wikipage: "Edit associated Wiki page: {{page_title}}"
text_are_you_sure_with_children: Delete issue and all child issues?
...@@ -934,3 +934,4 @@ fr: ...@@ -934,3 +934,4 @@ fr:
field_member_of_group: Member of Group field_member_of_group: Member of Group
field_assigned_to_role: Member of Role field_assigned_to_role: Member of Role
button_edit_associated_wikipage: "Modifier la page de Wiki associée: {{page_title}}" button_edit_associated_wikipage: "Modifier la page de Wiki associée: {{page_title}}"
text_are_you_sure_with_children: Delete issue and all child issues?
...@@ -932,3 +932,4 @@ gl: ...@@ -932,3 +932,4 @@ gl:
field_member_of_group: Member of Group field_member_of_group: Member of Group
field_assigned_to_role: Member of Role field_assigned_to_role: Member of Role
button_edit_associated_wikipage: "Edit associated Wiki page: {{page_title}}" button_edit_associated_wikipage: "Edit associated Wiki page: {{page_title}}"
text_are_you_sure_with_children: Delete issue and all child issues?
...@@ -921,3 +921,4 @@ he: ...@@ -921,3 +921,4 @@ he:
field_member_of_group: Member of Group field_member_of_group: Member of Group
field_assigned_to_role: Member of Role field_assigned_to_role: Member of Role
button_edit_associated_wikipage: "Edit associated Wiki page: {{page_title}}" button_edit_associated_wikipage: "Edit associated Wiki page: {{page_title}}"
text_are_you_sure_with_children: Delete issue and all child issues?
...@@ -923,3 +923,4 @@ hr: ...@@ -923,3 +923,4 @@ hr:
field_member_of_group: Member of Group field_member_of_group: Member of Group
field_assigned_to_role: Member of Role field_assigned_to_role: Member of Role
button_edit_associated_wikipage: "Edit associated Wiki page: {{page_title}}" button_edit_associated_wikipage: "Edit associated Wiki page: {{page_title}}"
text_are_you_sure_with_children: Delete issue and all child issues?
...@@ -939,3 +939,4 @@ ...@@ -939,3 +939,4 @@
field_member_of_group: Member of Group field_member_of_group: Member of Group
field_assigned_to_role: Member of Role field_assigned_to_role: Member of Role
button_edit_associated_wikipage: "Edit associated Wiki page: {{page_title}}" button_edit_associated_wikipage: "Edit associated Wiki page: {{page_title}}"
text_are_you_sure_with_children: Delete issue and all child issues?
...@@ -924,3 +924,4 @@ id: ...@@ -924,3 +924,4 @@ id:
field_member_of_group: Member of Group field_member_of_group: Member of Group
field_assigned_to_role: Member of Role field_assigned_to_role: Member of Role
button_edit_associated_wikipage: "Edit associated Wiki page: {{page_title}}" button_edit_associated_wikipage: "Edit associated Wiki page: {{page_title}}"
text_are_you_sure_with_children: Delete issue and all child issues?
...@@ -920,3 +920,4 @@ it: ...@@ -920,3 +920,4 @@ it:
field_member_of_group: Member of Group field_member_of_group: Member of Group
field_assigned_to_role: Member of Role field_assigned_to_role: Member of Role
button_edit_associated_wikipage: "Edit associated Wiki page: {{page_title}}" button_edit_associated_wikipage: "Edit associated Wiki page: {{page_title}}"
text_are_you_sure_with_children: Delete issue and all child issues?
...@@ -941,3 +941,4 @@ ja: ...@@ -941,3 +941,4 @@ ja:
enumeration_activities: 作業分類 (時間トラッキング) enumeration_activities: 作業分類 (時間トラッキング)
enumeration_system_activity: システム作業分類 enumeration_system_activity: システム作業分類
button_edit_associated_wikipage: "Edit associated Wiki page: {{page_title}}" button_edit_associated_wikipage: "Edit associated Wiki page: {{page_title}}"
text_are_you_sure_with_children: Delete issue and all child issues?
...@@ -972,3 +972,4 @@ ko: ...@@ -972,3 +972,4 @@ ko:
field_member_of_group: Member of Group field_member_of_group: Member of Group
field_assigned_to_role: Member of Role field_assigned_to_role: Member of Role
button_edit_associated_wikipage: "Edit associated Wiki page: {{page_title}}" button_edit_associated_wikipage: "Edit associated Wiki page: {{page_title}}"
text_are_you_sure_with_children: Delete issue and all child issues?
...@@ -980,3 +980,4 @@ lt: ...@@ -980,3 +980,4 @@ lt:
field_member_of_group: Member of Group field_member_of_group: Member of Group
field_assigned_to_role: Member of Role field_assigned_to_role: Member of Role
button_edit_associated_wikipage: "Edit associated Wiki page: {{page_title}}" button_edit_associated_wikipage: "Edit associated Wiki page: {{page_title}}"
text_are_you_sure_with_children: Delete issue and all child issues?
...@@ -911,3 +911,4 @@ lv: ...@@ -911,3 +911,4 @@ lv:
field_member_of_group: Member of Group field_member_of_group: Member of Group
field_assigned_to_role: Member of Role field_assigned_to_role: Member of Role
button_edit_associated_wikipage: "Edit associated Wiki page: {{page_title}}" button_edit_associated_wikipage: "Edit associated Wiki page: {{page_title}}"
text_are_you_sure_with_children: Delete issue and all child issues?
...@@ -916,3 +916,4 @@ mk: ...@@ -916,3 +916,4 @@ mk:
field_member_of_group: Member of Group field_member_of_group: Member of Group
field_assigned_to_role: Member of Role field_assigned_to_role: Member of Role
button_edit_associated_wikipage: "Edit associated Wiki page: {{page_title}}" button_edit_associated_wikipage: "Edit associated Wiki page: {{page_title}}"
text_are_you_sure_with_children: Delete issue and all child issues?
...@@ -917,3 +917,4 @@ mn: ...@@ -917,3 +917,4 @@ mn:
field_member_of_group: Member of Group field_member_of_group: Member of Group
field_assigned_to_role: Member of Role field_assigned_to_role: Member of Role
button_edit_associated_wikipage: "Edit associated Wiki page: {{page_title}}" button_edit_associated_wikipage: "Edit associated Wiki page: {{page_title}}"
text_are_you_sure_with_children: Delete issue and all child issues?
...@@ -898,3 +898,4 @@ nl: ...@@ -898,3 +898,4 @@ nl:
field_member_of_group: Member of Group field_member_of_group: Member of Group
field_assigned_to_role: Member of Role field_assigned_to_role: Member of Role
button_edit_associated_wikipage: "Edit associated Wiki page: {{page_title}}" button_edit_associated_wikipage: "Edit associated Wiki page: {{page_title}}"
text_are_you_sure_with_children: Delete issue and all child issues?
...@@ -907,3 +907,4 @@ ...@@ -907,3 +907,4 @@
field_member_of_group: Member of Group field_member_of_group: Member of Group
field_assigned_to_role: Member of Role field_assigned_to_role: Member of Role
button_edit_associated_wikipage: "Edit associated Wiki page: {{page_title}}" button_edit_associated_wikipage: "Edit associated Wiki page: {{page_title}}"
text_are_you_sure_with_children: Delete issue and all child issues?
...@@ -937,3 +937,4 @@ pl: ...@@ -937,3 +937,4 @@ pl:
field_member_of_group: Member of Group field_member_of_group: Member of Group
field_assigned_to_role: Member of Role field_assigned_to_role: Member of Role
button_edit_associated_wikipage: "Edit associated Wiki page: {{page_title}}" button_edit_associated_wikipage: "Edit associated Wiki page: {{page_title}}"
text_are_you_sure_with_children: Delete issue and all child issues?
...@@ -940,3 +940,4 @@ pt-BR: ...@@ -940,3 +940,4 @@ pt-BR:
field_member_of_group: Member of Group field_member_of_group: Member of Group
field_assigned_to_role: Member of Role field_assigned_to_role: Member of Role
button_edit_associated_wikipage: "Edit associated Wiki page: {{page_title}}" button_edit_associated_wikipage: "Edit associated Wiki page: {{page_title}}"
text_are_you_sure_with_children: Delete issue and all child issues?
...@@ -924,3 +924,4 @@ pt: ...@@ -924,3 +924,4 @@ pt:
field_member_of_group: Member of Group field_member_of_group: Member of Group
field_assigned_to_role: Member of Role field_assigned_to_role: Member of Role
button_edit_associated_wikipage: "Edit associated Wiki page: {{page_title}}" button_edit_associated_wikipage: "Edit associated Wiki page: {{page_title}}"
text_are_you_sure_with_children: Delete issue and all child issues?
...@@ -909,3 +909,4 @@ ro: ...@@ -909,3 +909,4 @@ ro:
field_member_of_group: Member of Group field_member_of_group: Member of Group
field_assigned_to_role: Member of Role field_assigned_to_role: Member of Role
button_edit_associated_wikipage: "Edit associated Wiki page: {{page_title}}" button_edit_associated_wikipage: "Edit associated Wiki page: {{page_title}}"
text_are_you_sure_with_children: Delete issue and all child issues?
...@@ -1033,3 +1033,4 @@ ru: ...@@ -1033,3 +1033,4 @@ ru:
notice_unable_delete_time_entry: Невозможно удалить запись журнала. notice_unable_delete_time_entry: Невозможно удалить запись журнала.
label_overall_spent_time: Всего затрачено времени label_overall_spent_time: Всего затрачено времени
text_are_you_sure_with_children: Delete issue and all child issues?
...@@ -911,3 +911,4 @@ sk: ...@@ -911,3 +911,4 @@ sk:
field_member_of_group: Member of Group field_member_of_group: Member of Group
field_assigned_to_role: Member of Role field_assigned_to_role: Member of Role
button_edit_associated_wikipage: "Edit associated Wiki page: {{page_title}}" button_edit_associated_wikipage: "Edit associated Wiki page: {{page_title}}"
text_are_you_sure_with_children: Delete issue and all child issues?
...@@ -912,3 +912,4 @@ sl: ...@@ -912,3 +912,4 @@ sl:
field_member_of_group: Member of Group field_member_of_group: Member of Group
field_assigned_to_role: Member of Role field_assigned_to_role: Member of Role
button_edit_associated_wikipage: "Edit associated Wiki page: {{page_title}}" button_edit_associated_wikipage: "Edit associated Wiki page: {{page_title}}"
text_are_you_sure_with_children: Delete issue and all child issues?
...@@ -916,3 +916,4 @@ sr-YU: ...@@ -916,3 +916,4 @@ sr-YU:
field_member_of_group: Member of Group field_member_of_group: Member of Group
field_assigned_to_role: Member of Role field_assigned_to_role: Member of Role
button_edit_associated_wikipage: "Edit associated Wiki page: {{page_title}}" button_edit_associated_wikipage: "Edit associated Wiki page: {{page_title}}"
text_are_you_sure_with_children: Delete issue and all child issues?
...@@ -917,3 +917,4 @@ sr: ...@@ -917,3 +917,4 @@ sr:
field_assigned_to_role: Member of Role field_assigned_to_role: Member of Role
button_edit_associated_wikipage: "Edit associated Wiki page: {{page_title}}" button_edit_associated_wikipage: "Edit associated Wiki page: {{page_title}}"
text_are_you_sure_with_children: Delete issue and all child issues?
...@@ -961,3 +961,4 @@ sv: ...@@ -961,3 +961,4 @@ sv:
field_member_of_group: Member of Group field_member_of_group: Member of Group
field_assigned_to_role: Member of Role field_assigned_to_role: Member of Role
button_edit_associated_wikipage: "Edit associated Wiki page: {{page_title}}" button_edit_associated_wikipage: "Edit associated Wiki page: {{page_title}}"
text_are_you_sure_with_children: Delete issue and all child issues?
...@@ -913,3 +913,4 @@ th: ...@@ -913,3 +913,4 @@ th:
field_member_of_group: Member of Group field_member_of_group: Member of Group
field_assigned_to_role: Member of Role field_assigned_to_role: Member of Role
button_edit_associated_wikipage: "Edit associated Wiki page: {{page_title}}" button_edit_associated_wikipage: "Edit associated Wiki page: {{page_title}}"
text_are_you_sure_with_children: Delete issue and all child issues?
...@@ -939,3 +939,4 @@ tr: ...@@ -939,3 +939,4 @@ tr:
field_member_of_group: Member of Group field_member_of_group: Member of Group
field_assigned_to_role: Member of Role field_assigned_to_role: Member of Role
button_edit_associated_wikipage: "Edit associated Wiki page: {{page_title}}" button_edit_associated_wikipage: "Edit associated Wiki page: {{page_title}}"
text_are_you_sure_with_children: Delete issue and all child issues?
...@@ -912,3 +912,4 @@ uk: ...@@ -912,3 +912,4 @@ uk:
field_member_of_group: Member of Group field_member_of_group: Member of Group
field_assigned_to_role: Member of Role field_assigned_to_role: Member of Role
button_edit_associated_wikipage: "Edit associated Wiki page: {{page_title}}" button_edit_associated_wikipage: "Edit associated Wiki page: {{page_title}}"
text_are_you_sure_with_children: Delete issue and all child issues?
...@@ -971,3 +971,4 @@ vi: ...@@ -971,3 +971,4 @@ vi:
field_member_of_group: Member of Group field_member_of_group: Member of Group
field_assigned_to_role: Member of Role field_assigned_to_role: Member of Role
button_edit_associated_wikipage: "Edit associated Wiki page: {{page_title}}" button_edit_associated_wikipage: "Edit associated Wiki page: {{page_title}}"
text_are_you_sure_with_children: Delete issue and all child issues?
...@@ -1002,3 +1002,4 @@ ...@@ -1002,3 +1002,4 @@
enumeration_activities: 活動 (時間追蹤) enumeration_activities: 活動 (時間追蹤)
enumeration_system_activity: 系統活動 enumeration_system_activity: 系統活動
text_are_you_sure_with_children: Delete issue and all child issues?
...@@ -934,3 +934,4 @@ zh: ...@@ -934,3 +934,4 @@ zh:
field_member_of_group: Member of Group field_member_of_group: Member of Group
field_assigned_to_role: Member of Role field_assigned_to_role: Member of Role
button_edit_associated_wikipage: "Edit associated Wiki page: {{page_title}}" button_edit_associated_wikipage: "Edit associated Wiki page: {{page_title}}"
text_are_you_sure_with_children: Delete issue and all child issues?
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment