<commit_before>

%ul#dashboard.list-group{style: 'max-width:500px;'}
  %li.list-group-item.list-group-item-info{ onclick: "$('.collapse').collapse({toggle: true})"}
    %strong= @user.name
    %span.glyphicon.glyphicon-stats
  %li.list-group-item.collapse.in
    = t 'order_item.bookings'
    %span.label.label-info.pull-right
      = @bookings_today.count
  %li.list-group-item.collapse.in
    = t 'order_item.bookings_amount'
    %span.label.label-warning.pull-right
      = number_to_currency @bookings_today.sum(:amount), presicion: 2
  %li.list-group-item.collapse.in
    = t 'order_item.balance'
    - if @user.balance < 0
      %span.label.label-danger.pull-right
        = number_to_currency @user.balance, presicion: 2
    -else 
      %span.label.label-success.pull-right
        = number_to_currency @user.balance, presicion: 2
    




= form_for @order_item, :html => { class:'form-horizontal' } do |f|
  = f.hidden_field :amount, class: 'form-control', value: 1
  = f.hidden_field :delivery_id, class: 'form-control'
  - Category.by_position.all.each do |category|
    - if category.products.any?
      .panel.panel-info
        .panel-heading
          %h2.panel-title= category.title
        .panel-body
          - category.products.order('name ASC').all.each do |product|
            - if product.remaining > 0
              .inline-block{style: "margin: 15px"}
                %button.btn.btn-default.panel.panel-default{ style: "padding:0;min-width:232px;", onclick: "$('#order_item_delivery_id').val(#{product.current_delivery.id});"}
                  .panel-heading
                    = product.title
                  .panel-body
                    = image_tag product.picture.url(:medium), style: "max-height:133px;", alt: product.name, title: product.name
                  .panel-footer
                    .remaining= "#{t "product.remaining"}: #{product.remaining}"
                    .price= "#{t "delivery.price"}: #{number_to_currency product.current_delivery.unit_price, precision: 2}"
<commit_msg>adds labels to order balance<commit_after>

%ul#dashboard.list-group{style: 'max-width:500px;'}
  %li.list-group-item.list-group-item-info{ onclick: "$('.collapse').collapse({toggle: true})"}
    %strong= @user.name
    %span.glyphicon.glyphicon-stats
  %li.list-group-item.collapse.in
    = t 'order_item.bookings'
    %span.label.label-info.pull-right
      = @bookings_today.count
  %li.list-group-item.collapse.in
    = t 'order_item.bookings_amount'
    %span.label.label-warning.pull-right
      = number_to_currency @bookings_today.sum(:amount), presicion: 2
  %li.list-group-item.collapse.in
    = t 'order_item.balance'
    - if @user.balance < 0
      %span.label.label-danger.pull-right
        = number_to_currency @user.balance, presicion: 2
    -else 
      %span.label.label-success.pull-right
        = number_to_currency @user.balance, presicion: 2
    




= form_for @order_item, :html => { class:'form-horizontal' } do |f|
  = f.hidden_field :amount, class: 'form-control', value: 1
  = f.hidden_field :delivery_id, class: 'form-control'
  - Category.by_position.all.each do |category|
    - if category.products.any?
      .panel.panel-info
        .panel-heading
          %h2.panel-title= category.title
        .panel-body
          - category.products.order('name ASC').all.each do |product|
            - if product.remaining > 0
              .inline-block{style: "margin: 15px"}
                %button.btn.btn-default.panel.panel-default{ style: "padding:0;min-width:232px;", onclick: "$('#order_item_delivery_id').val(#{product.current_delivery.id});"}
                  .panel-heading
                    = product.title
                  .panel-body
                    = image_tag product.picture.url(:medium), style: "max-height:133px;", alt: product.name, title: product.name
                  .panel-footer
                    - if product.remaining <= 5
                      .remaining
                        = "#{t "product.remaining"}: "
                        %span.label.label-danger
                          = product.remaining
                    - elsif product.remaining <= 10
                      .remaining
                        = "#{t "product.remaining"}: "
                        %span.label.label-warning
                          = product.remaining
                    - else
                      .remaining
                        = "#{t "product.remaining"}: "
                        %span.label.label-info
                          = product.remaining
                    .price= "#{t "delivery.price"}: #{number_to_currency product.current_delivery.unit_price, precision: 2}"

{'fraction_non_alphanumeric': 0.1379089159717768, 'fraction_numerical': 0.009193927731451786, 'mean_word_length': 2.0675409836065572, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5306247', 'n_tokens_mistral': 1497, 'n_tokens_neox': 1412, 'n_words': 230}