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/goals/_index.html.erb
2021-05-08 15:38:41 +02:00

33 lines
1.1 KiB
Plaintext

<% if @goals.any? %>
<table id="goals" class="list odd-even">
<thead>
<tr>
<th style="width:20%"><%= l(:field_name) %></th>
<th><%= l(:field_description) %></th>
<th style="width:5%"><%= l(:field_action) %></th>
</tr>
</thead>
<tbody>
<% @goals.each do |g| %>
<tr id="goal-<%= g.id %>" class="goal">
<td class="topleft unwrappable">
<div style="float:left;">
<%= checked_image g.is_binding %><%= link_to g.name, goal_targets_path(g) %>
</div>
<div style="float:right;">
<%# TODO: display # of active targets/targeted quantities %>
<small><%#= " (#{pluralize(m.readouts.size, 'readout')})" %></small>
</div>
</td>
<td class="description ellipsible"><%= g.description %></td>
<td class="right shrunk">
<%= delete_link(g, {remote: true, data: {}}) unless g.is_binding %>
</td>
</tr>
<% end %>
</tbody>
</table>
<% else %>
<p class="nodata"><%= l(:label_no_data) %></p>
<% end %>