Sha256: 6a3b0de14c3da728c7da2dc072f18ed493feabedb6776f94cfbbc0fe27fdf615
Contents?: true
Size: 673 Bytes
Versions: 58
Compression:
Stored size: 673 Bytes
Contents
# frozen_string_literal: true module Decidim # This cell is intended to be used on user profiles. # Lists the invitations to user groups the given user has. class UserGroupPendingInvitationsListCell < Decidim::ViewModel include Decidim::CellsPaginateHelper include Decidim::ApplicationHelper include Decidim::Core::Engine.routes.url_helpers include Decidim::CardHelper def show return if invitations.empty? return unless own_profile? render :show end def invitations @invitations ||= Decidim::UserGroups::InvitedMemberships.for(model) end def own_profile? current_user == model end end end
Version data entries
58 entries across 58 versions & 1 rubygems