blob: 5da76a0100a30fa2dddb983f9286ae611baad319 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
# 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
|