Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Update content_tag to use consistent parameters

Mir Bhatiaf1dc9c6b7ce6
diff --git a/lib/open_project/journal_formatter/active_status.rb b/lib/open_project/journal_formatter/active_status.rb
index 9483e97b0e5..6da3ed6f44c 100644
--- a/lib/open_project/journal_formatter/active_status.rb
+++ b/lib/open_project/journal_formatter/active_status.rb
@@ -29,7 +29,7 @@
class OpenProject::JournalFormatter::ActiveStatus < JournalFormatter::Base
def render(_key, values, options = { html: true })
label_text = label('project')
- label_text = content_tag('strong', label_text) if options[:html]
+ label_text = content_tag(:strong, label_text) if options[:html]
value = \
if values.last
@@ -37,7 +37,7 @@ class OpenProject::JournalFormatter::ActiveStatus < JournalFormatter::Base
else
I18n.t('activerecord.attributes.project.active_value.false')
end
- value = content_tag('strong', value) if options[:html]
+ value = content_tag(:strong, value) if options[:html]
I18n.t(:text_journal_label_value, label: label_text, value:)
end
diff --git a/lib/open_project/journal_formatter/schedule_manually.rb b/lib/open_project/journal_formatter/schedule_manually.rb
index f2b75d261a4..91c353b5c30 100644
--- a/lib/open_project/journal_formatter/schedule_manually.rb
+++ b/lib/open_project/journal_formatter/schedule_manually.rb
@@ -28,7 +28,7 @@
class OpenProject::JournalFormatter::ScheduleManually < JournalFormatter::Base
def render(key, values, options = { html: true })
- label_text = options[:html] ? content_tag('strong', label(key)) : label(key)
+ label_text = options[:html] ? content_tag(:strong, label(key)) : label(key)
activated_text = values.last ? I18n.t('scheduling.activated') : I18n.t('scheduling.deactivated')
I18n.t(:text_journal_label_value, label: label_text, value: activated_text)
diff --git a/lib/open_project/journal_formatter/template.rb b/lib/open_project/journal_formatter/template.rb
index f5cc51fa95d..f49f7462985 100644
--- a/lib/open_project/journal_formatter/template.rb
+++ b/lib/open_project/journal_formatter/template.rb
@@ -29,7 +29,7 @@
class OpenProject::JournalFormatter::Template < JournalFormatter::Base
def render(_key, values, options = { html: true })
label_text = label('project')
- label_text = content_tag('strong', label_text) if options[:html]
+ label_text = content_tag(:strong, label_text) if options[:html]
value = \
if values.last
diff --git a/lib/open_project/journal_formatter/visibility.rb b/lib/open_project/journal_formatter/visibility.rb
index 967efc2a9e1..772a7ead764 100644
--- a/lib/open_project/journal_formatter/visibility.rb
+++ b/lib/open_project/journal_formatter/visibility.rb
@@ -29,7 +29,7 @@
class OpenProject::JournalFormatter::Visibility < JournalFormatter::Base
def render(_key, values, options = { html: true })
label_text = I18n.t('activerecord.attributes.project.public_value.title')
- label_text = content_tag('strong', label_text) if options[:html]
+ label_text = content_tag(:strong, label_text) if options[:html]
value = \
if values.last
diff --git a/lib_static/plugins/acts_as_journalized/lib/journal_formatter/base.rb b/lib_static/plugins/acts_as_journalized/lib/journal_formatter/base.rb
index 75251da3bcc..0aba3d8c9bf 100644
--- a/lib_static/plugins/acts_as_journalized/lib/journal_formatter/base.rb
+++ b/lib_static/plugins/acts_as_journalized/lib/journal_formatter/base.rb
@@ -66,7 +66,7 @@ module JournalFormatter
end
def format_html_details(label, old_value, value)
- label = content_tag('strong', label)
+ label = content_tag(:strong, label)
old_value = content_tag('i', h(old_value)) if old_value.present?
old_value = content_tag('strike', old_value) if old_value and value.blank?
value = content_tag('i', h(value)) if value.present?