mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-11 12:29:24 +00:00
Continue the counter views
This commit is contained in:
20
counter/templates/counter/counter_click.jinja
Normal file
20
counter/templates/counter/counter_click.jinja
Normal file
@ -0,0 +1,20 @@
|
||||
{% extends "core/base.jinja" %}
|
||||
|
||||
{% macro barman_logout_link(user) %}
|
||||
<form method="post" action="{{ url('counter:logout', counter_id=counter.id) }}" class="inline">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="user_id" value="{{ user.id }}">
|
||||
<button type="submit" name="submit_param" value="submit_value" class="link-button">{{ user.get_display_name() }}</button>
|
||||
</form>
|
||||
{% endmacro %}
|
||||
|
||||
{% block content %}
|
||||
<h3>Counter</h3>
|
||||
<h4>{{ counter }}</h4>
|
||||
<p><strong>Club: </strong> {{ counter.club }}</p>
|
||||
<p><strong>Products: </strong> {{ counter.products.all() }}</p>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
|
||||
|
@ -14,6 +14,19 @@
|
||||
<p><strong>Club: </strong> {{ counter.club }}</p>
|
||||
<p><strong>Products: </strong> {{ counter.products.all() }}</p>
|
||||
|
||||
|
||||
<div>
|
||||
{% if barmen %}
|
||||
<p>Enter client code:</p>
|
||||
<form method="post" action="{{ url('counter:click', counter_id=counter.id) }}">
|
||||
{% csrf_token %}
|
||||
{{ form.as_p() }}
|
||||
<input type="submit" value="CLICK" />
|
||||
</form>
|
||||
{% else %}
|
||||
<p>Please, login</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div>
|
||||
<h3>Barman: </h3>
|
||||
<ul>
|
||||
@ -27,13 +40,6 @@
|
||||
<input type="submit" value="login" />
|
||||
</form>
|
||||
</div>
|
||||
<div>
|
||||
{% if barmen %}
|
||||
<p>Enter client code:</p>
|
||||
{% else %}
|
||||
<p>Please, login</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
|
Reference in New Issue
Block a user