= haml "orders/menu".to_sym %h1 Remote Order ID #{@remote_order_id} %br %table.pure-table.pure-table-striped %thead %tr %th Remote Name %th Local Name %th Qty %th Refund %th = shelve_icon Shelve %tbody - @remote_products_qty.sort_by{|p,_| p.name}.each do |p, qty, refunded| %tr %td = remote_product_link p %td -if p.local_product %a(href="/product/#{p.local_product.id}") = p.local_product.name -elsif p.is_a? RemoteProduct %a(href="/remote_product/#{p.id}/link") Link (broken) -else not in database %td=qty %td=refunded %td -if shelve = p.local_product.try(:shelve_nr) = shelve