Sha256: 8116da5e2266e0e283d99007d13a66056692252b6f94204a153e0a620f2fd9b0

Contents?: true

Size: 495 Bytes

Versions: 15

Compression:

Stored size: 495 Bytes

Contents

module ExpressAdmin
  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: 'title') {
        current_arbre_element.add_child title
        if status
          span(class: 'status') { status }
        end
      }
    end

    def title
      config[:title]
    end

    def status
      config[:status]
    end

  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
express_admin-1.6.3 app/components/express_admin/layout_components/pane.rb
express_admin-1.6.2 app/components/express_admin/layout_components/pane.rb
express_admin-1.6.1 app/components/express_admin/layout_components/pane.rb
express_admin-1.6.0 app/components/express_admin/layout_components/pane.rb
express_admin-1.5.0 app/components/express_admin/layout_components/pane.rb
express_admin-1.4.11 app/components/express_admin/layout_components/pane.rb
express_admin-1.4.10 app/components/express_admin/layout_components/pane.rb
express_admin-1.4.9 app/components/express_admin/layout_components/pane.rb
express_admin-1.4.8 app/components/express_admin/layout_components/pane.rb
express_admin-1.4.7 app/components/express_admin/layout_components/pane.rb
express_admin-1.4.6 app/components/express_admin/layout_components/pane.rb
express_admin-1.4.5 app/components/express_admin/layout_components/pane.rb
express_admin-1.4.4 app/components/express_admin/layout_components/pane.rb
express_admin-1.4.3 app/components/express_admin/layout_components/pane.rb
express_admin-1.4.2 app/components/express_admin/layout_components/pane.rb