SpeciesFileGroup/taxonworks

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

Summary

Maintainability
Test Coverage
<p id="notice"><%= notice %></p>

<h1>Listing Descriptors</h1>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Short name</th>
      <th>Type</th>
      <th>Created by</th>
      <th>Updated by</th>
      <th>Project</th>
      <th colspan="3"></th>
    </tr>
  </thead>

  <tbody>
    <% @descriptors.each do |descriptor| %>
      <tr>
        <td><%= descriptor.name %></td>
        <td><%= descriptor.short_name %></td>
        <td><%= descriptor.type %></td>
        <td><%= descriptor.created_by_id %></td>
        <td><%= descriptor.updated_by_id %></td>
        <td><%= descriptor.project %></td>
        <td><%= link_to 'Show', descriptor %></td>
        <td><%= link_to 'Edit', edit_descriptor_path(descriptor) %></td>
        <td><%= link_to 'Destroy', descriptor, method: :delete, data: { confirm: 'Are you sure?' } %></td>
      </tr>
    <% end %>
  </tbody>
</table>

<br>

<%= link_to 'New Descriptor', new_descriptor_path %>