Class: Avo::SidebarComponent
- Inherits:
-
BaseComponent
- Object
- BaseComponent
- Avo::SidebarComponent
show all
- Includes:
- Concerns::PrivateAccess
- Defined in:
- app/components/avo/sidebar_component.rb
Instance Method Summary
collapse
#authenticate_developer_or_admin!, #can_access_private_status?
Instance Method Details
33
34
35
|
# File 'app/components/avo/sidebar_component.rb', line 33
def
Avo::Sidebar::CustomSidebarComponent.new
end
|
#dashboards ⇒ Object
9
10
11
12
13
|
# File 'app/components/avo/sidebar_component.rb', line 9
def dashboards
return [] unless Avo.plugin_manager.installed?("avo-dashboards")
Avo::Dashboards.dashboard_manager.dashboards_for_navigation
end
|
#pages ⇒ Object
23
24
25
26
27
|
# File 'app/components/avo/sidebar_component.rb', line 23
def pages
return [] unless Avo.plugin_manager.installed?("avo-forms")
Avo::Forms::Core::Page.descendants.uniq(&:name).select(&:main_page?)
end
|
37
38
39
40
41
|
# File 'app/components/avo/sidebar_component.rb', line 37
def
return false unless Avo.plugin_manager.installed?("avo-menu")
.render?
end
|
#resources ⇒ Object
15
16
17
|
# File 'app/components/avo/sidebar_component.rb', line 15
def resources
Avo.resource_manager.resources_for_navigation helpers._current_user
end
|
#stimulus_target ⇒ Object
29
30
31
|
# File 'app/components/avo/sidebar_component.rb', line 29
def stimulus_target
@for_mobile ? "mobileSidebar" : "sidebar"
end
|
19
20
21
|
# File 'app/components/avo/sidebar_component.rb', line 19
def tools
Avo.tool_manager.tools_for_navigation
end
|