.row
  h2
    =t 'models.table'
    |  
    = 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
        if product_category.products
          hr
          h4.product_category-title{action toggleProductCategory product_category}
            if product_category.collapsed
              span.icon.collapsed
            else
              span.icon
            = product_category.name
          hr
          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
          hr
          h4= product_category.name
          hr
          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
