Another tiny template improvement

This commit is contained in:
Skia 2016-10-12 12:32:04 +02:00
parent 0d8bebcd80
commit 5931351c0a
2 changed files with 33 additions and 12 deletions

View File

@ -154,6 +154,11 @@ code {
display: inline-block; display: inline-block;
margin: 4px; margin: 4px;
} }
.important {
font-size: 1.2em;
font-weight: bold;
color: red;
}
table { table {
width: 100%; width: 100%;
font-size: 0.90em; font-size: 0.90em;

View File

@ -34,18 +34,20 @@
<div id="bar_ui"> <div id="bar_ui">
<h5>{% trans %}Selling{% endtrans %}</h5> <h5>{% trans %}Selling{% endtrans %}</h5>
<div> <div>
{% if request.session['too_young'] %} <div class="important">
<p><strong>{% trans %}Too young for that product{% endtrans %}</strong></p> {% if request.session['too_young'] %}
{% endif %} <p><strong>{% trans %}Too young for that product{% endtrans %}</strong></p>
{% if request.session['not_allowed'] %} {% endif %}
<p><strong>{% trans %}Not allowed for that product{% endtrans %}</strong></p> {% if request.session['not_allowed'] %}
{% endif %} <p><strong>{% trans %}Not allowed for that product{% endtrans %}</strong></p>
{% if request.session['no_age'] %} {% endif %}
<p><strong>{% trans %}No date of birth provided{% endtrans %}</strong></p> {% if request.session['no_age'] %}
{% endif %} <p><strong>{% trans %}No date of birth provided{% endtrans %}</strong></p>
{% if request.session['not_enough'] %} {% endif %}
<p><strong>{% trans %}Not enough money{% endtrans %}</strong></p> {% if request.session['not_enough'] %}
{% endif %} <p><strong>{% trans %}Not enough money{% endtrans %}</strong></p>
{% endif %}
</div>
<form method="post" action="{{ url('counter:click', counter_id=counter.id, user_id=customer.user.id) }}"> <form method="post" action="{{ url('counter:click', counter_id=counter.id, user_id=customer.user.id) }}">
{% csrf_token %} {% csrf_token %}
<input type="hidden" name="action" value="code"> <input type="hidden" name="action" value="code">
@ -66,6 +68,20 @@
{% endfor %} {% endfor %}
</ul> </ul>
<p><strong>{% trans %}Total: {% endtrans %}{{ "%0.2f"|format(basket_total) }} €</strong></p> <p><strong>{% trans %}Total: {% endtrans %}{{ "%0.2f"|format(basket_total) }} €</strong></p>
<div class="important">
{% if request.session['too_young'] %}
<p><strong>{% trans %}Too young for that product{% endtrans %}</strong></p>
{% endif %}
{% if request.session['not_allowed'] %}
<p><strong>{% trans %}Not allowed for that product{% endtrans %}</strong></p>
{% endif %}
{% if request.session['no_age'] %}
<p><strong>{% trans %}No date of birth provided{% endtrans %}</strong></p>
{% endif %}
{% if request.session['not_enough'] %}
<p><strong>{% trans %}Not enough money{% endtrans %}</strong></p>
{% endif %}
</div>
<form method="post" action="{{ url('counter:click', counter_id=counter.id, user_id=customer.user.id) }}"> <form method="post" action="{{ url('counter:click', counter_id=counter.id, user_id=customer.user.id) }}">
{% csrf_token %} {% csrf_token %}
<input type="hidden" name="action" value="finish"> <input type="hidden" name="action" value="finish">