diff options
author | Marius Balteanu <marius.balteanu@zitec.com> | 2025-07-04 05:28:34 +0000 |
---|---|---|
committer | Marius Balteanu <marius.balteanu@zitec.com> | 2025-07-04 05:28:34 +0000 |
commit | c1115fea4a689f57b1c6fa06b7b9c3d112c70e36 (patch) | |
tree | ef2b848a4af204dc7123a10f2fd273a08cecf23f | |
parent | 955d508588358fa0f7b08d8a33d729df2412b909 (diff) | |
download | redmine-c1115fea4a689f57b1c6fa06b7b9c3d112c70e36.tar.gz redmine-c1115fea4a689f57b1c6fa06b7b9c3d112c70e36.zip |
Fixes @icon-only@ class for quote reply button and test assertions that are always true (#42515).
git-svn-id: https://svn.redmine.org/redmine/trunk@23853 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | lib/redmine/quote_reply.rb | 2 | ||||
-rw-r--r-- | test/helpers/journals_helper_test.rb | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/redmine/quote_reply.rb b/lib/redmine/quote_reply.rb index 2bf41d405..588f02e39 100644 --- a/lib/redmine/quote_reply.rb +++ b/lib/redmine/quote_reply.rb @@ -27,7 +27,7 @@ module Redmine 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-quote' } + html_options = { class: "#{icon_only ? "icon-only" : "icon"} icon-quote" } html_options[:title] = l(:button_quote) if icon_only link_to_function( diff --git a/test/helpers/journals_helper_test.rb b/test/helpers/journals_helper_test.rb index 47f7b7749..5c78761ef 100644 --- a/test/helpers/journals_helper_test.rb +++ b/test/helpers/journals_helper_test.rb @@ -47,7 +47,7 @@ class JournalsHelperTest < Redmine::HelperTest 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-quote"]', 'Quote' + assert_select_in journal_actions, 'a[title=?][class="icon-only 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"]' @@ -66,8 +66,8 @@ class JournalsHelperTest < Redmine::HelperTest assert_select_in journal_actions, 'span.reaction-button-wrapper' assert_select_in journal_actions, 'span.drdn' - assert_select_in journal_actions, 'a[class="icon-comment"]', false - assert_select_in journal_actions, 'a[class="icon-edit"]', false + assert_select_in journal_actions, 'a[class="icon-only icon-quote"]', false + assert_select_in journal_actions, 'a[class="icon-only icon-edit"]', false end def test_journal_thumbnail_attachments_should_be_in_the_same_order_as_the_journal_details |