1
0
This repository has been archived on 2023-12-07. You can view files and clone it, but cannot push or open issues or pull requests.
2022-07-24 16:46:28 +02:00

39 lines
1.4 KiB
Plaintext

<%= render partial: 'measurements/filters',
locals: {url: filter_project_measurements_path(@project, @view_params)} %>
<% if @measurements.any? %>
<%= error_messages_for @filter_q.formula if @filter_q %>
<table id="measurements" class="list">
<thead>
<tr>
<th style="width:5%"><%= l(:field_taken_at_date) %></th>
<th><%= l(:field_name) %></th>
<th><%= l(:field_notes) %></th>
<th><%= l(:field_source) %></th>
<th style="width:5%"><%= l(:field_action) %></th>
</tr>
</thead>
<tbody>
<% @measurements.each do |m| %>
<tr id="measurement-<%= m.id %>" class="measurement">
<td class="topleft unwrappable"><%= format_datetime(m.taken_at) %></td>
<td class="topleft">
<div style="float:left;">
<%= link_to m.routine.name, measurement_routine_readouts_path(m.routine) %>
</div>
<div style="float:right;">
<small><%= " (#{pluralize(m.readouts.size, 'readout')})" %></small>
</div>
</td>
<td class="notes ellipsible"><%= m.notes %></td>
<td class="source"><%= m.source.name if m.source.present? %></td>
<td class="right shrunk unwrappable"><%= action_links(m) %></td>
</tr>
<% end %>
</tbody>
</table>
<% else %>
<p class="nodata"><%= l(:label_no_data) %></p>
<% end %>