Project

General

Profile

Feature #31531 » 0001-Change-quote-icon.patch

Mizuki ISHIKAWA, 2025-01-15 09:03

View differences:

app/assets/images/icons.svg
322 322
      <path d="M7 5.03v5.455"/>
323 323
      <path d="M12 8l5 -3"/>
324 324
    </symbol>
325
    <symbol viewBox="0 0 24 24" stroke-linecap="round" stroke-linejoin="round" id="icon--quote">
326
      <path d="M10 11h-4a1 1 0 0 1 -1 -1v-3a1 1 0 0 1 1 -1h3a1 1 0 0 1 1 1v6c0 2.667 -1.333 4.333 -4 5"/>
327
      <path d="M19 11h-4a1 1 0 0 1 -1 -1v-3a1 1 0 0 1 1 -1h3a1 1 0 0 1 1 1v6c0 2.667 -1.333 4.333 -4 5"/>
328
    </symbol>
325 329
    <symbol viewBox="0 0 24 24" stroke-linecap="round" stroke-linejoin="round" id="icon--reload">
326 330
      <path d="M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4"/>
327 331
      <path d="M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4"/>
config/icon_source.yml
205 205
  svg: key
206 206
- name: search
207 207
  svg: search
208
- name: quote
209
  svg: quote
lib/redmine/quote_reply.rb
27 27
      def quote_reply(url, selector_for_content, icon_only: false)
28 28
        quote_reply_function = "quoteReply('#{j url}', '#{j selector_for_content}', '#{j Setting.text_formatting}')"
29 29

  
30
        html_options = { class: 'icon icon-comment' }
30
        html_options = { class: 'icon icon-quote' }
31 31
        html_options[:title] = l(:button_quote) if icon_only
32 32

  
33 33
        link_to_function(
34
          sprite_icon('comment', l(:button_quote), icon_only: icon_only),
34
          sprite_icon('quote', l(:button_quote), icon_only: icon_only),
35 35
          quote_reply_function,
36 36
          html_options
37 37
        )
test/helpers/journals_helper_test.rb
47 47
    journals = issue.visible_journals_with_index # add indice
48 48
    journal_actions = render_journal_actions(issue, journals.first, {reply_links: true})
49 49

  
50
    assert_select_in journal_actions, 'a[title=?][class="icon icon-comment"]', 'Quote'
50
    assert_select_in journal_actions, 'a[title=?][class="icon icon-quote"]', 'Quote'
51 51
    assert_select_in journal_actions, 'a[title=?][class="icon-only icon-edit"]', 'Edit'
52 52
    assert_select_in journal_actions, 'div[class="drdn-items"] a[class="icon icon-del"]'
53 53
    assert_select_in journal_actions, 'div[class="drdn-items"] a[class="icon icon-copy-link"]'
test/unit/lib/redmine/quote_reply_helper_test.rb
29 29

  
30 30
      a_tag = quote_reply(url, '#issue_description_wiki')
31 31
      assert_includes a_tag, %|onclick="#{h "quoteReply('/issues/1/quoted', '#issue_description_wiki', 'common_mark'); return false;"}"|
32
      assert_includes a_tag, %|class="icon icon-comment"|
32
      assert_includes a_tag, %|class="icon icon-quote"|
33 33
      assert_not_includes a_tag, 'title='
34 34

  
35 35
      # When icon_only is true
(4-4/5)