Sha256: 39265067cc3f4f5a67e651ba0f52122245fb256c22409b346b501499dac170ab
Contents?: true
Size: 1.46 KB
Versions: 2
Compression:
Stored size: 1.46 KB
Contents
# frozen_string_literal: true module Decidim class VersionCell < Decidim::ViewModel include Decidim::TraceabilityHelper include Decidim::SanitizeHelper def resource_title decidim_html_escape(translated_attribute(versioned_resource.title)) end def current_version model end def versioned_resource options[:versioned_resource] end def versions_path options[:versions_path].call end def i18n_changes_title i18n("changes_at_title", title: resource_title) end def i18n_version_number i18n("version_number") end def i18n_back_to_resource i18n("back_to_resource") end def i18n_version_number_out_of_total i18n("version_number_out_of_total", current_version: index, total_count: versioned_resource.versions.count) end def i18n_show_all_versions i18n("show_all_versions") end def i18n_version_author i18n("version_author") end def i18n_version_created_at i18n("version_created_at") end def i18n(string, **params) decidim_html_escape(t(string, **params, scope: i18n_scope, default: t(string, **params, scope: default_i18n_scope))) end def i18n_scope options[:i18n_scope] end def default_i18n_scope "decidim.version.show" end def index options[:index] end def resource_path Decidim::ResourceLocatorPresenter.new(versioned_resource).path end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
decidim-core-0.27.9 | app/cells/decidim/version_cell.rb |
decidim-core-0.27.8 | app/cells/decidim/version_cell.rb |