Sha256: ac4e0dd45a9a51e36fd1ddf93622549a5e5decb5b415ab4d156e627750286990

Contents?: true

Size: 872 Bytes

Versions: 3

Compression:

Stored size: 872 Bytes

Contents

module Layouts
  class Admin < Layouts::Base
    include do
      def head
        csrf_meta_tag
        super
      end

      def body
        div do
          header
          page
        end
      end

      def header
        render :partial => 'layouts/admin/header'
      end

      def stylesheets
        stylesheet_link_tag :admin
      end

      def javascripts
        javascript_include_tag :admin
      end

      def page
        div :id => 'page' do
          main
          sidebar
        end
      end

      def main
        div :id => 'main', :class => 'main' do
          flash
          content
        end
      end

      def content
        div :id => 'content' do
          super
        end
      end

      def sidebar
        div :id => 'sidebar', :class => 'right' do
          block.call :sidebar
        end
      end
     end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
adva-core-0.0.6 app/views/layouts/admin.rb
adva-core-0.0.5 app/views/layouts/admin.rb
adva-core-0.0.4 app/views/layouts/admin.rb