Sha256: 298049d807cf4dfa3e0dd10cfafb2ba5fdc50cc32f91b7ef5414dea9f358dc81

Contents?: true

Size: 718 Bytes

Versions: 62

Compression:

Stored size: 718 Bytes

Contents

module ActiveAdmin
  module Views
    module Pages

      # Acts as a standard rails Layout for use when logged
      # out or when rendering custom actions.
      class Layout < Base

        def title
          assigns[:page_title] || I18n.t("active_admin.#{params[:action]}", :default => params[:action].to_s.titleize)
        end

        # Render the content_for(:layout) into the main content area
        def main_content
          content_for_layout = content_for(:layout)
          if content_for_layout.is_a?(Arbre::Element)
            current_arbre_element.add_child content_for_layout.children
          else
            text_node content_for_layout
          end
        end
      end

    end
  end
end

Version data entries

62 entries across 62 versions & 4 rubygems

Version Path
activeadmin-0.6.6 lib/active_admin/views/pages/layout.rb
activeadmin-0.6.5 lib/active_admin/views/pages/layout.rb
activeadmin-0.6.4 lib/active_admin/views/pages/layout.rb
yousty-activeadmin-1.0.4.pre lib/active_admin/views/pages/layout.rb
yousty-activeadmin-1.0.3.pre lib/active_admin/views/pages/layout.rb
yousty-activeadmin-1.0.2.pre lib/active_admin/views/pages/layout.rb
activeadmin-0.6.3 lib/active_admin/views/pages/layout.rb
yousty-activeadmin-1.0.1.pre lib/active_admin/views/pages/layout.rb
yousty-activeadmin-1.0.0.pre lib/active_admin/views/pages/layout.rb
activeadmin-0.6.2 lib/active_admin/views/pages/layout.rb
activeadmin-0.6.1 lib/active_admin/views/pages/layout.rb
aa-rails4-0.6.0 lib/active_admin/views/pages/layout.rb
lalala-4.0.0.dev.141 vendor/deps/active_admin/lib/active_admin/views/pages/layout.rb
lalala-4.0.0.dev.136 vendor/deps/active_admin/lib/active_admin/views/pages/layout.rb
lalala-4.0.0.dev.135 vendor/deps/active_admin/lib/active_admin/views/pages/layout.rb
lalala-4.0.0.dev.134 vendor/deps/active_admin/lib/active_admin/views/pages/layout.rb
lalala-4.0.0.dev.133 vendor/deps/active_admin/lib/active_admin/views/pages/layout.rb
lalala-4.0.0.dev.132 vendor/deps/active_admin/lib/active_admin/views/pages/layout.rb
lalala-4.0.0.dev.131 vendor/deps/active_admin/lib/active_admin/views/pages/layout.rb
lalala-4.0.0.dev.129 vendor/deps/active_admin/lib/active_admin/views/pages/layout.rb