38 lines
1.4 KiB
Plaintext
38 lines
1.4 KiB
Plaintext
<%= render partial: 'quantities/filters',
|
|
locals: {url: filter_project_quantities_path(@project)} %>
|
|
|
|
<% if @quantities.any? { |q| q.persisted? } %>
|
|
<table class="list">
|
|
<thead>
|
|
<tr>
|
|
<th><%= l(:field_name) %></th>
|
|
<th><%= l(:field_order) %></th>
|
|
<th><%= l(:field_domain) %></th>
|
|
<th><%= l(:field_description) %></th>
|
|
<th><%= l(:field_formula) %></th>
|
|
<th style="width:5%"><%= l(:field_action) %></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<% Quantity.each_with_level(@quantities) do |q, level| %>
|
|
<% next if q.new_record? %>
|
|
<tr id="quantity-<%= q.id %>" class="quantity project idnt idnt-<%= level+1 -%>">
|
|
<%# NOTE: 'name' class only for proper indentation by 'idnt-N' %>
|
|
<td class="name topleft unwrappable<%= ' bolded' unless q.exposures.empty? -%>">
|
|
<div class="icon <%= q.exposures.empty? ? 'icon-fav-off' : 'icon-fav' -%>">
|
|
<%= q.name %>
|
|
</div>
|
|
</td>
|
|
<td class="order"><%= order_links(q) %></td>
|
|
<td class="domain"><%= q.domain %></td>
|
|
<td class="description symmetric"><%= q.description %></td>
|
|
<td class="formula"><%= checked_image q.formula %></td>
|
|
<td class="right shrunk unwrappable"><%= action_links(q) %></td>
|
|
</tr>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|
|
<% else %>
|
|
<p class="nodata"><%= l(:label_no_data) %></p>
|
|
<% end %>
|