30 lines
1.0 KiB
Plaintext
30 lines
1.0 KiB
Plaintext
<% if @targets_by_date.any? %>
|
|
<%= render partial: 'targets/options' %>
|
|
|
|
<% formulas = @quantities.collect(&:formula) %>
|
|
<%= error_messages_for *formulas %>
|
|
|
|
<table id="targets" class="list odd-even">
|
|
<%= quantities_table_header @quantities, :field_effective_from do |quantity_id|
|
|
goal_toggle_exposure_path(@goal, quantity_id: quantity_id)
|
|
end %>
|
|
|
|
<tbody>
|
|
<% @targets_by_date.each do |date, targets| %>
|
|
<tr id="date-<%= date %>" class="date <%= cycle('odd', 'even') %>">
|
|
<td class="topleft unwrappable">
|
|
<%= link_to(format_date(date), goal_target_path(@goal, date),
|
|
{remote: true, class: 'icon icon-arrow-right'}) %>
|
|
</td>
|
|
<% @quantities.each do |q| %>
|
|
<td class="right unwrappable"><%= raw targets[q].to_s %></td>
|
|
<% end %>
|
|
<td class="right shrunk unwrappable"><%= action_links(date) %></td>
|
|
</tr>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|
|
<% else %>
|
|
<p class="nodata"><%= l(:label_no_data) %></p>
|
|
<% end %>
|