Sha256: cc84d791a1f39848037bc8958e8fbd6b22df4adcdd93c15877d55bfb5a59dc66

Contents?: true

Size: 1.38 KB

Versions: 5

Compression:

Stored size: 1.38 KB

Contents

<%% title "<%= plural_name.titleize %>" %>

<div class="well">
	<table class="table table-striped">
	  <thead>
  	  <tr>
  	  <%- model_attributes.each do |attribute| -%>
  	    <th><%= attribute.human_name.titleize %></th>
  	  <%- end -%>
  		<%- if action? :show -%>
        <th></th>
      <%- end -%>
      <%- if action? :edit -%>
        <th></th>
      <%- end -%>
      <%- if action? :destroy -%>
        <th></th>
      <%- end -%>
  	  </tr>
  	</thead>
  	<tbody>
  	  <%% @<%= instances_name %>.each do |<%= instance_name %>| %>
  	    <tr>
  	    <%- model_attributes.each do |attribute| -%>
  	      <td><%%= <%= instance_name %>.<%= attribute.name %> %></td>
  	    <%- end -%>
  	    <%- if action? :show -%>
  	      <td><%%= link_to "Show", <%= item_path %>, :class => 'btn btn-mini btn-primary' %></td>
  	    <%- end -%>
  	    <%- if action? :edit -%>
  	      <td><%%= link_to "Edit", <%= item_path :action => :edit %>, :class => 'btn btn-mini' %></td>
  	    <%- end -%>
  	    <%- if action? :destroy -%>
  	      <td><%%= link_to "Destroy", <%= item_path %>, :confirm => 'Are you sure?', :method => :delete, :class => 'btn btn-mini btn-danger' %></td>
  	    <%- end -%>
  	    </tr>
  	  <%% end %>
  	</tbody>
	</table>
</div>
<%- if action? :new -%>
<p><%%= link_to "New <%= singular_name.titleize %>", <%= item_path :action => :new %>, :class => 'btn primary' %></p>
<%- end -%>

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
bootstrapped-2.0.4 lib/generators/bootstrapped/scaffold/templates/views/erb/index.html.erb
bootstrapped-2.0.3 lib/generators/bootstrapped/scaffold/templates/views/erb/index.html.erb
bootstrapped-1.0.1 lib/generators/bootstrapped/scaffold/templates/views/erb/index.html.erb
bootstrapped-1.0.0 lib/generators/bootstrapped/scaffold/templates/views/erb/index.html.erb
bootstrapped-0.9.0 lib/generators/bootstrapped/scaffold/templates/views/erb/index.html.erb