Class: Course::GroupsComponent

Inherits:
SimpleDelegator
  • Object
show all
Includes:
ControllerComponentHost::Component
Defined in:
app/controllers/components/course/groups_component.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.display_nameObject


5
6
7
# File 'app/controllers/components/course/groups_component.rb', line 5

def self.display_name
  I18n.t('components.groups.name')
end

Instance Method Details


9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'app/controllers/components/course/groups_component.rb', line 9

def sidebar_items
  return [] unless show_group_sidebar_item?

  [
    {
      key: :groups,
      icon: 'share-alt',
      title: I18n.t('course.groups.sidebar_title'),
      type: :admin,
      weight: 7,
      path: course_groups_path(current_course)
    }
  ]
end