Sha256: 127b47949e3fee15ecd5051e5e78183bf7fac0dbea92ff9b4561910ce8c67a0f
Contents?: true
Size: 1.26 KB
Versions: 12
Compression:
Stored size: 1.26 KB
Contents
# frozen_string_literal: true module Decidim module Initiatives module AdminLog # This class holds the logic to present a `Decidim::InitiativesType` # for the `AdminLog` log. # # Usage should be automatic and you shouldn't need to call this class # directly, but here's an example: # # action_log = Decidim::ActionLog.last # view_helpers # => this comes from the views # InitiativesTypePresenter.new(action_log, view_helpers).present class InitiativesTypePresenter < Decidim::Log::BasePresenter private def action_string case action when "create", "update", "delete" "decidim.initiatives.admin_log.initiatives_type.#{action}" else super end end def diff_fields_mapping { description: :i18n, title: :i18n, extra_fields_legal_information: :i18n, minimum_committee_members: :integer, document_number_authorization_handler: :i18n, undo_online_signatures_enabled: :boolean, promoting_committee_enabled: :boolean } end def diff_actions super + %w(update) end end end end end
Version data entries
12 entries across 12 versions & 1 rubygems