Sha256: 55cc3367760369ba09464b30e0f5cbd943ec703eb3acd0404df70a217f764e96

Contents?: true

Size: 1.14 KB

Versions: 3

Compression:

Stored size: 1.14 KB

Contents

<% table_class = @has_position ? 'js-sort-row' : 'js-sort-column' -%>
<% num_columns = 3 -%>
== render 'fae/shared/index_header', title: @klass_humanized.pluralize.titleize

main.content
  table.<%= table_class %>
    thead
      tr
<% if @has_position -%>
        th.th-sortable-handle
<% num_columns += 1 -%>
<% end -%>
        th <%= @display_field.present? ? @display_field.titleize : 'Name' %>
        th.-action-wide Modified
<% @toggle_attrs.each do |attr| -%>
        th.-action-wide data-sorter="false" <%= attr.humanize %>
<% num_columns += 1 -%>
<% end -%>
        th.-action data-sorter="false"

    tbody
      - if @items.present?
        - @items.each do |item|
          tr id=fae_sort_id(item)
<% if @has_position -%>
            td.sortable-handle: i.icon-sort
<% end -%>
            td = link_to item.fae_display_field, edit_<%= options.namespace %>_<%= class_name.underscore %>_path(item)
            td = fae_date_format item.updated_at
<% @toggle_attrs.each do |attr| -%>
            td = fae_toggle item, :<%= attr %>
<% end -%>
            td = fae_delete_button item
      - else
        tr: td colspan="<%= num_columns %>" No items found

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
fae-rails-1.4.1 lib/generators/fae/templates/views/index.html.slim
fae-rails-1.4.0 lib/generators/fae/templates/views/index.html.slim
fae-rails-1.3.1 lib/generators/fae/templates/views/index.html.slim