Sha256: af31cf22f74047e624747dc2537f991a3ce3ce3a797e85dee34de57d1a989d81

Contents?: true

Size: 538 Bytes

Versions: 5

Compression:

Stored size: 538 Bytes

Contents

module Qor
  module Layout
    module LayoutHelper
      def render_layout(name)
        html = Qor::Layout::Layout.detect_layout(name, self).try(:render, session[:layout_editing]).to_s

        if session[:layout_editing]
          html += <<-STRING
          <script class='qor_layout_script'>
            $(document).ready(function() {
              qlayout = qLayout.init($('script.qor_layout_script').parent()[0]);
            });
          </script>
          STRING
        end

        html.html_safe
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
qor_layout-0.0.5 app/helpers/qor/layout/layout_helper.rb
qor_layout-0.0.4 app/helpers/qor/layout/layout_helper.rb
qor_layout-0.0.3 app/helpers/qor/layout/layout_helper.rb
qor_layout-0.0.2 app/helpers/qor/layout/layout_helper.rb
qor_layout-0.0.1 app/helpers/qor/layout/layout_helper.rb