Sha256: cb8a4b55a3af0eff26c4ca737d5f4edbe279077b8e4eeb3f40280da5bff65f7b

Contents?: true

Size: 642 Bytes

Versions: 38

Compression:

Stored size: 642 Bytes

Contents

module ExpressAdmin
  module Components
    module Layout

      class Pane < LayoutComponent

        has_option :title, 'The title of the pane', default: ''
        has_option :status, 'Status of the pane'

        prepends -> {
          heading if title || status
        }

        def heading
          h4(class: 'pane-title') {
            current_arbre_element.add_child title
            if status
              span(class: 'pane-status') { status }
            end
          }
        end

        def title
          config[:title]
        end

        def status
          config[:status]
        end

      end
    end
  end
end

Version data entries

38 entries across 38 versions & 1 rubygems

Version Path
express_admin-2.0.0.b app/components/express_admin/layout_components/pane.rb
express_admin-2.0.0.a app/components/express_admin/layout_components/pane.rb
express_admin-1.8.1 app/components/express_admin/layout_components/pane.rb
express_admin-1.8.0 app/components/express_admin/layout_components/pane.rb
express_admin-1.7.32 app/components/express_admin/layout_components/pane.rb
express_admin-1.7.31 app/components/express_admin/layout_components/pane.rb
express_admin-1.7.30 app/components/express_admin/layout_components/pane.rb
express_admin-1.7.29 app/components/express_admin/layout_components/pane.rb
express_admin-1.7.28 app/components/express_admin/layout_components/pane.rb
express_admin-1.7.27 app/components/express_admin/layout_components/pane.rb
express_admin-1.7.26 app/components/express_admin/layout_components/pane.rb
express_admin-1.7.25 app/components/express_admin/layout_components/pane.rb
express_admin-1.7.24 app/components/express_admin/layout_components/pane.rb
express_admin-1.7.23 app/components/express_admin/layout_components/pane.rb
express_admin-1.7.22 app/components/express_admin/layout_components/pane.rb
express_admin-1.7.21 app/components/express_admin/layout_components/pane.rb
express_admin-1.7.20 app/components/express_admin/layout_components/pane.rb
express_admin-1.7.19 app/components/express_admin/layout_components/pane.rb
express_admin-1.7.18 app/components/express_admin/layout_components/pane.rb
express_admin-1.7.17 app/components/express_admin/layout_components/pane.rb