Module: Interage::ApplicationHelper
- Includes:
- ApplicationIconHelper, BootstrapHelper, CEPHelper, CNPJHelper, CPFHelper, CocoonHelper, ControllerActiveHelper, DateTimeHelper, FaviconHelper, FlashMessageHelper, FontAwesomeHelper, GravatarHelper, LinkToHelper, MaterialDesignIconsHelper, NumberHelper, PaginationHelper, PhoneHelper, TextHelper, TranslationHelper, VersionHelper
- Included in:
- ApplicationHelper
- Defined in:
- lib/interage/application_helper.rb
Constant Summary
Constants included from LinkToHelper
LinkToHelper::ASIDE_DEFAULT_CLASS, LinkToHelper::DESTROY_CONFIRM_MESSAGE, LinkToHelper::PREFIX_BUTTON_CLASS
Constants included from GravatarHelper
Constants included from FaviconHelper
FaviconHelper::EXTENTION, FaviconHelper::FAVICON_SIZES, FaviconHelper::FILE_NAME
Constants included from ControllerActiveHelper
ControllerActiveHelper::HTML_ACTIVE_CLASS, ControllerActiveHelper::HTML_SHOW_CLASS
Constants included from CocoonHelper
CocoonHelper::DEFAULT_BTN_CLASS
Constants included from ApplicationIconHelper
Interage::ApplicationIconHelper::ALLOWED_FONT_ICONS, Interage::ApplicationIconHelper::DEFAULT_FONT_ICON
Instance Method Summary collapse
- #admin_page_title ⇒ Object
- #app_name ⇒ Object
- #app_page_title(area = '') ⇒ Object
- #devise_page_title ⇒ Object
- #env_name ⇒ Object
- #env_name_upcase ⇒ Object
- #format_seconds(seconds) ⇒ Object
- #page_title ⇒ Object
- #rails_app_name ⇒ Object
Methods included from VersionHelper
#app_text_version, #app_version, #file_version_exist?
Methods included from TranslationHelper
#translate_boolean, #translate_boolean_in_check_box_icon, #translate_boolean_in_icon, #translate_model_attribute, #translate_model_name, #translate_model_name_pluralized
Methods included from TextHelper
Methods included from PhoneHelper
Methods included from PaginationHelper
Methods included from NumberHelper
#default_currency_format, #only_numbers
Methods included from MaterialDesignIconsHelper
#md_classes, #md_icon, #md_icon_text
Methods included from LinkToHelper
#aside_link_to, #button_class, #destroy_confirm_message, #link_to_back, #link_to_default, #link_to_destroy, #link_to_edit, #link_to_modal, #link_to_new, #link_to_show
Methods included from GravatarHelper
Methods included from FontAwesomeHelper
#fa_classes, #fa_fw_icon, #fa_icon, #fa_icon_text, #fa_icons
Methods included from FlashMessageHelper
#flash_messages, #flashes, #handle_type
Methods included from FaviconHelper
#favicon_link_tags, #favicon_options, #favicon_size_link_tags, #handler_name, #handler_size
Methods included from DateTimeHelper
#business_day?, #business_days_from_now, #format_date, #format_time
Methods included from CPFHelper
Methods included from ControllerActiveHelper
#current_controller?, #menu_active, #menu_class_show
Methods included from CocoonHelper
#cocoon_default_btn_class, #cocoon_link_to_add_association, #cocoon_link_to_remove_association
Methods included from CNPJHelper
Methods included from CEPHelper
Methods included from BootstrapHelper
#bootstrap_alert, #bootstrap_alert_danger, #bootstrap_alert_default, #bootstrap_alert_info, #bootstrap_alert_not_found, #bootstrap_alert_not_found_female, #bootstrap_alert_not_found_male, #bootstrap_alert_success, #bootstrap_alert_warning, #text_not_found, #text_not_found_female, #text_not_found_male
Methods included from ApplicationIconHelper
#app_icon, #app_icon_classes, #app_icon_text, #execute_method
Instance Method Details
#admin_page_title ⇒ Object
34 35 36 |
# File 'lib/interage/application_helper.rb', line 34 def admin_page_title app_page_title(ENV['PREFIX_ADMIN_PAGE_TITLE']) end |
#app_name ⇒ Object
46 47 48 |
# File 'lib/interage/application_helper.rb', line 46 def app_name ENV.fetch('APP_NAME', t('application.name', default: rails_app_name)) end |
#app_page_title(area = '') ⇒ Object
30 31 32 |
# File 'lib/interage/application_helper.rb', line 30 def app_page_title(area = '') "#{env_name_upcase}#{page_title}#{area}#{app_name}" end |
#devise_page_title ⇒ Object
38 39 40 |
# File 'lib/interage/application_helper.rb', line 38 def devise_page_title app_page_title(ENV['PREFIX_DEVISE_PAGE_TITLE']) end |
#env_name ⇒ Object
60 61 62 |
# File 'lib/interage/application_helper.rb', line 60 def env_name ENV['ENV_NAME'] end |
#env_name_upcase ⇒ Object
56 57 58 |
# File 'lib/interage/application_helper.rb', line 56 def env_name_upcase "[#{env_name.upcase}] " if env_name.present? end |
#format_seconds(seconds) ⇒ Object
26 27 28 |
# File 'lib/interage/application_helper.rb', line 26 def format_seconds(seconds) t('time.seconds.short', count: seconds) end |
#page_title ⇒ Object
42 43 44 |
# File 'lib/interage/application_helper.rb', line 42 def page_title content_for?(:page_title) ? "#{content_for(:page_title)} » " : '' end |
#rails_app_name ⇒ Object
50 51 52 53 54 |
# File 'lib/interage/application_helper.rb', line 50 def rails_app_name rails_class = Rails.application.class rails_class.try(:module_parent_name) || rails_class.parent_name end |