Class: Decidim::ProfileCell

Inherits:
ViewModel
  • Object
show all
Includes:
ActiveLinkTo, ActiveLinkToHelper, AriaSelectedLinkToHelper, UserProfileHelper, ViewHooksHelper
Defined in:
app/cells/decidim/profile_cell.rb

Direct Known Subclasses

ProfileActionsCell

Constant Summary collapse

TABS_ITEMS =
{
  activity: { icon: "bubble-chart-line", path: :profile_activity_path },
  badges: { icon: "award-line", path: :profile_badges_path },
  following: { icon: "eye-2-line", path: :profile_following_path },
  followers: { icon: "group-line", path: :profile_followers_path }
}.freeze

Instance Method Summary collapse

Methods included from ActiveLinkToHelper

#is_active_link?

Methods included from ViewHooksHelper

#render_hook

Methods included from AriaSelectedLinkToHelper

#aria_selected_link_to

Methods included from UserProfileHelper

#user_profile_tab

Instance Method Details

#profile_holderObject



29
30
31
# File 'app/cells/decidim/profile_cell.rb', line 29

def profile_holder
  model
end

#showObject



22
23
24
25
26
27
# File 'app/cells/decidim/profile_cell.rb', line 22

def show
  return render :invalid if profile_holder.blank?
  return render :inaccessible if profile_holder.blocked? && current_user_logged_in?

  render :show
end