Sha256: b8363c4f89ffb6246141a83190f5520b8498706c48da289a045f35bda3ff70f7
Contents?: true
Size: 821 Bytes
Versions: 1
Compression:
Stored size: 821 Bytes
Contents
<% # Requires resources model_class columns cnt = 0 %> <table class="rows-list"> <tr> <% columns.each do |column| %> <th> <%= t("header.#{column}", :default => column) %> </th> <% end %> </tr> <% resources.each do |resource| url = "/#{controller_name}/#{resource.id}" cnt += 1 %> <tr id="row_<%= resource.id%>" class="<%= %w{odd even}.at(cnt % 2) %>" > <% columns.each do |column| %> <td> <%= resources_format(resource.send(column)) %> </td> <% end %> <td> <%= link_to t('button.show', :default => 'Show'), url %> <%= link_to t('button.edit', :default => 'Edit'), url + '/edit' %> <%= link_to t('button.delete', :default => 'Delete'), url, :remote => true, :confirm => 'Are you sure?', :method => :delete %> </td> </tr> <% end %> </table>
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rows_controller-0.2.3 | app/views/rows/_list.html.erb |