Skip to content

Commit

Permalink
use svg icons with redmine 6
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandermeindl committed Nov 13, 2024
1 parent 770b1d2 commit 62abe54
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 13 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,9 @@ jobs:

strategy:
matrix:
ruby: ['3.0', '3.1', '3.2']
redmine: ['5.0-stable', '5.1-stable', 'master']
ruby: ['3.1', '3.2', '3.3']
redmine: ['6.0-stable', 'master']
db: ['postgres', 'mysql']
exclude:
- ruby: '3.2'
redmine: 5.0-stable
fail-fast: false

services:
Expand Down
4 changes: 2 additions & 2 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ require:
- rubocop-minitest

AllCops:
TargetRubyVersion: 2.7
TargetRailsVersion: 6.1
TargetRubyVersion: 3.1
TargetRailsVersion: 7.2
NewCops: enable

Rails:
Expand Down
9 changes: 5 additions & 4 deletions app/helpers/privacy_terms_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def privacy_terms_inspect_results
id: 'public_projects',
value: public_projects,
result: inspect_bool_result(public_projects.zero?,
down_icon: 'fas_info',
down_icon: 'details',
down_class: 'summary') }

rc
Expand All @@ -63,13 +63,14 @@ def privacy_terms_inspect_results
private

def inspect_bool_result(value, down_icon: nil, down_class: nil)
down_icon ||= 'far_thumbs-down'
down_icon ||= 'thumb-down'
down_class ||= 'additionals-number-negative inspect-problem'

if value
font_awesome_icon 'far_thumbs-up', class: 'additionals-number-positive inspect-good'
# font_awesome_icon 'far_thumbs-up', class: 'additionals-number-positive inspect-good'
svg_icon_tag 'thumb-up', css_class: 'additionals-number-positive inspect-good'
else
font_awesome_icon down_icon, class: down_class
svg_icon_tag down_icon, css_class: down_class
end
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ table
- else
td = result[:name]
td = result[:value]
td = result[:result]
td.a-icon = result[:result]
= call_hook :view_privacy_terms_inspect
3 changes: 2 additions & 1 deletion init.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@
version RedminePrivacyTerms::VERSION
author 'AlphaNodes GmbH'
author_url 'https://alphanodes.com/'
requires_redmine version_or_higher: '6.0'

begin
requires_redmine_plugin :additionals, version_or_higher: '3.2.0'
requires_redmine_plugin :additionals, version_or_higher: '4.0.0'
rescue Redmine::PluginNotFound
raise 'Please install additionals plugin (https://github.com/alphanodes/additionals)'
end
Expand Down

0 comments on commit 62abe54

Please sign in to comment.