forked from fixin.me/fixin.me
21 lines
976 B
Plaintext
21 lines
976 B
Plaintext
<div class="topside vflex">
|
|
<% if current_user.at_least(:active) %>
|
|
<%= render partial: 'form_frame' %>
|
|
<%# TODO: show hint when no quantities/units defined %>
|
|
<div class="hflex">
|
|
<%= select_tag :id, options_from_collection_for_select(
|
|
@quantities, :id, ->(q){ sanitize(' '*q.depth + q.name) }
|
|
), form: :new_readouts_form %>
|
|
<% common_options = {form: :new_readouts_form, formaction: new_measurement_path,
|
|
formmethod: :get, formnovalidate: true,
|
|
data: {turbo_stream: true}} %>
|
|
<%= image_button_tag t('.new_quantity'), 'plus-outline', name: :scope,
|
|
**common_options -%>
|
|
<%= image_button_tag t('.new_children'), 'plus-multiple-outline', name: :scope,
|
|
value: :children, **common_options -%>
|
|
<%= image_button_tag t('.new_subtree'), 'plus-multiple-outline', name: :scope,
|
|
value: :subtree, **common_options -%>
|
|
</div>
|
|
<% end %>
|
|
</div>
|