forked from fixin.me/fixin.me
9c51887024
Stretch inputs to column width in place of fixed sizing. Set minimum column widths for columns with form inputs. Simplify table operations by removing `thead` and adding sentinel. Manage empty table display with CSS only.
32 lines
1.1 KiB
Plaintext
32 lines
1.1 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><%= t :actions %>
|
|
<th>
|
|
|
|
<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="4"><%= t '.top_level_drop' %>
|
|
<% end %>
|
|
|
|
<%= render @quantities %>
|
|
<tr id="endmark" hidden>
|
|
</table>
|