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

WIP: Update active status journal formatter

Mir Bhatia6d5989e3659f
diff --git a/lib/open_project/journal_formatter/active_status.rb b/lib/open_project/journal_formatter/active_status.rb
index 20fa3397bff..1f09fdd0d19 100644
--- a/lib/open_project/journal_formatter/active_status.rb
+++ b/lib/open_project/journal_formatter/active_status.rb
@@ -27,19 +27,10 @@
#++
class OpenProject::JournalFormatter::ActiveStatus < JournalFormatter::Base
- def format_details(_key, values, _options = {})
- result = if values.last
- "active"
- else
- "archived"
- end
+ def render(key, values, options = { no_html: false })
+ label_text = options[:no_html] ? "Project" : content_tag('strong', "Project")
+ activated_text = values.last ? "unarchived" : "archived"
- [label, nil, result]
- end
-
- private
-
- def label
- "Active status"
+ I18n.t(:text_journal_label_value, label: label_text, value: activated_text)
end
end