Sha256: 412a5f6272ae3f7a8b22777a7744d5c6233c9bebca57055510da9b93e275fb79

Contents?: true

Size: 584 Bytes

Versions: 17

Compression:

Stored size: 584 Bytes

Contents

# frozen_string_literal: true

module Decidim
  # This cell renders a notification from a notifications collection

  class NotificationCell < Decidim::ViewModel
    include Decidim::IconHelper
    include Decidim::Core::Engine.routes.url_helpers

    def show
      render :show
    end

    def notification_title
      notification.event_class_instance.notification_title
    rescue StandardError
      I18n.t("decidim.notifications.show.missing_event")
    end

    private

    def notification
      @notification ||= Decidim::NotificationPresenter.new(model)
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
decidim-core-0.27.6 app/cells/decidim/notification_cell.rb
decidim-core-0.26.10 app/cells/decidim/notification_cell.rb
decidim-core-0.26.9 app/cells/decidim/notification_cell.rb
decidim-core-0.27.5 app/cells/decidim/notification_cell.rb
decidim-core-0.26.8 app/cells/decidim/notification_cell.rb
decidim-core-0.27.4 app/cells/decidim/notification_cell.rb
decidim-core-0.27.3 app/cells/decidim/notification_cell.rb
decidim-core-0.26.7 app/cells/decidim/notification_cell.rb
decidim-core-0.26.5 app/cells/decidim/notification_cell.rb
decidim-core-0.27.2 app/cells/decidim/notification_cell.rb
decidim-core-0.27.1 app/cells/decidim/notification_cell.rb
decidim-core-0.26.4 app/cells/decidim/notification_cell.rb
decidim-core-0.27.0 app/cells/decidim/notification_cell.rb
decidim-core-0.26.3 app/cells/decidim/notification_cell.rb
decidim-core-0.27.0.rc2 app/cells/decidim/notification_cell.rb
decidim-core-0.27.0.rc1 app/cells/decidim/notification_cell.rb
decidim-core-0.26.2 app/cells/decidim/notification_cell.rb