diff --git a/core/static/core/style.css b/core/static/core/style.css index 019eacfc..e3f4b725 100644 --- a/core/static/core/style.css +++ b/core/static/core/style.css @@ -160,6 +160,15 @@ tbody>tr:hover { float: right; padding: 10px; } +#products { + width: 90%; + margin: 0px auto; + overflow: auto; +} +#bar_ui { + float: left; + min-width: 57%; +} #user_info_container { } #user_info { @@ -277,3 +286,19 @@ label { #user_edit img { width: 100px; } +.form_button { + width: 150px; + height: 100px; + padding: 2px; + display: inline-block; + font-size: 0.8em; +} +.form_button strong { + font-weight: bold; + font-size: 1.2em; +} +.form_button button { + width: 100%; + height: 100%; + vertical-align: middle; +} diff --git a/counter/templates/counter/counter_click.jinja b/counter/templates/counter/counter_click.jinja index 33754691..5db6b197 100644 --- a/counter/templates/counter/counter_click.jinja +++ b/counter/templates/counter/counter_click.jinja @@ -3,15 +3,15 @@ {% macro add_product(id, content) %} -
+ {% csrf_token %} - +
{% endmacro %} {% macro del_product(id, content) %} -
+ {% csrf_token %} @@ -30,68 +30,72 @@ {{ user_mini_profile(customer.user) }}

{% trans %}Amount: {% endtrans %}{{ customer.amount }} €

-{% if counter.type == 'BAR' %} -
-
{% trans %}Refilling{% endtrans %}
- - {% csrf_token %} - {{ refill_form.as_p() }} - - - -
-{% endif %} -
+
{% trans %}Selling{% endtrans %}
- {% if request.session['too_young'] %} -

{% trans %}Too young for that product{% endtrans %}

- {% endif %} - {% if request.session['not_allowed'] %} -

{% trans %}Not allowed for that product{% endtrans %}

- {% endif %} - {% if request.session['not_enough'] %} -

{% trans %}Not enough money{% endtrans %}

- {% endif %} -
- {% csrf_token %} - - - -
-

{% trans %}Basket: {% endtrans %}

- -

{% trans %}Total: {% endtrans %}{{ "%0.2f"|format(basket_total) }} €

-
- {% csrf_token %} - - -
-
- {% csrf_token %} - - -
-
{% trans %}Products: {% endtrans %} - {% for t in categories %} - {% if counter.products.filter(product_type=t).exists() %} -
{{ t }}
- {% for p in counter.products.filter(product_type=t).all() %} - {{ add_product(p.id, p.name) }} - {% endfor %} - {% endif %} - {% endfor %} + {% if request.session['not_allowed'] %} +

{% trans %}Not allowed for that product{% endtrans %}

+ {% endif %} + {% if request.session['not_enough'] %} +

{% trans %}Not enough money{% endtrans %}

+ {% endif %} +
+ {% csrf_token %} + + + +
+

{% trans %}Basket: {% endtrans %}

+
    + {% for id,infos in request.session['basket']|dictsort %} + {% set product = counter.products.filter(id=id).first() %} + {% set s = infos['qty'] * infos['price'] / 100 %} +
  • {{ del_product(id, '-') }} {{ infos['qty'] + infos['bonus_qty'] }} {{ add_product(id, '+') }} + {{ product.name }}: {{ "%0.2f"|format(s) }} € + {% if infos['bonus_qty'] %} + P + {% endif %} +
  • + {% endfor %} +
+

{% trans %}Total: {% endtrans %}{{ "%0.2f"|format(basket_total) }} €

+
+ {% csrf_token %} + + +
+
+ {% csrf_token %} + + +
+ {% if counter.type == 'BAR' %} +
{% trans %}Refilling{% endtrans %}
+
+
+ {% csrf_token %} + {{ refill_form.as_p() }} + + +
+
+ {% endif %} +
+
+ {% for t in categories -%} + {%- if counter.products.filter(product_type=t).exists() -%} +
{{ t }}
+
+ {% for p in counter.products.filter(product_type=t).all() -%} + {{ add_product(p.id, "%s
%s €
%s" % (p.name, p.selling_price, p.code)) }} + {%- endfor %} +
+ {%- endif -%} + {%- endfor %}
{% endblock %} @@ -101,13 +105,13 @@ {% endblock %}