YaleSTC/shifts

View on GitHub
app/views/data_objects/_report_data_object.html.erb

Summary

Maintainability
Test Coverage
<% report_data_objects =  @report.data_objects.sort_by{|d| d.name.upcase}%>

<% unless @report.data_objects.empty? %>
<div style="width: 60%; float:left">
     <% for report_data_object in report_data_objects%>
      <%= link_to "Update #{report_data_object.name}", 
              new_data_object_data_entry_path(report_data_object), 
              title: "Record New Data Entry", 
              data: {toggle: "modal", target: "#modal", remote: new_data_object_data_entry_path(report_data_object, layout: "false")}%>
          <br/>
    <% end %>
</div>
<% else %>
     <em>There are no data objects in this location.</em>
<% end %>