%h1.m-b-3
  = @resource.model_name.human.pluralize
%table.table.m-b-3.table-striped
  %thead
    %tr
      - @attributes_for_index.each do |attribute|
        %th{ :class => ('text-md-center' if attribute.center?) }
          = @resource.human_attribute_name(attribute.name)
      %th
  %tbody
    - @entries.each do |entry|
      %tr
        - @attributes_for_index.each do |attribute|
          %td{ :class => ('text-md-center' if attribute.center?) }
            = render attribute.index_partial_path, entry: entry, attribute: attribute, value: entry[attribute.key]
        %td.text-nowrap.text-md-right
          = link_to 'Edit', edit_polymorphic_path(entry),
            class: 'label label-primary'
          = link_to 'Delete', polymorphic_path(entry),
            class: 'label label-danger', method: :delete, data: { confirm: 'Are you sure?' }
= paginate @entries, views_prefix: 'cms'
= link_to "New #{ @resource.model_name.human }",
  new_polymorphic_path(@resource), class: 'btn btn-primary'

%h1.m-b-3
  = @resource.model_name.human.pluralize
%table.table.m-b-3.table-striped
  %thead
    %tr
      - @attributes_for_index.each do |attribute|
        %th{ :class => ('text-md-center' if attribute.center?) }
          = @resource.human_attribute_name(attribute.name)
      %th
  %tbody
    - @entries.each do |entry|
      %tr
        - @attributes_for_index.each do |attribute|
          %td{ :class => ('text-md-center' if attribute.center?) }
            = render attribute.index_partial_path, entry: entry, attribute: attribute, value: entry[attribute.key]
        %td.text-nowrap.text-md-right
          = link_to 'Edit', edit_polymorphic_path(entry),
            class: 'label label-primary'
          = link_to 'Delete', polymorphic_path(entry),
            class: 'label label-danger', method: :delete, data: { confirm: 'Are you sure?' }
    - if @entries.empty?
      %tr
        %td.text-md-center.text-muted{ :colspan => @attributes_for_index.size + 1 }
          No data available
= paginate @entries, views_prefix: 'cms'
= link_to "New #{ @resource.model_name.human }",
  new_polymorphic_path(@resource), class: 'btn btn-primary'

Add message if no entries
Add message if no entries
