Project

General

Profile

Feature #29306 » add-assignee-icon-on-tooltip-v2.patch

Mizuki ISHIKAWA, 2018-08-20 02:19

View differences:

app/helpers/issues_helper.rb
60 60
    @cached_label_priority ||= l(:field_priority)
61 61
    @cached_label_project ||= l(:field_project)
62 62

  
63
    (issue.assigned_to ? avatar(issue.assigned_to, :size => "14", :title => l(:field_assigned_to)) : ''.html_safe ) +
63 64
    link_to_issue(issue) + "<br /><br />".html_safe +
64 65
      "<strong>#{@cached_label_project}</strong>: #{link_to_project(issue.project)}<br />".html_safe +
65 66
      "<strong>#{@cached_label_status}</strong>: #{h(issue.status.name)}<br />".html_safe +
public/stylesheets/application.css
1186 1186
.gantt_subjects div { line-height:16px;height:16px;overflow:hidden;white-space:nowrap;text-overflow: ellipsis; }
1187 1187
.gantt_subjects div.issue-subject:hover { background-color:#ffffdd; }
1188 1188

  
1189
.gantt_subjects .issue-subject img.icon-gravatar {
1189
.gantt_subjects .issue-subject img.icon-gravatar, .tooltip .gravatar {
1190 1190
  margin: 2px 5px 0px 2px;
1191 1191
}
1192 1192

  
test/functional/calendars_controller_test.rb
33 33
           :queries
34 34

  
35 35
  def test_show
36
    get :show, :params => {
37
        :project_id => 1
38
      }
36
    with_settings :gravatar_enabled => '1' do
37
      get :show, :params => {
38
          :project_id => 1
39
        }
40
    end
39 41
    assert_response :success
40 42

  
41 43
    # query form
......
51 53

  
52 54
    # Assert context menu on issues
53 55
    assert_select 'form[data-cm-url=?]', '/issues/context_menu'
54
    assert_select 'div.issue.hascontextmenu' do
56
    assert_select 'div.issue.hascontextmenu.tooltip' do
55 57
      assert_select 'input[name=?][type=?]', 'ids[]', 'checkbox'
58
      assert_select 'img[class="gravatar"]'
56 59
    end
57 60
  end
58 61

  
test/functional/gantts_controller_test.rb
30 30
  def test_gantt_should_work
31 31
    i2 = Issue.find(2)
32 32
    i2.update_attribute(:due_date, 1.month.from_now)
33
    get :show, :params => {
34
        :project_id => 1
35
      }
33
    with_settings :gravatar_enabled => '1' do
34
      get :show, :params => {
35
          :project_id => 1
36
        }
37
    end
36 38
    assert_response :success
37 39

  
38 40
    # query form
......
49 51

  
50 52
    # Assert context menu on issues subject and gantt bar
51 53
    assert_select 'div[class=?]', 'issue-subject hascontextmenu'
52
    assert_select 'div[class=?]', 'tooltip hascontextmenu'
54
    assert_select 'div.tooltip.hascontextmenu' do
55
      assert_select 'img[class="gravatar"]'
56
    end
53 57
    assert_select "form[data-cm-url=?]", '/issues/context_menu'
54 58

  
55 59
    # Issue with start and due dates
(7-7/7)