Sha256: d62efc6bb8496e61dbf7ae85ff59915e7e899b41561fc0cc9db9b8b4e02adc2d

Contents?: true

Size: 788 Bytes

Versions: 7

Compression:

Stored size: 788 Bytes

Contents

# frozen-string_literal: true

module Decidim
  class ParticipatoryProcessRoleAssignedEvent < Decidim::Events::SimpleEvent
    include Decidim::Events::NotificationEvent
    include Decidim::Events::AuthorEvent

    def notification_title
      I18n.t("notification_title", i18n_options).html_safe
    end

    def i18n_role
      I18n.t(extra["role"], "decidim.admin.models.participatory_process_user_role.roles", default: extra["role"])
    end

    def i18n_options
      {
        resource_path: resource_path,
        resource_title: resource_title,
        resource_url: resource_url,
        scope: event_name,
        participatory_space_title: participatory_space_title,
        participatory_space_url: participatory_space_url,
        role: i18n_role
      }
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
decidim-participatory_processes-0.23.4 app/events/decidim/participatory_process_role_assigned_event.rb
decidim-participatory_processes-0.23.3 app/events/decidim/participatory_process_role_assigned_event.rb
decidim-participatory_processes-0.23.2 app/events/decidim/participatory_process_role_assigned_event.rb
decidim-participatory_processes-0.23.1 app/events/decidim/participatory_process_role_assigned_event.rb
decidim-participatory_processes-0.23.1.rc1 app/events/decidim/participatory_process_role_assigned_event.rb
decidim-participatory_processes-0.23.0 app/events/decidim/participatory_process_role_assigned_event.rb
decidim-participatory_processes-0.22.0 app/events/decidim/participatory_process_role_assigned_event.rb