Updated ItemsWithQuantities to work with MeasurementRoutine Replaced ColumnViews HABTM with polymorphic HMT Added Measurement notes Added destroy restrictions on Quantity Replaced BodyTrackingPluginController with Finders concern Removed 'body_trackers' prefix from paths Unified styling for textarea
38 lines
1.3 KiB
Plaintext
38 lines
1.3 KiB
Plaintext
<%= render partial: 'measurements/filters',
|
|
locals: {url: filter_project_measurements_path(@project)} %>
|
|
|
|
<% if @measurements.any? { |m| m.persisted? } %>
|
|
<%= error_messages_for @formula_q.formula if @formula_q %>
|
|
|
|
<table class="list">
|
|
<thead>
|
|
<tr>
|
|
<th style="width:5%"><%= l(:field_taken_at_date) %></th>
|
|
<th><%= l(:field_name) %></th>
|
|
<th><%= l(:field_source) %></th>
|
|
<th style="width:5%"><%= l(:field_action) %></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<% @measurements.each do |m| %>
|
|
<% next if m.new_record? %>
|
|
<tr id="measurement-<%= m.id %>" class="primary measurement">
|
|
<td class="date unwrappable"><%= format_datetime(m) %></td>
|
|
<td class="name">
|
|
<div style="float:left;">
|
|
<%= link_to m.routine.name, readouts_measurement_routine_path(m.routine) %>
|
|
</div>
|
|
<div style="float:right;">
|
|
<small><%= " (#{pluralize(m.readouts.size, 'readout')})" %></small>
|
|
</div>
|
|
</td>
|
|
<td class="source"><%= m.source.name if m.source.present? %></td>
|
|
<td class="action unwrappable"><%= action_links(m) %></td>
|
|
</tr>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|
|
<% else %>
|
|
<p class="nodata"><%= l(:label_no_data) %></p>
|
|
<% end %>
|