forked from fixin.me/fixin.me
37 lines
1.2 KiB
Plaintext
37 lines
1.2 KiB
Plaintext
<div class="rightside-area buttongrid">
|
|
<% if current_user.at_least(:active) %>
|
|
<%= image_link_to t('.new_quantity'), 'plus-outline', new_quantity_path,
|
|
id: :new_quantity_link, onclick: 'this.blur();', data: {turbo_stream: true} %>
|
|
<% end %>
|
|
<%#= image_link_to t('.import_quantities'), 'download-outline',
|
|
default_quantities_path, class: 'tools-area' %>
|
|
</div>
|
|
|
|
<table class="main-area items-table">
|
|
<caption class="hint"><%= t '.no_items' %></caption>
|
|
|
|
<tbody>
|
|
<tr>
|
|
<th class="hmintext"><%= Quantity.human_attribute_name(:name) %>
|
|
<th class="hexpand"><%= Quantity.human_attribute_name(:description) %>
|
|
<% if current_user.at_least(:active) %>
|
|
<th colspan="3"><%= t :actions %>
|
|
|
|
<tr id="quantity_" hidden
|
|
ondragover="dragOver(event)" ondrop="drop(event)"
|
|
ondragenter="dragEnter(event)" ondragleave="dragLeave(event)"
|
|
data-drop-id="quantity_"
|
|
data-drop-id-param="<%= field_name(:quantity, :parent_id) %>">
|
|
<th colspan="5"><%= t '.top_level_drop' %>
|
|
<% end %>
|
|
|
|
<%= render @quantities %>
|
|
|
|
<% if current_user.at_least(:active) %>
|
|
<tr id="endmark" hidden>
|
|
|
|
<tfoot>
|
|
<%= render partial: 'form', locals: {hidden: true} %>
|
|
<% end %>
|
|
</table>
|