Sha256: ed28ee3c9ba9181a3b1052ae37393a1826308d146454b82e865e28d085c11c4c

Contents?: true

Size: 1.38 KB

Versions: 11

Compression:

Stored size: 1.38 KB

Contents

ruby:
  colspan = cols.length + 1
  colspan += 1 if ordered
  colspan += 1 if has_thumb
  table_class = ordered ? 'js-sort-row' : nil

  options_for_td = { cols: cols, edit_path: edit_path, edit_column: edit_column }

table class=table_class
  thead
    tr
      - if ordered
        th.th-sortable-handle
      - if has_thumb
        th.-thumb
      - cols.each do |col|
        = th_columns(col)
      - if edit_column
        th.-action data-sorter="false"
      th.-action
  tbody
    - records = index ? @items : parent_item.send(assoc)
    - if records.present?
      - records.each do |item|
        tr id=tr_id(item)
          - if ordered
            td.sortable-handle: i.icon-sort
          - if has_thumb
            td = image_tag(item.asset.thumb.url)
          - cols.each do |col|
            - options_for_td[:col] = col
            - options_for_td[:item] = item
            = td_columns(options_for_td)
          - if edit_column
            td
              a.js-edit-link.js-tooltip.table-action title="Edit" href=self.send(edit_path, item)
                i.icon-edit
          td = fae_delete_button item, "/#{fae_path}/#{assoc_name}/#{item.id.to_s}", class: 'js-tooltip table-action js-delete-link', remote: true

    - else
      tr
        - td_link = link_to 'add some', new_path, class: 'js-add-link'

        td colspan=colspan.to_s No #{title} yet, #{td_link}.

.js-addedit-form-wrapper

Version data entries

11 entries across 11 versions & 2 rubygems

Version Path
fae-railsz-2.1.0 app/views/fae/shared/_shared_nested_table.html.slim
fae-rails-2.0.0 app/views/fae/shared/_shared_nested_table.html.slim
fae-rails-1.7.1 app/views/fae/shared/_shared_nested_table.html.slim
fae-rails-1.7.0 app/views/fae/shared/_shared_nested_table.html.slim
fae-rails-1.6.0 app/views/fae/shared/_shared_nested_table.html.slim
fae-rails-1.5.1 app/views/fae/shared/_shared_nested_table.html.slim
fae-rails-1.5.0 app/views/fae/shared/_shared_nested_table.html.slim
fae-rails-1.4.1 app/views/fae/shared/_shared_nested_table.html.slim
fae-rails-1.4.0 app/views/fae/shared/_shared_nested_table.html.slim
fae-rails-1.3.1 app/views/fae/shared/_shared_nested_table.html.slim
fae-rails-1.3.0 app/views/fae/shared/_shared_nested_table.html.slim