foodcoop-adam/foodsoft

View on GitHub
app/views/shared/articles_by/_articles.html.haml

Summary

Maintainability
Test Coverage
%table.table.table-hover.list#articles_by_articles
  %thead.list-heading
    %tr
      %th{:style => 'width:70%'}= Ordergroup.model_name.human
      %th.center.dimmed
        %acronym{:title => t('shared.articles.ordered_desc')}= t 'shared.articles.ordered'
      %th.center
        %acronym{:title => t('shared.articles.received_desc')}= t 'shared.articles.received'
      %th

  - for order_article in order.order_articles.ordered.all(:include => [:article, :article_price])
    = render 'shared/articles_by/article_single', order_article: order_article, edit: (edit rescue nil)
    %tr
      %td{colspan: 4}