Sha256: 0ca2ec0853c2efc4bcf9144129dc03497d9c81a8150786fc5b73735c162e9edb

Contents?: true

Size: 912 Bytes

Versions: 7

Compression:

Stored size: 912 Bytes

Contents

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

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

<#list <%= "#{@model}List as #@model" %>>
  <tr>
  <% @attributes.each do |att| -%>
    <td>
      <%= "${#{@model}.#{att.name}!\"\"}" unless att.boolean? %>
      <%= "${#{@model}.#{att.name}?string}" if att.boolean? %>
    </td>
  <% end -%>
    <td><a href="<%= "#{path}/${#{@model}.id}" %>">show</a></td>
    <td><a href="<%= "#{path}/${#{@model}.id}/edit" %>">edit</a></td>
    <td>
      <form action="<%= "#{path}/${#{@model}.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

7 entries across 7 versions & 1 rubygems

Version Path
vraptor-scaffold-1.1.0 lib/vraptor-scaffold/generators/scaffold_generator/freemarker_generator/templates/index.erb
vraptor-scaffold-1.1.0.pre lib/vraptor-scaffold/generators/scaffold_generator/freemarker_generator/templates/index.erb
vraptor-scaffold-1.0.0 lib/generators/scaffold_generator/freemarker_generator/templates/index.erb
vraptor-scaffold-0.0.4 lib/generators/scaffold_generator/freemarker_generator/templates/index.erb
vraptor-scaffold-0.0.3 lib/generators/scaffold_generator/freemarker_generator/templates/index.erb
vraptor-scaffold-0.0.2 lib/generators/scaffold_generator/freemarker_generator/templates/index.erb
vraptor-scaffold-0.0.1 lib/generators/scaffold_generator/freemarker_generator/templates/index.erb