Sha256: 554ea05ba97e15ecea901515fe9fd7e329d0d0beb9b6a56c5b38e5a392e3447b

Contents?: true

Size: 1.82 KB

Versions: 21

Compression:

Stored size: 1.82 KB

Contents

<table class="list">
  <thead>
      <th class="list_show"><%%= t 'system.index_id' %></th>
      <th class="list_edit"><%%= t 'system.index_edit' %></th>
    <%- @model.attributes.each do |attr| -%>
      <th><%%= t '<%= @model.plural_name %>.index_<%= attr.name %>' %></th>
    <%- end -%>
      <th class="list_remove"><%%= t 'system.index_remove' %></th>
  </thead>
<%% @<%= @model.plural_name %>.each do |<%= @model.singular_name %>| %>
  <tr class="<%%= cycle 'odd_line', 'even_line' %>" >
    <td>
		<%%= link_to <%= @model.singular_name %>.id, <%= @model.object_name %>_path(<%= @model.singular_name %>) <%= ", :class => 'lightbox various fancybox.ajax'" if options.ajax %> %>
	</td>
  	<td>
		<%%= link_to t('system.index_edit_label'), edit_<%= @model.object_name %>_path(<%= @model.singular_name %>) <%= ", :class => 'lightbox various fancybox.ajax'" if options.ajax %> %>
	</td>
    <%- @model.attributes.each do |attr| -%>
    <td>
      <%- if !attr.references? -%>
        <%%= <%= @model.singular_name %>.<%= attr.name %> %>
      <%- elsif attr.belongs_to? || attr.nested_one? -%>
        <%%= <%= @model.singular_name %>.<%= attr.type.singular_name %>.<%= attr.reference %> %>
      <%- elsif attr.has_many? or attr.has_and_belongs_to_many? or attr.nested_many? -%>
        <ul>
        <%% <%= @model.singular_name %>.<%= attr.type.plural_name %>.each do |<%= attr.type.singular_name %>| %>
          <li><%%= <%= attr.type.singular_name %>.<%= attr.reference %> %> </li>
        <%% end %>
        </ul>
      <%- end -%>
    </td>
    <%- end -%>
    <td>
		<%%= link_to t('system.index_remove_label'), <%= @model.to_route_object %>, :method => :delete, <%= ':remote => true,' if options.ajax %> :data => {:confirm => t('system.index_confirm_deletion')} %>
	</td>
  </tr>
<%% end %>
</table>

<%%= pagination_footer @<%= @model.plural_name %> %>

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
mdd-3.1.4 lib/generators/mdwa/scaffold/templates/views/_list.html.erb
mdd-3.1.2 lib/generators/mdwa/scaffold/templates/views/_list.html.erb
mdd-3.1.1 lib/generators/mdwa/scaffold/templates/views/_list.html.erb
mdd-3.1.0 lib/generators/mdwa/scaffold/templates/views/_list.html.erb
mdd-3.0.20 lib/generators/mdwa/scaffold/templates/views/_list.html.erb
mdd-3.0.19 lib/generators/mdwa/scaffold/templates/views/_list.html.erb
mdd-3.0.18 lib/generators/mdwa/scaffold/templates/views/_list.html.erb
mdd-3.0.17 lib/generators/mdwa/scaffold/templates/views/_list.html.erb
mdd-3.0.16 lib/generators/mdwa/scaffold/templates/views/_list.html.erb
mdd-3.0.15 lib/generators/mdwa/scaffold/templates/views/_list.html.erb
mdd-3.0.14 lib/generators/mdwa/scaffold/templates/views/_list.html.erb
mdd-3.0.13 lib/generators/mdwa/scaffold/templates/views/_list.html.erb
mdd-3.0.10 lib/generators/mdwa/scaffold/templates/views/_list.html.erb
mdd-3.0.9 lib/generators/mdwa/scaffold/templates/views/_list.html.erb
mdd-3.0.8 lib/generators/mdwa/scaffold/templates/views/_list.html.erb
mdd-3.0.7 lib/generators/mdwa/scaffold/templates/views/_list.html.erb
mdd-3.0.6 lib/generators/mdwa/scaffold/templates/views/_list.html.erb
mdd-3.0.4 lib/generators/mdwa/scaffold/templates/views/_list.html.erb
mdd-3.0.3 lib/generators/mdwa/scaffold/templates/views/_list.html.erb
mdd-3.0.2 lib/generators/mdwa/scaffold/templates/views/_list.html.erb