Commit 3bfc6ee8 authored by edavis10's avatar edavis10
Browse files

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

git-svn-id: https://svn.redmine.org/redmine/trunk@4105 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 98f59894
......@@ -382,6 +382,11 @@ class Issue < ActiveRecord::Base
done_date = start_date + ((due_date - start_date+1)* done_ratio/100).floor
return done_date <= Date.today
end
# Does this issue have children?
def children?
!leaf?
end
# Users the issue can be assigned to
def assignable_users
......
......@@ -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_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_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>
......@@ -910,3 +910,4 @@ bg:
field_member_of_group: Member of Group
field_assigned_to_role: Member of Role
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:
field_member_of_group: Member of Group
field_assigned_to_role: Member of Role
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:
field_member_of_group: Member of Group
field_assigned_to_role: Member of Role
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:
field_member_of_group: Member of Group
field_assigned_to_role: Member of Role
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:
field_member_of_group: Member of Group
field_assigned_to_role: Member of Role
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:
field_member_of_group: Member of Group
field_assigned_to_role: Member of Role
text_are_you_sure_with_children: Delete issue and all child issues?
......@@ -916,3 +916,4 @@ el:
field_member_of_group: Member of Group
field_assigned_to_role: Member of Role
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:
field_member_of_group: Member of Group
field_assigned_to_role: Member of Role
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:
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_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_set_to: "{{label}} set to {{value}}"
text_journal_deleted: "{{label}} deleted ({{old}})"
......
......@@ -956,3 +956,4 @@ es:
field_member_of_group: Member of Group
field_assigned_to_role: Member of Role
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:
field_member_of_group: Member of Group
field_assigned_to_role: Member of Role
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:
field_member_of_group: Member of Group
field_assigned_to_role: Member of Role
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:
field_member_of_group: Member of Group
field_assigned_to_role: Member of Role
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:
field_member_of_group: Member of Group
field_assigned_to_role: Member of Role
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:
field_member_of_group: Member of Group
field_assigned_to_role: Member of Role
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:
field_member_of_group: Member of Group
field_assigned_to_role: Member of Role
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 @@
field_member_of_group: Member of Group
field_assigned_to_role: Member of Role
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:
field_member_of_group: Member of Group
field_assigned_to_role: Member of Role
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