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.
body_tracking/app/views/targets/_oldindex.html.erb
2020-08-06 21:52:33 +02:00

34 lines
1.2 KiB
Plaintext

<% if @targets.any? %>
<table class="list">
<thead>
<tr>
<th style="width:5%"><%= l(:field_effective_from) %></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>
<% @targets.select(&:persisted?).each do |t| %>
<tr id="target-<%= t.id %>" class="primary target">
<td class="date unwrappable"><%= format_date(t.effective_from) %></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="notes ellipsible"><%= m.notes %></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 %>