Sha256: d017b3ddc813ff237e716584876d362a2b0be1b4befddd4cbb6fccbef77a55b3

Contents?: true

Size: 1.4 KB

Versions: 1

Compression:

Stored size: 1.4 KB

Contents

- if tmpl = admin_partial_name(table_builder)
  = render tmpl
- else
  table.table.table-striped.index_table#list
    thead
      tr.pjax_links
        = batch_action_toggle
        th= list_sort_link(:id)
        - table_builder.fields.each do |field|
          th
            - if field.options[:sortable] && !field.options[:image]
              - if field.options[:sortable].is_a?(TrueClass)
                = list_sort_link field.name
              - else
                - opts = field.options[:sortable].is_a?(Hash) ? field.options[:sortable] : {column: field.options[:sortable]}
                = list_sort_link field.name, opts
            - else
              = field.name.is_a?(Symbol) ? ha(field.name) : field.name
        th=t 'admin.table.actions'
    tbody
      - is_edit_link = manager.actions.include?(:edit)
      - collection.each do |item|
        tr id=dom_id(item, 'list')
          = batch_action_item(item)
          td= id_link(item, is_edit_link)
          - table_builder.fields.each do |field|
            td
              - if field.options[:editable] && field.data.is_a?(Symbol)
                = admin_editable item, field.data, field.options[:editable]
              - elsif field.options[:image]
                = item_image_link(item, assoc: field.name)
              - else
                = admin_pretty_data call_method_or_proc_on(item, field.data)
          td.actions= item_index_actions(item)

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ab_admin-0.4.0 app/views/admin/manager/_table.html.slim