Sha256: 9bfd378e40c6337732e63f3107a92ec84bd44933242d791b197af8d7519bb399

Contents?: true

Size: 852 Bytes

Versions: 3

Compression:

Stored size: 852 Bytes

Contents

ruby:
  nested      ||= false
  title       ||= @klass_humanized.pluralize.titleize
  new_button    = !local_assigns[:new_button].eql?(false)
  new_path    ||= "new_#{fae_path}_#{@klass_singular}_path"
  button_text ||= t('fae.common.add', title: title.singularize)
  export_text ||= t('fae.common.csv_export')
  csv         ||= false
  breadcrumb    = !local_assigns[:breadcrumbs].eql?(false)

header.content-header.js-content-header
  - if breadcrumb
    == render 'breadcrumb'
  - else
    h1 = title

  .content-header-buttons
    - if csv && @items.present?
      a.button href="#{@index_path}.csv" = export_text

    - if new_button
      - if nested
        a.add-button.js-add-link.js-index-add-link remote='true' href=self.send(new_path) = button_text
      - else
        a.add-button href=@new_path = button_text

== render 'flash_messages'

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
fae-rails-3.0.0 app/views/fae/shared/_index_header.html.slim
fae-rails-2.2.0 app/views/fae/shared/_index_header.html.slim
fae-rails-2.1.0 app/views/fae/shared/_index_header.html.slim