Sha256: ff542d54972fc151c6011df1141713d0b1a692d65e3a7f803b7e8c5fa5a30abd

Contents?: true

Size: 1.64 KB

Versions: 2

Compression:

Stored size: 1.64 KB

Contents

<%%= paginate @<%= plural_table_name %>, :remote => remote %>
<div class="separator"></div>

<table class='user' cellspacing='0'>
  <thead>
  <tr>
<%- attributes.each do |attribute| -%>
    <th><%%= t('attributes.<%= singular_table_name %>.<%= attribute.name %>') %></th>
<%- end -%>
    <th></th>
    <th></th>
    <th></th>
  </tr>
  </thead>
  <tbody>
<%% @<%= plural_table_name %>.each do |<%= singular_table_name %>| %>
  <tr id="tr<%%= <%= singular_table_name %>.id %>" class="<%%= cycle("odd", "even")%>">
<%- attributes.each do |attribute| -%>
    <%- case attribute.type
    when :boolean -%>
    <td><%%= <%= singular_table_name %>.<%= attribute.name %> ? style_image_tag("ico_v.png") : style_image_tag('ico_x.png') %></td>
    <%-	else -%>
    <td><%%= <%= singular_table_name %>.<%= attribute.name %> %></td>
    <%- end -%>
<%- end -%>
    <td><%%= link_to t(:show), <%= singular_table_name %> %></td>
    <% if authorization? -%>
    <%% if can? :update, <%= singular_table_name %> -%>
    <% end -%>
    <td><%%= link_to t(:edit), edit_<%= singular_table_name %>_path(<%= singular_table_name %>) %></td>
    <% if authorization? -%>
    <%% end -%>
    <% end -%>
    <% if authorization? -%>
    <%% if can? :destroy, <%= singular_table_name %> -%>
    <% end -%>
    <td><%%= link_to t(:destroy), <%= singular_table_name %>, <%= key_value :confirm, "t(:sure?)" %>, <%= key_value :method, ":delete" %>, :remote => remote %></td>
    <% if authorization? -%>
    <%% end -%>
    <% end -%>
  </tr>
<%% end %>
  </tbody>
</table>

<div class="separator"></div>
<%%= paginate @<%= plural_table_name %>, :remote => remote %>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
leonardo-1.3.1 lib/generators/erb/leosca/templates/_list.erb
leonardo-1.3.0 lib/generators/erb/leosca/templates/_list.erb