.row
  h3
    span.supplier-name= supplier.name
    span.table-number
      ' #
      = number
  if showJoinButton
    if join_request_sent
      button.disabled
        span.fa.fa-spinner.fa-spin.fa-lg
        span=t 'join_request.requestor.waiting_for_approval'
    else
      button.join-table-button{action "joinOccupiedTable"}=t 'join_request.requestor.join_this_table'
  if tableCanTakeOrders
    .large-6.columns
      each product_category in supplier.product_categories
        .product-category-container
          if product_category.products
            h4.product_category-title{action "toggleProductCategory" product_category}
              if product_category.collapsed
                span.icon.collapsed
              else
                span.icon
              = product_category.name
            unless product_category.collapsed
              ul.product_category-products
                each product in product_category.products
                  li class="order-product-#{unbound product.id}"
                    if product.description
                      button.show-product-description{action "showProductDescription" product}
                        span
                    else
                      span.no-product-description
                    a{action "addProduct" product}= product.name
                    button.add-product-to-list{action "addProduct" product}
                      span
                    span.product-price.currency=currency product.price
    .large-6.columns= render 'product_orders'
  else
    .large12
      each product_category in supplier.product_categories
        if product_category.products
          .product_category-container
            h4.product-category-title= product_category.name
            ul.product_category-products
              each product in product_category.products
                li class="order-product-#{unbound product.id}"
                  if product.description
                    button.show-product-description{action "showProductDescription" product}
                      span
                  span= product.name
                  span.right.currency=currency product.price
