2024-07-15 14:31:54 +02:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
2024-07-15 02:19:27 +02:00
|
|
|
class ApplicationController < ActionController::Base
|
2024-07-15 14:31:54 +02:00
|
|
|
before_action :initialize_navbar
|
|
|
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
|
|
def initialize_navbar
|
2024-07-16 20:22:59 +02:00
|
|
|
@nav_path = controller_name
|
2024-07-15 14:31:54 +02:00
|
|
|
@navbar_items = [
|
2024-07-16 20:22:59 +02:00
|
|
|
{ label: 'Dashboard', icon: :speedometer2, path: :root },
|
|
|
|
|
{ label: Report.model_name.human(count: 2), icon: :'journal-text', path: :reports },
|
|
|
|
|
{ label: Checklist.model_name.human(count: 2), icon: :'list-check', path: :checklists },
|
|
|
|
|
{ label: Check.model_name.human(count: 2), icon: :check, path: :checks }
|
2024-07-15 14:31:54 +02:00
|
|
|
]
|
|
|
|
|
@search_url = nil # root_url
|
|
|
|
|
end
|
2024-07-15 02:19:27 +02:00
|
|
|
end
|