Module: Tramway::Admin::ApplicationHelper

Includes:
AuthManagment, FontAwesome::Rails::IconHelper, AdditionalButtonsBuilder, RecordsHelper, RussianCasesHelper, SingletonHelper
Defined in:
app/helpers/tramway/admin/application_helper.rb

Instance Method Summary collapse

Methods included from SingletonHelper

#current_model_singleton_path, #edit_current_model_singleton_path

Methods included from RecordsHelper

#active_tab, #admin_index_path_of_model, #current_model_record_path, #current_model_records_path, #decorator_class, #edit_current_model_record_path, #get_collection, #model_class, #new_current_model_record_path, #search_tab_title, #searchable_model?, #tab_title, #to_path

Methods included from RussianCasesHelper

#case_word, #dative, #genitive, #instrumental, #plural

Methods included from AdditionalButtonsBuilder

#build_buttons

Instance Method Details

#customized_admin_navbarObject



28
29
30
# File 'app/helpers/tramway/admin/application_helper.rb', line 28

def customized_admin_navbar
  ::Tramway::Admin.customized_admin_navbar
end

#customized_admin_navbar_given?Boolean

Returns:

  • (Boolean)


24
25
26
# File 'app/helpers/tramway/admin/application_helper.rb', line 24

def customized_admin_navbar_given?
  customized_admin_navbar.present?
end

#default_titleObject



16
17
18
# File 'app/helpers/tramway/admin/application_helper.rb', line 16

def default_title
  t('.title')
end

#page_title(action, model_name) ⇒ Object



20
21
22
# File 'app/helpers/tramway/admin/application_helper.rb', line 20

def page_title(action, model_name)
  t("helpers.actions.#{action}") + ' ' + genitive(model_name)
end

#title(page_title = default_title) ⇒ Object



11
12
13
14
# File 'app/helpers/tramway/admin/application_helper.rb', line 11

def title(page_title = default_title)
  title_text = "#{page_title} | #{t('application.name')}"
  content_for(:title) { title_text }
end