debian-mirror-gitlab/lib/sidebars/user_profile/menus/following_menu.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

39 lines
818 B
Ruby
Raw Normal View History

2023-05-27 22:25:52 +05:30
# frozen_string_literal: true
module Sidebars
module UserProfile
module Menus
class FollowingMenu < ::Sidebars::UserProfile::BaseMenu
include Gitlab::Utils::StrongMemoize
override :link
def link
user_following_path(context.container)
end
override :title
def title
s_('UserProfile|Following')
end
override :active_routes
def active_routes
{ path: 'users#following' }
end
override :has_pill?
def has_pill?
context.container.followees.any?
end
strong_memoize_attr :has_pill?
override :pill_count
def pill_count
context.container.followees.count
end
strong_memoize_attr :pill_count
end
end
end
end