Sha256: 4ba9fbc69e285ea2e563fbf3ebb18d5cd13c8091f5d6c493f65bc6658a83ea54

Contents?: true

Size: 795 Bytes

Versions: 27

Compression:

Stored size: 795 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"], scope: "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

27 entries across 27 versions & 1 rubygems

Version Path
decidim-participatory_processes-0.26.10 app/events/decidim/participatory_process_role_assigned_event.rb
decidim-participatory_processes-0.26.9 app/events/decidim/participatory_process_role_assigned_event.rb
decidim-participatory_processes-0.26.8 app/events/decidim/participatory_process_role_assigned_event.rb
decidim-participatory_processes-0.26.7 app/events/decidim/participatory_process_role_assigned_event.rb
decidim-participatory_processes-0.26.5 app/events/decidim/participatory_process_role_assigned_event.rb
decidim-participatory_processes-0.26.4 app/events/decidim/participatory_process_role_assigned_event.rb
decidim-participatory_processes-0.26.3 app/events/decidim/participatory_process_role_assigned_event.rb
decidim-participatory_processes-0.26.2 app/events/decidim/participatory_process_role_assigned_event.rb
decidim-participatory_processes-0.26.1 app/events/decidim/participatory_process_role_assigned_event.rb
decidim-participatory_processes-0.26.0 app/events/decidim/participatory_process_role_assigned_event.rb
decidim-participatory_processes-0.26.0.rc2 app/events/decidim/participatory_process_role_assigned_event.rb
decidim-participatory_processes-0.26.0.rc1 app/events/decidim/participatory_process_role_assigned_event.rb
decidim-participatory_processes-0.25.2 app/events/decidim/participatory_process_role_assigned_event.rb
decidim-participatory_processes-0.25.1 app/events/decidim/participatory_process_role_assigned_event.rb
decidim-participatory_processes-0.25.0 app/events/decidim/participatory_process_role_assigned_event.rb
decidim-participatory_processes-0.25.0.rc4 app/events/decidim/participatory_process_role_assigned_event.rb
decidim-participatory_processes-0.25.0.rc3 app/events/decidim/participatory_process_role_assigned_event.rb
decidim-participatory_processes-0.25.0.rc2 app/events/decidim/participatory_process_role_assigned_event.rb
decidim-participatory_processes-0.25.0.rc1 app/events/decidim/participatory_process_role_assigned_event.rb
decidim-participatory_processes-0.24.3 app/events/decidim/participatory_process_role_assigned_event.rb