Sha256: 27ef13eef61b377c98126d765d6b7ec2ddfba5cfe32dd6348ee4d55c3b557492

Contents?: true

Size: 631 Bytes

Versions: 4

Compression:

Stored size: 631 Bytes

Contents

# frozen_string_literal: true

module Decidim
  class ProfileSidebarCell < Decidim::ProfileCell
    include Decidim::Messaging::ConversationHelper
    include Decidim::IconHelper
    include Decidim::ViewHooksHelper

    helper_method :profile_user, :logged_in?, :current_user

    delegate :user_signed_in?, to: :controller

    def show
      render :show
    end

    private

    def logged_in?
      current_user.present?
    end

    def profile_user
      @profile_user ||= Decidim::UserPresenter.new(model)
    end

    def can_contact_user?
      !current_user || (current_user && current_user != model)
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
decidim-core-0.14.4 app/cells/decidim/profile_sidebar_cell.rb
decidim-core-0.14.3 app/cells/decidim/profile_sidebar_cell.rb
decidim-core-0.14.2 app/cells/decidim/profile_sidebar_cell.rb
decidim-core-0.14.1 app/cells/decidim/profile_sidebar_cell.rb