Sha256: 79c860a64752ca5b034058368ee2240fe49cb34bcc1fb7886bceabc3fac2f7db

Contents?: true

Size: 1.91 KB

Versions: 6

Compression:

Stored size: 1.91 KB

Contents

- @page_title = "#{t('tienda.variants.variants')} - #{@product.name}"

.row
  .col-md-12
    %h1.page-header
      = t('tienda.variants.variants_of', product: @product.name)
      -# %small Lorem ipsum dolor
/ /. ROW
.row
  .col-md-12
    %p.pull-right
      = link_to t('tienda.variants.edit_product'), [:edit, @product], class: 'btn btn-default'
      = link_to t('tienda.variants.new_variant'), [:new, @product, :variant], class: 'btn btn-primary'

.panel.panel-default
  .panel-heading
    Listing delivery services
  .panel-body
    %table.table.table-hover
      %thead
        %tr
          %th{width: '20%'}= t('tienda.variants.sku')
          %th{width: '50%'}= t('tienda.variants.name')
          %th{width: '15%'}= t('tienda.variants.price')
          %th{width: '15%'}= t('tienda.variants.stock')
      %tbody
        - if @variants.empty?
          %tr.empty
            %td{colspan: 4}= t('tienda.variants.no_products')
        - else
          - for variant in @variants
            %tr
              %td= variant.sku
              %td= link_to variant.name, edit_product_variant_path(@product, variant)
              %td= number_to_currency variant.price
              %td
                - if variant.stock_control?
                  %span.float-right= link_to t('tienda.edit'), stock_level_adjustments_path(item_type: variant.class, item_id: variant.id), class: 'btn btn-default btn-sm', rel: 'dialog', data: {toggle: 'modal', target: '#stockModal'}
                  %span.label{class: "#{variant.in_stock? ? 'label-default' : 'label-danger'}"}
                    = boolean_tag(variant.in_stock?, nil, true_text: variant.stock, false_text: t('tienda.variants.no_stock'))
                - else
                  ∞

/ Modal
#stockModal.modal.fade{"aria-hidden" => "true", "aria-labelledby" => "myModalLabel", :role => "dialog", :tabindex => "-1"}
  .modal-dialog
    .modal-content

    / /.modal-content
  / /.modal-dialog
/ /.modal

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
tienda-2.1.3 app/views/tienda/variants/index.html.haml
tienda-2.1.2 app/views/tienda/variants/index.html.haml
tienda-2.1.1 app/views/tienda/variants/index.html.haml
tienda-2.1.0 app/views/tienda/variants/index.html.haml
tienda-2.0.2 app/views/tienda/variants/index.html.haml
tienda-2.0.1 app/views/tienda/variants/index.html.haml