- @page_title = t('workarea.admin.prices.title', sku: @sku.name) .view .view__header .grid .grid__cell.grid__cell--25 = render 'workarea/admin/releases/select' .grid__cell.grid__cell--50 .view__heading = link_to_index_for(@sku) %h1= link_to @sku.name, url_for(@sku) .grid__cell.grid__cell--25 = render_aux_navigation_for(@sku) .view__container = render_cards_for(@sku, :prices) .view__container.view__container--narrow = form_tag pricing_sku_price_path(@sku, @price), method: :patch, data: { unsaved_changes: '' } do %table %thead %tr %th= t('workarea.admin.prices.regular_price') %th #{t('workarea.admin.prices.sale_price')} #{t('workarea.admin.prices.sale_price_default')} %th= t('workarea.admin.prices.minimum_quantity') %th = t('workarea.admin.fields.active') = inline_svg('workarea/admin/i18n.svg', class: 'svg-icon svg-icon--small') if locale_options.many? && Workarea.config.localized_active_fields %th= t('workarea.admin.fields.on_sale') = append_partials('admin.price_table_columns', sku: @sku) %th %th %tbody - @sku.prices.each do |price, index| - if price.id == @price.id %tr %td = currency_symbol = text_field_tag 'price[regular]', price.regular, class: 'text-box text-box--small', title: t('workarea.admin.fields.regular'), id: "price[regular]" %td = currency_symbol = text_field_tag 'price[sale]', price.sale, class: 'text-box text-box--small', title: t('workarea.admin.fields.sale'), id: "price[sale]" %td = text_field_tag 'price[min_quantity]', price.min_quantity, class: 'text-box text-box--small', title: t('workarea.admin.fields.min_quantity'), id: "price[min_quantity]", min: '1' %td = toggle_button_for 'price[active]', @price.active? %td = toggle_button_for 'price[on_sale]', @price.on_sale? = append_partials('admin.price_table_fields', price: price) %td %td - else %tr %td= number_to_currency(price.regular) %td= number_to_currency(price.sale) %td= price.min_quantity %td - if price.active? = t('workarea.admin.prices.active') - else = t('workarea.admin.prices.inactive') %td= price.on_sale? ? t("workarea.admin.pricing_skus.on_sale") : t("workarea.admin.pricing_skus.not_on_sale") = append_partials('admin.price_table_values', price: price) %td %td .workflow-bar .grid.grid--auto.grid--right.grid--middle .grid__cell= render 'workarea/admin/shared/publishing_select' .grid__cell= button_tag t('workarea.admin.form.save_changes'), value: 'save_price', class: 'workflow-bar__button workflow-bar__button--update'