Sha256: fe9670ac46827df333a2f737ab8b04d6f9df98463af0e329606bd77b081c43de
Contents?: true
Size: 1.4 KB
Versions: 22
Compression:
Stored size: 1.4 KB
Contents
-#= page_title :index, <%= class_name %> %table.with-selection %thead %tr <% for attribute in attributes -%> %th= <%= class_name %>.human_attribute_name(:<%= attribute.name %>) <% end -%> %th.actions %tbody - @<%= plural_table_name %>.each do |<%= singular_table_name %>| %tr{data: {record: {id: <%= singular_table_name %>.id}.to_json}} <% for attribute in attributes[0...1] -%> %td= link_to <%= singular_table_name %>.<%= attribute.name %>, <%= singular_table_name %> <% end -%> <% for attribute in attributes[1..-1] -%> %td= <%= singular_table_name %>.<%= attribute.name %> <% end -%> %td.actions = link_to content_tag(:span, '', class: 'icon'), <%= singular_table_name %>, class: 'table-new-button' = link_to content_tag(:span, '', class: 'icon'), edit_<%= singular_table_name %>_path(<%= singular_table_name %>), class: 'table-edit-button' = link_to content_tag(:span, '', class: 'icon'), <%= singular_table_name %>, method: :delete, class: 'table-destroy-button', data: { confirm: 'Are you sure?' } .page-links %button.actions-button onclick="window.location = $(this).data('url') + '?' + $.param({ids: MultiSelect.selected_ids()})" data-url=collection_edit_<%= plural_table_name %>_path Actions = link_to t('action.new.link', model: <%= class_name %>.model_name.human), new_<%= singular_table_name %>_path, class: 'record-new-button'
Version data entries
22 entries across 22 versions & 1 rubygems