Sha256: b3d64aaa47d06c2063f52cd3273ac3219f1f0dba97ca0c30112ce8e60e321dec

Contents?: true

Size: 1.07 KB

Versions: 3

Compression:

Stored size: 1.07 KB

Contents

- @page_title = "Stock Levels - #{@product.title}"
= content_for :header do
  %p.buttons
    = link_to "Edit product", [:edit, @product], :class => 'button'
    = link_to "Back to product list", :products, :class => 'button'
  %h2.products= @product.title

.table
  %p.info
    Current stock level is <b>#{@product.stock}</b>
    %span.float-right= page_entries_info @stock_level_adjustments

  = form_for @new_sla, :url => [:stock_levels, @product] do |f|
    %table.data
      %thead
        %tr
          %th{:width => '25%'} Date
          %th{:width => '50%'} Description
          %th{:width => '25%'} Adjustment
      %tbody
        %tr.form
          %td
          %td.desc= f.text_field :description
          %td.adjustment
            = f.text_field :adjustment
            = f.submit "Add", :class => 'button button-mini green'
        - for sla in @stock_level_adjustments
          %tr
            %td= sla.created_at.to_s(:long)
            %td= sla.description
            %td= sla.adjustment > 0  ? "+#{sla.adjustment}" : sla.adjustment

    = paginate @stock_level_adjustments

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
shoppe-0.0.14 app/views/shoppe/products/stock_levels.html.haml
shoppe-0.0.13 app/views/shoppe/products/stock_levels.html.haml
shoppe-0.0.12 app/views/shoppe/products/stock_levels.html.haml