forked from fixin.me/fixin.me
22 lines
779 B
Plaintext
22 lines
779 B
Plaintext
<tr id="<%= dom_id(unit) %>">
|
|
<td class="<%= class_names('link', {subunit: unit.base}) %>">
|
|
<%= link_to unit.symbol, edit_unit_path(unit), id: dom_id(unit, :edit),
|
|
onclick: 'this.blur();', data: {turbo_stream: true} %>
|
|
</td>
|
|
<td><%= unit.name %></td>
|
|
<td class="number"><%= scientifize(unit.multiplier) if unit.multiplier %></td>
|
|
|
|
<% if current_user.at_least(:active) %>
|
|
<td class="actions">
|
|
<% if unit.base.nil? %>
|
|
<%= image_link_to t(".add_subunit"), "plus-outline", new_unit_path(unit),
|
|
id: dom_id(unit, :add), onclick: 'this.blur();',
|
|
data: {turbo_stream: true} %>
|
|
<% end %>
|
|
|
|
<%= image_button_to t(".delete_unit"), "delete-outline", unit_path(unit),
|
|
method: :delete %>
|
|
</td>
|
|
<% end %>
|
|
</tr>
|