mirror of
https://github.com/redmine/redmine.git
synced 2025-11-02 11:25:55 +01:00
Change Delete button name to Delete issue (#31278).
Contributed by Frederico Camara. git-svn-id: http://svn.redmine.org/redmine/trunk@21346 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -164,7 +164,7 @@
|
||||
<li><%= context_menu_link l(:button_copy), bulk_edit_issues_path(:ids => @issue_ids, :copy => '1'),
|
||||
:class => 'icon icon-copy', :disabled => !@can[:copy] %></li>
|
||||
<% end %>
|
||||
<li><%= context_menu_link l(:button_delete), issues_path(:ids => @issue_ids, :back_url => @back),
|
||||
<li><%= context_menu_link l(:button_delete_object, object_name: (@issue_ids.size > 1 ? l(:label_issue_plural) : l(:label_issue)).downcase), issues_path(:ids => @issue_ids, :back_url => @back),
|
||||
:method => :delete, :data => {:confirm => issues_destroy_confirmation_message(@issues)}, :class => 'icon icon-del', :disabled => !@can[:delete] %></li>
|
||||
|
||||
<%= call_hook(:view_issues_context_menu_end, {:issues => @issues, :can => @can, :back => @back }) %>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
:class => 'icon icon-copy' if User.current.allowed_to?(:copy_issues, @project) && Issue.allowed_target_projects.any? %>
|
||||
<%= actions_dropdown do %>
|
||||
<%= copy_object_url_link(issue_url(@issue, only_path: false)) %>
|
||||
<%= link_to l(:button_delete), issue_path(@issue),
|
||||
<%= link_to l(:button_delete_object, object_name: l(:label_issue).downcase), issue_path(@issue),
|
||||
:data => {:confirm => issues_destroy_confirmation_message(@issue)},
|
||||
:method => :delete, :class => 'icon icon-del' if @issue.deletable? %>
|
||||
<% end %>
|
||||
|
||||
@@ -49,7 +49,7 @@ class ContextMenusControllerTest < Redmine::ControllerTest
|
||||
assert_select 'a.icon-edit[href=?]', '/issues/1/edit', :text => 'Edit'
|
||||
assert_select 'a.icon-copy-link[data-clipboard-text=?]', 'http://test.host/issues/1', :text => 'Copy link'
|
||||
assert_select 'a.icon-copy[href=?]', '/projects/ecookbook/issues/1/copy', :text => 'Copy'
|
||||
assert_select 'a.icon-del[href=?]', '/issues?ids%5B%5D=1', :text => 'Delete'
|
||||
assert_select 'a.icon-del[href=?]', '/issues?ids%5B%5D=1', :text => 'Delete issue'
|
||||
|
||||
# Statuses
|
||||
assert_select 'a[href=?][data-method="patch"]', '/issues/1?ids%5B%5D=1&issue%5Bstatus_id%5D=5', :text => 'Closed'
|
||||
@@ -72,7 +72,7 @@ class ContextMenusControllerTest < Redmine::ControllerTest
|
||||
|
||||
assert_select 'a.icon-edit[href=?]', '/issues/bulk_edit?ids%5B%5D=1&ids%5B%5D=2', :text => 'Bulk edit'
|
||||
assert_select 'a.icon-copy[href=?]', '/issues/bulk_edit?copy=1&ids%5B%5D=1&ids%5B%5D=2', :text => 'Copy'
|
||||
assert_select 'a.icon-del[href=?]', '/issues?ids%5B%5D=1&ids%5B%5D=2', :text => 'Delete'
|
||||
assert_select 'a.icon-del[href=?]', '/issues?ids%5B%5D=1&ids%5B%5D=2', :text => 'Delete issues'
|
||||
|
||||
# Statuses
|
||||
assert_select 'a[href=?][data-method="patch"]', '/issues/bulk_update?ids%5B%5D=1&ids%5B%5D=2&issue%5Bstatus_id%5D=5', :text => 'Closed'
|
||||
@@ -96,7 +96,7 @@ class ContextMenusControllerTest < Redmine::ControllerTest
|
||||
)
|
||||
assert_response :success
|
||||
|
||||
assert_select 'a.icon-del.disabled[href="#"]', :text => 'Delete'
|
||||
assert_select 'a.icon-del.disabled[href="#"]', :text => 'Delete issue'
|
||||
end
|
||||
end
|
||||
|
||||
@@ -116,7 +116,7 @@ class ContextMenusControllerTest < Redmine::ControllerTest
|
||||
# issue_id: '1,2', set_filter: 1, status_id: '*'
|
||||
assert_select 'a.icon-copy-link[data-clipboard-text=?]', "http://test.host/projects/ecookbook/issues?issue_id=1%2C2&set_filter=1&status_id=%2A", :text => 'Copy link'
|
||||
assert_select 'a.icon-copy[href=?]', "/issues/bulk_edit?copy=1&#{ids}", :text => 'Copy'
|
||||
assert_select 'a.icon-del[href=?]', "/issues?#{ids}", :text => 'Delete'
|
||||
assert_select 'a.icon-del[href=?]', "/issues?#{ids}", :text => 'Delete issues'
|
||||
|
||||
assert_select 'a[href=?]', "/issues/bulk_update?#{ids}&issue%5Bstatus_id%5D=5", :text => 'Closed'
|
||||
assert_select 'a[href=?]', "/issues/bulk_update?#{ids}&issue%5Bpriority_id%5D=8", :text => 'Immediate'
|
||||
@@ -138,7 +138,7 @@ class ContextMenusControllerTest < Redmine::ControllerTest
|
||||
assert_select 'a.icon-edit[href=?]', "/issues/bulk_edit?#{ids}", :text => 'Bulk edit'
|
||||
# issue_id: '1,2,6', set_filter: 1, status_id: '*'
|
||||
assert_select 'a.icon-copy-link[data-clipboard-text=?]', "http://test.host/issues?issue_id=1%2C2%2C6&set_filter=1&status_id=%2A", :text => 'Copy link'
|
||||
assert_select 'a.icon-del[href=?]', "/issues?#{ids}", :text => 'Delete'
|
||||
assert_select 'a.icon-del[href=?]', "/issues?#{ids}", :text => 'Delete issues'
|
||||
|
||||
assert_select 'a[href=?]', "/issues/bulk_update?#{ids}&issue%5Bstatus_id%5D=5", :text => 'Closed'
|
||||
assert_select 'a[href=?]', "/issues/bulk_update?#{ids}&issue%5Bpriority_id%5D=8", :text => 'Immediate'
|
||||
|
||||
@@ -2078,7 +2078,7 @@ class IssuesControllerTest < Redmine::ControllerTest
|
||||
assert_select 'a', {:count => 0, :text => 'Watch'}
|
||||
assert_select 'a', {:count => 0, :text => 'Copy'}
|
||||
assert_select 'div.drdn-items a', {:count => 1, :text => 'Copy link'}
|
||||
assert_select 'div.drdn-items a', {:count => 0, :text => 'Delete'}
|
||||
assert_select 'div.drdn-items a', {:count => 0, :text => 'Delete issue'}
|
||||
end
|
||||
# anonymous role is allowed to add a note
|
||||
assert_select 'form#issue-form' do
|
||||
@@ -2100,7 +2100,7 @@ class IssuesControllerTest < Redmine::ControllerTest
|
||||
assert_select 'a', {:count => 1, :text => 'Watch'}
|
||||
assert_select 'a', {:count => 1, :text => 'Copy'}
|
||||
assert_select 'div.drdn-items a', {:count => 1, :text => 'Copy link'}
|
||||
assert_select 'div.drdn-items a', {:count => 1, :text => 'Delete'}
|
||||
assert_select 'div.drdn-items a', {:count => 1, :text => 'Delete issue'}
|
||||
end
|
||||
assert_select 'form#issue-form' do
|
||||
assert_select 'fieldset' do
|
||||
@@ -3023,7 +3023,7 @@ class IssuesControllerTest < Redmine::ControllerTest
|
||||
get(:show, :params => {:id => 1})
|
||||
assert_response :success
|
||||
assert_select 'a', :text => 'Edit'
|
||||
assert_select 'a', :text => 'Delete'
|
||||
assert_select 'a', :text => 'Delete issue'
|
||||
end
|
||||
|
||||
def test_show_on_closed_project_should_not_display_edit_links
|
||||
@@ -3032,7 +3032,7 @@ class IssuesControllerTest < Redmine::ControllerTest
|
||||
get(:show, :params => {:id => 1})
|
||||
assert_response :success
|
||||
assert_select 'a', :text => 'Edit', :count => 0
|
||||
assert_select 'a', :text => 'Delete', :count => 0
|
||||
assert_select 'a', :text => 'Delete issue', :count => 0
|
||||
end
|
||||
|
||||
def test_show_should_not_display_history_tabs_for_issue_without_journals
|
||||
|
||||
Reference in New Issue
Block a user