diff options
-rw-r--r-- | app/assets/images/icons.svg | 4 | ||||
-rw-r--r-- | app/assets/stylesheets/application.css | 22 | ||||
-rw-r--r-- | app/assets/stylesheets/responsive.css | 7 | ||||
-rw-r--r-- | app/helpers/icons_helper.rb | 7 | ||||
-rw-r--r-- | app/helpers/reactions_helper.rb | 2 | ||||
-rw-r--r-- | config/icon_source.yml | 3 | ||||
-rw-r--r-- | config/locales/bg.yml | 3 | ||||
-rw-r--r-- | config/locales/ja.yml | 2 | ||||
-rw-r--r-- | config/settings.yml | 2 | ||||
-rw-r--r-- | db/migrate/017_create_settings.rb | 1 | ||||
-rw-r--r-- | lib/redmine/quote_reply.rb | 4 | ||||
-rw-r--r-- | lib/tasks/icons.rake | 2 | ||||
-rw-r--r-- | test/helpers/icons_helper_test.rb | 7 | ||||
-rw-r--r-- | test/helpers/journals_helper_test.rb | 2 | ||||
-rw-r--r-- | test/system/reactions_test.rb | 6 | ||||
-rw-r--r-- | test/unit/lib/redmine/quote_reply_helper_test.rb | 2 | ||||
-rw-r--r-- | test/unit/setting_test.rb | 4 |
17 files changed, 56 insertions, 24 deletions
diff --git a/app/assets/images/icons.svg b/app/assets/images/icons.svg index df635523a..e30ef5446 100644 --- a/app/assets/images/icons.svg +++ b/app/assets/images/icons.svg @@ -351,6 +351,10 @@ <path d="M7 5.03v5.455"/> <path d="M12 8l5 -3"/> </symbol> + <symbol viewBox="0 0 24 24" id="icon--quote-filled"> + <path d="M9 5a2 2 0 0 1 2 2v6c0 3.13 -1.65 5.193 -4.757 5.97a1 1 0 1 1 -.486 -1.94c2.227 -.557 3.243 -1.827 3.243 -4.03v-1h-3a2 2 0 0 1 -1.995 -1.85l-.005 -.15v-3a2 2 0 0 1 2 -2z"/> + <path d="M18 5a2 2 0 0 1 2 2v6c0 3.13 -1.65 5.193 -4.757 5.97a1 1 0 1 1 -.486 -1.94c2.227 -.557 3.243 -1.827 3.243 -4.03v-1h-3a2 2 0 0 1 -1.995 -1.85l-.005 -.15v-3a2 2 0 0 1 2 -2z"/> + </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"/> diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css index 26e719cbb..e35e5cba0 100644 --- a/app/assets/stylesheets/application.css +++ b/app/assets/stylesheets/application.css @@ -936,6 +936,9 @@ ul.projects div.description ul li {list-style-type:initial;} #projects-index a.project ~ svg, table.projects tr.project td.name svg { margin-left: 4px; } +#projects-index li p { + margin-top: 0px; +} #notified-projects>ul, #tracker_project_ids>ul, #custom_field_project_ids>ul {max-height:250px; overflow-y:auto;} @@ -1888,10 +1891,15 @@ td.gantt_selected_column .gantt_hdr,.gantt_selected_column_container { flex-shrink: 0; } -a.icon:hover svg, a.icon-only:hover svg { +a.icon:hover .icon-svg, a.icon-only:hover .icon-svg { stroke: #c61a1a; } +a.icon:hover .icon-svg-filled, a.icon-only:hover .icon-svg-filled { + stroke: none; + fill: #c61a1a; +} + svg.icon-ok { stroke: #5db651; } @@ -1915,6 +1923,11 @@ svg.icon-svg { vertical-align: middle; } +svg.icon-svg-filled { + fill: #169; + stroke: none; +} + svg.s20 { width: 1.25rem; height: 1.25rem; @@ -2122,13 +2135,6 @@ color: #555; text-shadow: 1px 1px 0 #fff; img.filecontent.image {background-image: url(/transparent.png);} /* Reaction styles */ -.reaction-button.reacted .icon-svg { - fill: #126fa7; - stroke: none; -} -.reaction-button.reacted:hover .icon-svg { - fill: #c61a1a; -} .reaction-button:hover, .reaction-button:active { text-decoration: none; } diff --git a/app/assets/stylesheets/responsive.css b/app/assets/stylesheets/responsive.css index 3a2eb46bb..867c41e9b 100644 --- a/app/assets/stylesheets/responsive.css +++ b/app/assets/stylesheets/responsive.css @@ -854,6 +854,13 @@ div#sticky-issue-header { top: 64px; } + + /* Prevent content from being hidden behind #sticky-issue-header and project-jump when scrolling via anchor links. */ + .controller-issues.action-show div.wiki a[name], + .controller-issues.action-show #history div[id^="note-"], + .controller-issues.action-show #history div[id^="change-"] { + scroll-margin-top: 114px; + } } @media all and (max-width: 599px) { diff --git a/app/helpers/icons_helper.rb b/app/helpers/icons_helper.rb index f96315c75..6afb84537 100644 --- a/app/helpers/icons_helper.rb +++ b/app/helpers/icons_helper.rb @@ -21,10 +21,10 @@ module IconsHelper DEFAULT_ICON_SIZE = "18" DEFAULT_SPRITE = "icons" - def sprite_icon(icon_name, label = nil, icon_only: false, size: DEFAULT_ICON_SIZE, css_class: nil, sprite: DEFAULT_SPRITE, plugin: nil, rtl: false) + def sprite_icon(icon_name, label = nil, icon_only: false, size: DEFAULT_ICON_SIZE, style: :outline, css_class: nil, sprite: DEFAULT_SPRITE, plugin: nil, rtl: false) sprite = plugin ? "plugin_assets/#{plugin}/#{sprite}.svg" : "#{sprite}.svg" - svg_icon = svg_sprite_icon(icon_name, size: size, css_class: css_class, sprite: sprite, rtl: rtl) + svg_icon = svg_sprite_icon(icon_name, size: size, style: style, css_class: css_class, sprite: sprite, rtl: rtl) if label label_classes = ["icon-label"] @@ -92,8 +92,9 @@ module IconsHelper private - def svg_sprite_icon(icon_name, size: DEFAULT_ICON_SIZE, sprite: DEFAULT_SPRITE, css_class: nil, rtl: false) + def svg_sprite_icon(icon_name, size: DEFAULT_ICON_SIZE, style: :outline, sprite: DEFAULT_SPRITE, css_class: nil, rtl: false) css_classes = "s#{size} icon-svg" + css_classes += " icon-svg-filled" if style == :filled css_classes += " #{css_class}" unless css_class.nil? css_classes += " icon-rtl" if rtl diff --git a/app/helpers/reactions_helper.rb b/app/helpers/reactions_helper.rb index 97943e71c..e02e1c9f9 100644 --- a/app/helpers/reactions_helper.rb +++ b/app/helpers/reactions_helper.rb @@ -52,7 +52,7 @@ module ReactionsHelper def reaction_button_reacted(object, reaction, count, tooltip) reaction_button_wrapper object do link_to( - sprite_icon('thumb-up-filled', count.nonzero?), + sprite_icon('thumb-up-filled', count.nonzero?, style: :filled), reaction_path(reaction, object_type: object.class.name, object_id: object), remote: true, method: :delete, class: ['icon', 'reaction-button', 'reacted'], diff --git a/config/icon_source.yml b/config/icon_source.yml index 38ad2fbf4..64f0a1d8c 100644 --- a/config/icon_source.yml +++ b/config/icon_source.yml @@ -233,3 +233,6 @@ svg: bulb - name: message-report svg: message-report +- name: quote-filled + svg: quote + style: filled
\ No newline at end of file diff --git a/config/locales/bg.yml b/config/locales/bg.yml index 0a310a9b8..c25a7dc57 100644 --- a/config/locales/bg.yml +++ b/config/locales/bg.yml @@ -1345,6 +1345,7 @@ bg: Бие можете да го конфигурирате в config/configuration.yml. text_allowed_queries_to_select: Само публичните (за всички потребители) заявки са достъпни за избор text_setting_config_change: Вие можете да конфигурирате поведението в config/configuration.yml. Моля, рестартирайте Redmine след редактиране на файла. + text_setting_gravatar_default_initials_html: Инициалите на потребителите са изпратени на <a href="https://www.gravatar.com">https://www.gravatar.com</a> за генериране на техните аватари. default_role_manager: Мениджър default_role_developer: Разработчик @@ -1455,5 +1456,3 @@ bg: reaction_text_x_other_users: one: 1 друг other: "%{count} други" - text_setting_gravatar_default_initials_html: Users' initials are sent to <a href="https://www.gravatar.com">https://www.gravatar.com</a> - to generate their avatars. diff --git a/config/locales/ja.yml b/config/locales/ja.yml index 0cb981fb4..da77f3e8b 100644 --- a/config/locales/ja.yml +++ b/config/locales/ja.yml @@ -1450,7 +1450,7 @@ ja: label_attachment_summary: zero: "%{filename}" other: "%{filename} ほか%{count}件" - setting_wiki_tablesort_enabled: Javascript based table sorting in wiki content + setting_wiki_tablesort_enabled: コンテンツ内テーブルの Tablesort (JavaScript) による並べ替え label_progressbar: 進捗バー error_spent_on_closed_issue: 完了したチケットに作業時間を記録することはできません setting_timelog_accept_closed_issues: 完了したチケットへの作業時間の記録を許可 diff --git a/config/settings.yml b/config/settings.yml index cda40fa38..b1217fc0a 100644 --- a/config/settings.yml +++ b/config/settings.yml @@ -362,6 +362,6 @@ timelog_accept_closed_issues: show_status_changes_in_mail_subject: default: 1 wiki_tablesort_enabled: - default: 1 + default: 0 reactions_enabled: default: 1 diff --git a/db/migrate/017_create_settings.rb b/db/migrate/017_create_settings.rb index 5768ca24c..f86a1c2c3 100644 --- a/db/migrate/017_create_settings.rb +++ b/db/migrate/017_create_settings.rb @@ -8,6 +8,7 @@ class CreateSettings < ActiveRecord::Migration[4.2] # Persist default settings for new installations Setting.create!(name: 'default_notification_option', value: Setting.default_notification_option) Setting.create!(name: 'text_formatting', value: Setting.text_formatting) + Setting.create!(name: 'wiki_tablesort_enabled', value: Setting.wiki_tablesort_enabled) end def self.down diff --git a/lib/redmine/quote_reply.rb b/lib/redmine/quote_reply.rb index 05737c079..2bf41d405 100644 --- a/lib/redmine/quote_reply.rb +++ b/lib/redmine/quote_reply.rb @@ -27,11 +27,11 @@ 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-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-filled', l(:button_quote), icon_only: icon_only, style: :filled), quote_reply_function, html_options ) diff --git a/lib/tasks/icons.rake b/lib/tasks/icons.rake index e50c450a1..269ef43e2 100644 --- a/lib/tasks/icons.rake +++ b/lib/tasks/icons.rake @@ -16,7 +16,7 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. unless Rails.env.production? - ICON_RELEASE_VERSION = "v3.19.0" + ICON_RELEASE_VERSION = "v3.33.0" ICON_DEFAULT_STYLE = "outline" SOURCE = URI.parse("https://raw.githubusercontent.com/tabler/tabler-icons/#{ICON_RELEASE_VERSION}/icons") diff --git a/test/helpers/icons_helper_test.rb b/test/helpers/icons_helper_test.rb index ab0b58db4..7ef071f86 100644 --- a/test/helpers/icons_helper_test.rb +++ b/test/helpers/icons_helper_test.rb @@ -71,6 +71,13 @@ class IconsHelperTest < Redmine::HelperTest assert_match expected, icon end + def test_sprite_icon_should_return_svg_with_filled_class_when_style_is_filled + expected = %r{<svg class="s18 icon-svg icon-svg-filled" aria-hidden="true"><use href="/assets/icons-\w+.svg#icon--edit"></use></svg>$} + icon = sprite_icon('edit', style: :filled) + + assert_match expected, icon + end + def test_file_icon_should_return_folder_icon_for_directory entry = stub(:is_dir? => true) expected = %r{<svg class="s18 icon-svg" aria-hidden="true"><use href="/assets/icons-\w+.svg#icon--folder"></use></svg><span class="icon-label">folder_name</span>} diff --git a/test/helpers/journals_helper_test.rb b/test/helpers/journals_helper_test.rb index b8ecec685..47f7b7749 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-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"]' diff --git a/test/system/reactions_test.rb b/test/system/reactions_test.rb index cd3e2e871..96dd4cf81 100644 --- a/test/system/reactions_test.rb +++ b/test/system/reactions_test.rb @@ -129,7 +129,7 @@ class ReactionsSystemTest < ApplicationSystemTestCase within('#change-1') do assert_selector 'a.reaction-button' - assert_no_selector 'a.icon-comment' + assert_no_selector 'a.icon-quote' assert_no_selector 'span.drdn' end within("#change-#{journal_without_notes.id}") do @@ -143,14 +143,14 @@ class ReactionsSystemTest < ApplicationSystemTestCase within('#change-1') do assert_selector 'a.reaction-button' - assert_selector 'a.icon-comment' + assert_selector 'a.icon-quote' assert_selector 'span.drdn' end within("#change-#{journal_without_notes.id}") do assert_selector 'a.reaction-button' assert_selector 'span.drdn' - assert_no_selector 'a.icon-comment' + assert_no_selector 'a.icon-quote' end end diff --git a/test/unit/lib/redmine/quote_reply_helper_test.rb b/test/unit/lib/redmine/quote_reply_helper_test.rb index 43adb521b..cbac1f6d0 100644 --- a/test/unit/lib/redmine/quote_reply_helper_test.rb +++ b/test/unit/lib/redmine/quote_reply_helper_test.rb @@ -29,7 +29,7 @@ class QuoteReplyHelperTest < ActionView::TestCase 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 diff --git a/test/unit/setting_test.rb b/test/unit/setting_test.rb index 4ae07cebb..cbfabbb02 100644 --- a/test/unit/setting_test.rb +++ b/test/unit/setting_test.rb @@ -147,4 +147,8 @@ class SettingTest < ActiveSupport::TestCase def test_default_text_formatting_for_new_installations_is_common_mark assert_equal 'common_mark', Setting.text_formatting end + + def test_default_wiki_tablesort_enabled_for_new_installations_is_disabled + assert_equal "0", Setting.wiki_tablesort_enabled + end end |