Module: Spree::Admin::SpreeEssentialsHelper
- Defined in:
- app/helpers/spree/admin/spree_essentials_helper.rb
Instance Method Summary collapse
Instance Method Details
#contents_tab ⇒ Object
7 8 9 10 11 |
# File 'app/helpers/spree/admin/spree_essentials_helper.rb', line 7 def contents_tab content_tag :li, :class => inside_contents_tab? ? 'selected' : nil do link_to I18n.t('spree.admin.shared.contents_tab.content'), extension_routes.first end end |
#inside_contents_tab? ⇒ Boolean
3 4 5 |
# File 'app/helpers/spree/admin/spree_essentials_helper.rb', line 3 def inside_contents_tab? @inside_contents_tab ||= !request.fullpath.scan(Regexp.new(extension_routes.join("|"))).empty? end |
#markdown_helper ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'app/helpers/spree/admin/spree_essentials_helper.rb', line 13 def markdown_helper content_tag('em', :class => 'small markdown-helper') do [ t('essentials.parsed_with'), link_to("Markdown", "http://daringfireball.net/projects/markdown/basics", :onclick => 'window.open(this.href); return false') ].join(" ").html_safe end end |