- title t('.title', article_count: StockArticle.available.count) - content_for :javascript do :javascript $(function() { $('tr.unavailable').hide(); }) .well.well-small .btn-toolbar .btn-group.pull-right = link_to '#', data: {toggle: 'dropdown'}, class: 'btn dropdown-toggle' do = t '.view_options' %span.caret %ul.dropdown-menu %li= link_to t('.toggle_unavailable'), "#", 'data-toggle-this' => 'tr.unavailable', tabindex: -1 .btn-group = link_to_if @current_user.role_orders?, t('.order_online'), new_order_path(supplier_id: 0), class: 'btn', class: 'btn btn-primary' = link_to t('.new_stock_article'), new_stock_article_path, class: 'btn' = link_to t('.new_stock_taking'), new_stock_taking_path, class: 'btn' = link_to t('.show_stock_takings'), stock_takings_path, class: 'btn' .btn-group = link_to '#', data: {toggle: 'dropdown'}, class: 'btn dropdown-toggle' do = t '.new_delivery' %span.caret %ul.dropdown-menu - Supplier.all.each do |supplier| %li= link_to supplier.name, new_supplier_delivery_path(supplier), tabindex: -1 %table.table.table-hover#articles %thead %tr %th= Article.model_name.human %th= heading_helper StockArticle, :quantity %th= heading_helper StockArticle, :quantity_ordered %th= heading_helper StockArticle, :available %th= heading_helper StockArticle, :unit %th= heading_helper StockArticle, :price %th= heading_helper StockArticle, :tax %th= heading_helper StockArticle, :supplier %th= heading_helper StockArticle, :article_category %th %tbody - for article in @stock_articles %tr{:class => stock_article_classes(article), :id => "stockArticle-#{article.id}"} %td= link_to article.name, article %td= article.quantity %td= article.quantity_ordered %th= article.quantity_available %td= article.unit %td= article.price %td= number_to_percentage article.tax %td= link_to article.supplier.name, article.supplier %td= article.article_category.name %td = link_to t('ui.edit'), edit_stock_article_path(article), class: 'btn btn-mini' = link_to t('ui.delete'), article, :method => :delete, :confirm => t('.confirm_delete'), class: 'btn btn-mini btn-danger', :remote => true %p = t '.stock_worth' = number_to_currency StockArticle.stock_value | =t '.stock_count' = StockArticle.available.count