Sha256: 04c8db03b82e54e75d2c9a35fd56ba08c0a711737948e03d317c24145ca33f1c

Contents?: true

Size: 1018 Bytes

Versions: 3

Compression:

Stored size: 1018 Bytes

Contents

<body>
<h1>Listing <%= class_name.pluralize %></h1>

<table>
  <tr>
<% @attributes.each do |att| -%>
   <th><%= att.html_label %></th>
<% end -%>
   <th></th>
   <th></th>
   <th></th>
  </tr>

<#list <%= "#{model_parameter_name}List as #{model_parameter_name}" %>>
  <tr>
  <% @attributes.each do |att| -%>
    <td>
      <%= "${#{model_parameter_name}.#{att.name}!\"\"}" unless att.boolean? %>
      <%= "${#{model_parameter_name}.#{att.name}?string}" if att.boolean? %>
    </td>
  <% end -%>
    <td><a href="<%= "#{path}/${#{model_parameter_name}.id}" %>">show</a></td>
    <td><a href="<%= "#{path}/${#{model_parameter_name}.id}/edit" %>">edit</a></td>
    <td>
      <form action="<%= "#{path}/${#{model_parameter_name}.id}" %>" method="post">
    	  <input type="hidden" name="_method" value="delete"/>
    	  <button type="submit" onclick="return confirm('Are you sure?')">destroy</button>
	    </form>
	  </td>
    </tr>
</#list>
</table>

<br />
<a href="<%= path %>/new">New <%= class_name %></a> 
</body>

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
vraptor-scaffold-1.3.0 lib/vraptor-scaffold/generators/scaffold/template_engine_generator/freemarker_generator/templates/index.erb
vraptor-scaffold-1.3.0.rc lib/vraptor-scaffold/generators/scaffold/template_engine_generator/freemarker_generator/templates/index.erb
vraptor-scaffold-1.2.3 lib/vraptor-scaffold/generators/scaffold/template_engine_generator/freemarker_generator/templates/index.erb