Project

General

Profile

Feature #34714 » 34714-move-copy.patch

Mizuki ISHIKAWA, 2021-03-22 09:22

View differences:

app/views/issues/_action_menu.html.erb
<%= link_to l(:button_log_time), new_issue_time_entry_path(@issue),
:class => 'icon icon-time-add' if User.current.allowed_to?(:log_time, @project) %>
<%= watcher_link(@issue, User.current) %>
<%= link_to l(:button_copy), project_copy_issue_path(@project, @issue),
: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_copy), project_copy_issue_path(@project, @issue),
:class => 'icon icon-copy' if User.current.allowed_to?(:copy_issues, @project) && Issue.allowed_target_projects.any? %>
<%= link_to l(:button_delete), issue_path(@issue),
:data => {:confirm => issues_destroy_confirmation_message(@issue)},
:method => :delete, :class => 'icon icon-del' if @issue.deletable? %>
test/functional/issues_controller_test.rb
assert_select 'a', {:count => 1, :text => 'Edit'}
assert_select 'a', {:count => 0, :text => 'Log time'}
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 => 'Copy'}
assert_select 'div.drdn-items a', {:count => 0, :text => 'Delete'}
end
# anonymous role is allowed to add a note
......
assert_select 'a', {:count => 1, :text => 'Edit'}
assert_select 'a', {:count => 1, :text => 'Log time'}
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 => 'Copy'}
assert_select 'div.drdn-items a', {:count => 1, :text => 'Delete'}
end
assert_select 'form#issue-form' do
(9-9/11)