<% if current_user.at_least(:active) %> <%= turbo_frame_tag do %> <%= image_link_to t('.add_unit'), 'plus-outline', new_unit_path, id: :add_unit, onclick: 'this.blur();', data: {turbo_stream: true} %> <% end %> <% end %>
<%= turbo_frame_tag 'unit_form_frame' %> <% if current_user.at_least(:active) %> <% end %> <%= render(@units) || render_no_items %>
<%= User.human_attribute_name(:symbol).capitalize %> <%= User.human_attribute_name(:name).capitalize %> <%= User.human_attribute_name(:multiplier).capitalize %><%= t :actions %>
<%= javascript_tag do %> function processKey(event) { if (event.key == "Escape") { event.target.closest("tr").querySelector("a[name=cancel]").click(); } } <% end %>