Module: AwesomeAdminLayout::Helpers
- Defined in:
- lib/awesome_admin_layout/helpers.rb
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
Instance Method Details
#render_admin_layout(key = nil, &block) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/awesome_admin_layout/helpers.rb', line 9 def render_admin_layout(key = nil, &block) html = <<-HTML <div id="awesome_admin_layout"> #{AwesomeAdminLayout.script.to_html(key)} <main class="awesome_admin_layout-main"> <div class="awesome_admin_layout-navigation-toggle"> <i class="fa fa-bars"></i> </div> #{defined?(::Rails) ? capture(&block) : yield} </main> </div> HTML html = html.html_safe if html.respond_to? :html_safe html end |