Feature #31531 » 0001-Change-quote-icon.patch
| app/assets/images/icons.svg | ||
|---|---|---|
|
<path d="M7 5.03v5.455"/>
|
||
|
<path d="M12 8l5 -3"/>
|
||
|
</symbol>
|
||
|
<symbol viewBox="0 0 24 24" stroke-linecap="round" stroke-linejoin="round" id="icon--quote">
|
||
|
<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"/>
|
||
|
<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"/>
|
||
|
</symbol>
|
||
|
<symbol viewBox="0 0 24 24" stroke-linecap="round" stroke-linejoin="round" id="icon--reload">
|
||
|
<path d="M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4"/>
|
||
|
<path d="M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4"/>
|
||
| config/icon_source.yml | ||
|---|---|---|
|
svg: key
|
||
|
- name: search
|
||
|
svg: search
|
||
|
- name: quote
|
||
|
svg: quote
|
||
| lib/redmine/quote_reply.rb | ||
|---|---|---|
|
def quote_reply(url, selector_for_content, icon_only: false)
|
||
|
quote_reply_function = "quoteReply('#{j url}', '#{j selector_for_content}', '#{j Setting.text_formatting}')"
|
||
|
html_options = { class: 'icon icon-comment' }
|
||
|
html_options = { class: 'icon icon-quote' }
|
||
|
html_options[:title] = l(:button_quote) if icon_only
|
||
|
link_to_function(
|
||
|
sprite_icon('comment', l(:button_quote), icon_only: icon_only),
|
||
|
sprite_icon('quote', l(:button_quote), icon_only: icon_only),
|
||
|
quote_reply_function,
|
||
|
html_options
|
||
|
)
|
||
| test/helpers/journals_helper_test.rb | ||
|---|---|---|
|
journals = issue.visible_journals_with_index # add indice
|
||
|
journal_actions = render_journal_actions(issue, journals.first, {reply_links: true})
|
||
|
assert_select_in journal_actions, 'a[title=?][class="icon icon-comment"]', 'Quote'
|
||
|
assert_select_in journal_actions, 'a[title=?][class="icon icon-quote"]', 'Quote'
|
||
|
assert_select_in journal_actions, 'a[title=?][class="icon-only icon-edit"]', 'Edit'
|
||
|
assert_select_in journal_actions, 'div[class="drdn-items"] a[class="icon icon-del"]'
|
||
|
assert_select_in journal_actions, 'div[class="drdn-items"] a[class="icon icon-copy-link"]'
|
||
| test/unit/lib/redmine/quote_reply_helper_test.rb | ||
|---|---|---|
|
a_tag = quote_reply(url, '#issue_description_wiki')
|
||
|
assert_includes a_tag, %|onclick="#{h "quoteReply('/issues/1/quoted', '#issue_description_wiki', 'common_mark'); return false;"}"|
|
||
|
assert_includes a_tag, %|class="icon icon-comment"|
|
||
|
assert_includes a_tag, %|class="icon icon-quote"|
|
||
|
assert_not_includes a_tag, 'title='
|
||
|
# When icon_only is true
|
||