SpeciesFileGroup/taxonworks

View on GitHub
app/views/data_attributes/list.html.erb

Summary

Maintainability
Test Coverage
<%= render("/shared/data/all/list/list_header", objects: @data_attributes) -%>

<table class="tablesorter">
  <thead>
  <tr>
    <%= fancy_th_tag(name: 'Attribute subject type') -%>
    <%= fancy_th_tag(name: 'Type') -%>
    <%= fancy_th_tag(name: 'Attribute subject') -%>
    <%= fancy_th_tag(name: 'Predicate') -%>
    <%= fancy_th_tag(name: 'Value') -%>
    <%= fancy_th_tag(name: 'Updated by', group: 'housekeeping') -%>
    <%= fancy_th_tag(name: 'Last updated', group: 'housekeeping') -%>
  </tr>
  </thead>

  <tbody>
  <% @data_attributes.each do |data_attribute| %>
      <%= content_tag(:tr, class: :contextMenuCells) do -%>
          <td><%= data_attribute.attribute_subject_type %></td>
          <td><%= data_attribute.type %></td>
          <td><%= object_tag(data_attribute.attribute_subject) %></td>
          <td><%= data_attribute_predicate_tag(data_attribute) %></td>
          <td><%= data_attribute.value %></td>
          <%= fancy_metadata_cells_tag(data_attribute) -%>
      <% end %>
  <% end %>
  </tbody>
</table>