.page-header h4= t('user.show_products.title', products: Product.model_name.human_plural) = link_to t('helpers.links.show_active_list', list: List.model_name.human), user_active_list_path, class: ['btn btn'] span#list-needs-help-button table#products-table.table.table-striped.table-hover tbody -# content_for :sidebar do table#active-order-table.table.table-striped.hide thead tr th Product th # th.currency Total th tbody tfoot tr td colspan=2 button class="btn btn-primary" onClick="Qrammer.handle_active_user_list(function(){Qrammer.order_active_products_list('/order_active_products_list')})" Bestellen |  button class="btn btn btn-warning" onClick="Qrammer.clear_active_list()" Clear td.currency strong#active-order-total td - content_for :footer do javascript: jQuery(function(){ Qrammer.handle_active_user_list(function(){ $.get('#{product_list_supplier_path(@supplier, format: :json).html_safe}', function(res){ window.products = res body = $('#products-table tbody') for(var category in window.products){ body.append('

'+category+'

'); var category_ref = window.products[category]; for(var iproduct = 0; iproduct < window.products[category].length; iproduct++){ var product_index = iproduct; row = $(''); button = $(''); var callback = (function(ref){ return function(){ Qrammer.add_product(ref[product_index]) } })(category_ref) button.click(callback); row.append(''+window.products[category][iproduct].name+''); row.append(''+Qrammer.currency(window.products[category][iproduct].price)+''); row.append($('').append(button)); body.append(row); } } }) setInterval('Qrammer.handle_active_user_list()', 7500); }) })