cirandas.net

ref: master

plugins/orders/views/orders_plugin_item/_quantity_price.html.slim


div class="quantity-price-row #{status} #{status_data[:flags].keys.join ' '}"
  - quantity_localized = CurrencyFields.localized_number status_data[:quantity]
  .box-field.quantity title="#{"#{quantity_localized} #{item.unit_name}" unless status_data[:flags][:removed]}"
    span.value
      - if status_data[:flags][:removed]
        = t'views.item._edit.removed'
      - else
        = quantity_localized
    - if not @view and status_data[:flags][:editable]
      = number_field_tag "item[quantity_#{status_data[:field]}]", status_data[:quantity], step: 'any', onkeydown: 'orders.item.quantity_keydown(this, event)'
    - unless status_data[:flags][:removed]
      | 
      span.unit= item.unit_name

  .box-field.price-total
    span class="#{'outdated' if status_data[:new_price]}" = status_data[:price]
    - if status_data[:new_price]
      span.new-price= status_data[:new_price]

  - if @admin
    .box-field.status
      = t OrdersPlugin::Order::StatusText[status]