SpeciesFileGroup/taxonworks

View on GitHub
app/views/shared/data/community/user_defined/_show.html.erb

Summary

Maintainability
Test Coverage
<!-- DEPRECATE, not different than shared/data/project/show -->
<div class="flexbox" id="show">
  <div class="item item1 one_fifth_width">

    <h2> <%= model_name_title -%></h2>

    <div>id: <%= object.id -%></div>

    <div class="go">
      <h2> Go </h2>
      <%= forward_back_links(object) -%> <br><br>
      <%= yield :show_navigation -%>
    </div>
  </div>

  <div class="item item2 one_third_width">
    <h2> <%= object_tag(object) -%> </h2>

    <div class="attributes">
      <% if content_for?(:attributes) -%>
        <%= yield :attributes -%>
      <% else %>
        <%= render object_attributes_partial_path(object.metamorphosize) %>
      <% end %>
      <%= yield :related_attributes -%>
      <%= render partial: '/shared/data/all/show/housekeeping', locals: {object: object} -%>
      <%= render(partial: '/shared/data/all/show/soft_validation', locals: {object: object}) if object.class.respond_to?(:soft_validates?) -%>
      <%= render(partial: '/shared/data/all/show/annotations', locals: {object: object}) if !object.annotations.empty? -%>
    </div>
  </div>

  <div class="item item3 one_quarter_width">

    <div class="do">
      <h2> Do </h2>
      <%= edit_object_link(object) -%> | <%= destroy_object_link(object) -%>
      <br>
      <br>
      <%= pin_item_to_pinboard_link(object, sessions_current_user) -%>
      <%= yield :do -%>
      <br>

      <h3> Annotate </h3>
      TODO: RADIAL ANNOTATOR HERE
      <br>
      <br>
      <%= yield :tasks -%>
    </div>

    <div class="see">
      <h2> See </h2>
      <%= papertrail_link_tag(object) -%>
      <br>
      <br>
      <%= yield :see -%>
    </div>
  </div>
</div>