ReadyResponder/ReadyResponder

View on GitHub
app/views/resource_types/index.html.erb

Summary

Maintainability
Test Coverage
<% content_for :sidebar do %>
  <%= sidebar_button_link 'New Resource Type', new_resource_type_path if can? :create, ResourceType %>
<% end %>

<table id="resource_types" class="generic_datatable table table-striped table-bordered">
  <caption><h3><%= @page_title %></h3></caption>
  <thead>
    <tr>
      <th>Name</th>
      <th>Status</th>
      <th>Description</th>
      <th>Fema code</th>
      <th>Fema kind</th>
      <th></th>
    </tr>
  </thead>
  <tbody>
    <% @resource_types.each do |resource_type| %>
      <tr>
        <td><%= link_to resource_type.name, resource_type %></td>
        <td><%= resource_type.status %></td>
        <td><%= resource_type.description %></td>
        <td><%= resource_type.fema_code %></td>
        <td><%= resource_type.fema_kind %></td>
        <td><%= table_button_link 'Edit', edit_resource_type_path(resource_type) %></td>
      </tr>
    <% end %>
  </tbody>
</table>