Module: Gluttonberg::ApplicationHelper

Includes:
Admin, AssetLibrary, ContentHelpers, DragTree::ActionView::Helpers, Public
Included in:
Gluttonberg::Admin::AssetLibrary::AssetsController
Defined in:
app/helpers/gluttonberg/application_helper.rb

Instance Method Summary collapse

Methods included from DragTree::ActionView::Helpers

#drag_tree_drag_point_class, #drag_tree_row_class, #drag_tree_row_id, #drag_tree_table_class, #drag_tree_url

Methods included from Public

#clean_public_query, #clean_public_query_for_sphinx, #embed_shortcode, #google_analytics_js_tag, #link_to_inappropriate, #render_match_partial, #shortcode_safe

Methods included from Public::Assets

#gallery_ul

Methods included from Public::HtmlTruncate

#html_truncate

Methods included from Public::CmsStylesheets

#cms_managed_stylesheets_link_tag

Methods included from Public::NavTree

#build_page, #children_active?, #find_children, #navigation_tree, #page_url

Methods included from Public::MetaTags

#description_meta_tag, #keywords_meta_tag

Methods included from Public::PageInfo

#body_class, #og_image, #og_site_name, #og_title, #og_type, #page_description, #page_keywords, #page_title

Methods included from ContentHelpers

#content_editor, #enable_redactor, #enable_slug_management_on, #gb_content_for, #gb_image_alt_text, #gb_image_url

Methods included from AssetLibrary

#asset_tag, #asset_tag_v2, #asset_url

Methods included from Admin

#custom_javascript_include_tag, #custom_stylesheet_link_tag, #date_format, #nav_link, #page_and_its_children_options, #page_description_option, #page_description_options, #page_table_rows, #pages_lists_options, #slug_donotmodify_val, #sortable_column, #sorter_link, #sub_nav, #tags_string

Methods included from Gluttonberg::Admin::Versioning

#auto_save, #auto_save_js_tag, #auto_save_version, #previous_version_warning, #version_alerts, #version_dashboard_notifications, #version_dashboard_notifications_data

Methods included from Gluttonberg::Admin::Assets

#_asset_browser_tag, #asset_browser_tag, #asset_panel, #backend_logo, #clear_asset_tag

Methods included from Gluttonberg::Admin::Form

#admin_form_controls_for_approving_or_decling_objects, #admin_form_controls_for_draft_objects, #admin_form_controls_for_published_objects, #contributor_form_controls, #form_controls, #gb_editable_field, #honeypot_field_tag, #publish_message, #submit_and_publish_controls, #version_listing

Methods included from Gluttonberg::Admin::Messages

#gb_error_messages_for, #render_flash_messages

Instance Method Details

#_render(opts) ⇒ Object



27
28
29
# File 'app/helpers/gluttonberg/application_helper.rb', line 27

def _render(opts)
  render(opts)
end

#current_domainObject



23
24
25
# File 'app/helpers/gluttonberg/application_helper.rb', line 23

def current_domain
  "#{request.protocol}#{request.host_with_port}/".strip
end

#current_localization_slugObject



15
16
17
18
19
20
21
# File 'app/helpers/gluttonberg/application_helper.rb', line 15

def current_localization_slug
  if @locale
    @locale.slug
  elsif Gluttonberg::Locale.first_default
    Gluttonberg::Locale.first_default.slug
  end
end

#current_site_config_nameObject



36
37
38
39
40
41
42
43
44
45
46
47
# File 'app/helpers/gluttonberg/application_helper.rb', line 36

def current_site_config_name
  if Rails.configuration.multisite == false
    nil
  else
    config  = Rails.configuration.multisite.find{|key, val| val == request.host_with_port}
    if config.blank?
      nil
    else
      config.first
    end
  end
end

#website_titleObject



31
32
33
34
# File 'app/helpers/gluttonberg/application_helper.rb', line 31

def website_title
  title = Gluttonberg::Setting.get_setting("title", current_site_config_name)
  (title.blank?)? "Gluttonberg" : title.html_safe
end