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
5 5
<%= link_to l(:button_log_time), new_issue_time_entry_path(@issue),
6 6
            :class => 'icon icon-time-add' if User.current.allowed_to?(:log_time, @project) %>
7 7
<%= watcher_link(@issue, User.current) %>
8
<%= link_to l(:button_copy), project_copy_issue_path(@project, @issue),
9
            :class => 'icon icon-copy' if User.current.allowed_to?(:copy_issues, @project) && Issue.allowed_target_projects.any? %>
8 10
<%= actions_dropdown do %>
9 11
  <%= copy_object_url_link(issue_url(@issue, only_path: false)) %>
10
  <%= link_to l(:button_copy), project_copy_issue_path(@project, @issue),
11
              :class => 'icon icon-copy' if User.current.allowed_to?(:copy_issues, @project) && Issue.allowed_target_projects.any? %>
12 12
  <%= link_to l(:button_delete), issue_path(@issue),
13 13
              :data => {:confirm => issues_destroy_confirmation_message(@issue)},
14 14
              :method => :delete, :class => 'icon icon-del' if @issue.deletable? %>
test/functional/issues_controller_test.rb
2076 2076
      assert_select 'a', {:count => 1, :text => 'Edit'}
2077 2077
      assert_select 'a', {:count => 0, :text => 'Log time'}
2078 2078
      assert_select 'a', {:count => 0, :text => 'Watch'}
2079
      assert_select 'a', {:count => 0, :text => 'Copy'}
2079 2080
      assert_select 'div.drdn-items a', {:count => 1, :text => 'Copy link'}
2080
      assert_select 'div.drdn-items a', {:count => 0, :text => 'Copy'}
2081 2081
      assert_select 'div.drdn-items a', {:count => 0, :text => 'Delete'}
2082 2082
    end
2083 2083
    # anonymous role is allowed to add a note
......
2098 2098
      assert_select 'a', {:count => 1, :text => 'Edit'}
2099 2099
      assert_select 'a', {:count => 1, :text => 'Log time'}
2100 2100
      assert_select 'a', {:count => 1, :text => 'Watch'}
2101
      assert_select 'a', {:count => 1, :text => 'Copy'}
2101 2102
      assert_select 'div.drdn-items a', {:count => 1, :text => 'Copy link'}
2102
      assert_select 'div.drdn-items a', {:count => 1, :text => 'Copy'}
2103 2103
      assert_select 'div.drdn-items a', {:count => 1, :text => 'Delete'}
2104 2104
    end
2105 2105
    assert_select 'form#issue-form' do
(9-9/11)