Sha256: 4278c59b5f471eed4aefe51bd0f7f5d46f755fc102402d48ecab7f425a24a093

Contents?: true

Size: 1.77 KB

Versions: 2

Compression:

Stored size: 1.77 KB

Contents

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

<div class="block">
  <div class="secondary-navigation">
    <ul>
      <li class="first active"><%%= link_to 'List', <%= plural_name %>_path %></li>
      <li><%%= link_to 'New', new_<%= singular_name %>_path %></li>
    </ul>
    <div class="clear"></div>
  </div>
  <div class="content">          
    <h2 class="title"><%%= yield(:title) %></h2>
    <div class="inner">
      <table class="table">
        <tr>
          <th>ID</th>
        <%- for attribute in attributes -%>
          <th><%= attribute.column.human_name.titleize %></th>
        <%- end -%>
          <th class="last" colspan="3">&nbsp;</th>
        </tr>
        <%% @<%= plural_name %>.each do |<%= singular_name %>| %>
          <tr>
            <td><%%= <%= singular_name %>.id %></td>
          <%- for attribute in attributes -%>
            <td><%%= <%= singular_name %>.<%= attribute.name %> %></td>
          <%- end -%>
          <%- if action? :show -%>
            <td><%%= link_to "Show", <%= singular_name %> %></td>
          <%- end -%>
          <%- if action? :edit -%>
            <td><%%= link_to "Edit", edit_<%= singular_name %>_path(<%= singular_name %>) %></td>
          <%- end -%>
          <%- if action? :destroy -%>
            <td class="last"><%%= link_to "Destroy", <%= singular_name %>, :confirm => 'Are you sure?', :method => :delete %></td>
          <%- end -%>
          </tr>
        <%% end %>
      </table>
      <div class="actions-bar">
        <div class="actions">
        </div>
        <div class="clear"></div>
      </div>
    </div>
  </div>
</div>
      
<%- if action? :new -%>
<p><%%= link_to "New <%= singular_name.titleize %>", new_<%= singular_name %>_path %></p>
<%- end -%>

<%% content_for :sidebar, render(:partial => 'sidebar') -%>

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
linki-nifty-generators-0.3.1 rails_generators/nifty_scaffold/templates/views/erb/index.html.erb
linki-nifty_generators-0.3.1 rails_generators/nifty_scaffold/templates/views/erb/index.html.erb