Sha256: d9aba6a26dbb6816db9373df52b93f62466b12b79132b4ba189a76b7ec3c9145

Contents?: true

Size: 1.35 KB

Versions: 1

Compression:

Stored size: 1.35 KB

Contents

<h2><%= plural_name.humanize.capitalize %></h2>

<%%= admin_controls :<%= table_name %>, :for => :index %>

<%%= will_paginate(@<%= plural_name %>) %>
<table>
  <tr>
<% attributes.each_with_index do |attribute, i| -%>
    <th<% if i == 0 -%> class="first_col"<% end -%>><%%= sorterable_link :<%= attribute.name -%> %></th>
<% end -%>
	<th>View</th>
	<th>Edit</th>
	<th>Delete</th>
  </tr>
  
<%%  @<%= plural_name %>.each do |<%= singular_name %>| %>
  <tr id="<%%= dom_id(<%= singular_name %>) %>" <%%= alt_rows %>>
<% attributes.each_with_index do |attribute, i| -%>
    <% if i == 0 -%><td class="first_col"><%%= link_to <%= singular_name %>.<%= attribute.name %>, <%= table_name.singularize %>_path(<%= singular_name %>)  %></td><%- else -%>
   <td><%%= h <%= singular_name %>.<%= attribute.name %> %></td>
	<%- end -%>
<% end -%>
    <td><%%= link_to image_tag('admin/icon_show.png'), <%= table_name.singularize %>_path(<%= singular_name %>) %></td>
    <td><%%= link_to image_tag('admin/icon_edit.png'), edit_<%= table_name.singularize %>_path(<%= singular_name %>) %></td>
    <td><%%= link_to image_tag('admin/icon_destroy.png'), <%= table_name.singularize %>_path(<%= singular_name %>), :confirm => 'Are you sure?', :method => :delete %></td>
  </tr>
<%% end %>
</table>
<%%= will_paginate(@<%= plural_name %>) %>

<%%= admin_controls :<%= table_name %>, :for => :index %>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
quirkey-qadmin-0.1.0 lib/qadmin/views/index.html.erb