Sha256: 3c0d76d60f57aa3ba505d95387a02392e48251bf99521467d91c86c226d2ccf2

Contents?: true

Size: 1.75 KB

Versions: 1

Compression:

Stored size: 1.75 KB

Contents

- if tmpl = admin_partial_name(table_builder)
  = render partial: tmpl, locals: local_assigns
- else
  table.table.table-striped.index_table#list
    thead
      tr.pjax_links
        = batch_action_toggle
        th= list_sort_link(:id)
        th.actions_panel
        - table_builder.fields.each do |field|
          th class=('hide_cell' if field.options[:hidden])
            - field_title = field.options[:title] || (field.name.is_a?(Symbol) ? ha(field.name) : field.name)
            - if field.options[:sortable].is_a?(Hash)
              = list_sort_link field.name, field.options[:sortable].merge(title: field_title)
            - elsif field.options[:sortable].is_a?(TrueClass) || (!field.options[:sortable].is_a?(FalseClass) && resource_class.column_names.include?(field.name.to_s))
              = list_sort_link field.name, title: field_title
            - else
              = field_title
    tbody
      - is_edit_link = manager.actions.include?(:edit)
      - collection.each do |item|
        tr id=dom_id(item, 'list') class=(call_method_or_proc_on(item, table_builder.options[:row_class]) if table_builder.options[:row_class])
          = batch_action_item(item)
          td= id_link(item, edit: is_edit_link)
          = item_index_actions_panel(item)
          - table_builder.fields.each do |field|
            td class=(field.options[:cell_class] if field.options[:cell_class])
              - field_content = table_item_field(item, field)
              - if field_content.present? && field.options[:copy_button]
                - field_id = dom_id(item, field.name)
                span> id=field_id = field_content
                .btn.btn-mini> class='js-copy' data-clipboard-target="##{field_id}" = icon('share')
              - else
                = field_content

Version data entries

1 entries across 1 versions & 1 rubygems

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