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

#body_class, #clean_public_query, #clean_public_query_for_sphinx, #db_stylesheet_link_tag, #description_meta_tag, #google_analytics_js_tag, #html_truncate, #keywords_meta_tag, #link_to_inappropriate, #navigation_tree, #page_description, #page_fb_icon_path, #page_keywords, #page_title, #page_url, #render_match_partial

Methods included from ContentHelpers

#content_editor, #enable_jwysiwyg_on_class, #enable_slug_management_on, #gb_content_for, #gb_image_alt_text, #gb_image_url, #render_content_for, #render_html_content, #render_image_content, #render_plain_text_content

Methods included from AssetLibrary

#_asset_browser_tag, #add_image_to_gallery_tag, #asset_browser_tag, #asset_panel, #asset_tag, #asset_tag_v2, #asset_url, #clear_asset_tag, #gallery_images_ul, #sorter_link

Methods included from Admin

#admin_form, #back_link, #backend_logo, #block, #contextual_help, #current_domain, #custom_javascript_include_tag, #custom_stylesheet_link_tag, #date_format, #form_controls, #gb_editable_field, #gb_error_messages_for, #get_localized_value, #honeypot_field_tag, #localization_field, #localization_picker, #localized_field_opts, #localized_text_area, #localized_text_field, #main_nav_entry, #nav_link, #page_localization_picker, #page_table_rows, #publisable_dropdown, #publish_message, #publishable_form_controls, #render_flash_messages, #slug_donotmodify_val, #sortable_column, #sub_nav, #tab, #tab_bar, #tags_string, #version_listing, #website_title, #wysiwyg_js_css_link_tag

Instance Method Details

#current_localization_slugObject



11
12
13
14
15
16
17
# File 'app/helpers/gluttonberg/application_helper.rb', line 11

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

#localized_text(english, chineese) ⇒ Object



19
20
21
# File 'app/helpers/gluttonberg/application_helper.rb', line 19

def localized_text(english , chineese)
  (current_localization_slug == "cn" ? chineese : english )
end