only show (past) reservations if needed
This commit is contained in:
parent
d38fa95eed
commit
1b5f059899
|
@ -7,20 +7,22 @@
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block default_content %}
|
{% block default_content %}
|
||||||
<div class="card">
|
{% if reservations|length > 0 %}
|
||||||
<div class="card-body">
|
<div class="card">
|
||||||
<h3>Your current numbers</h3>
|
<div class="card-body">
|
||||||
|
<h3>Your current numbers</h3>
|
||||||
|
|
||||||
{% for reservation in reservations %}
|
{% for reservation in reservations %}
|
||||||
<div>
|
<div>
|
||||||
<a href="{{ url_for('phone.reservation_route', reservation_id=reservation.id ) }}">
|
<a href="{{ url_for('phone.reservation_route', reservation_id=reservation.id ) }}">
|
||||||
{{ reservation.number.number }} ➡
|
{{ reservation.number.number }} ➡
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
{% endif %}
|
||||||
|
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
|
@ -32,7 +34,8 @@
|
||||||
<form method="post">
|
<form method="post">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="input-minute">How many minutes do you need this number for?</label>
|
<label for="input-minute">How many minutes do you need this number for?</label>
|
||||||
<input required name="minute" type="number" class="form-control" id="input-minute" aria-describedby="emailHelp"
|
<input required name="minute" type="number" class="form-control" id="input-minute"
|
||||||
|
aria-describedby="emailHelp"
|
||||||
placeholder="5, 10, 60, etc.">
|
placeholder="5, 10, 60, etc.">
|
||||||
<small id="emailHelp" class="form-text text-muted">We'll never share your email with anyone else.</small>
|
<small id="emailHelp" class="form-text text-muted">We'll never share your email with anyone else.</small>
|
||||||
</div>
|
</div>
|
||||||
|
@ -54,21 +57,23 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="card">
|
{% if past_reservations|length > 0 %}
|
||||||
<div class="card-body">
|
<div class="card">
|
||||||
<h3>Past Reservations</h3>
|
<div class="card-body">
|
||||||
|
<h3>Past Reservations</h3>
|
||||||
|
|
||||||
{% for reservation in past_reservations %}
|
{% for reservation in past_reservations %}
|
||||||
<div>
|
<div>
|
||||||
<a href="{{ url_for('phone.reservation_route', reservation_id=reservation.id ) }}" class="mr-3">
|
<a href="{{ url_for('phone.reservation_route', reservation_id=reservation.id ) }}" class="mr-3">
|
||||||
{{ reservation.number.number }} ➡
|
{{ reservation.number.number }} ➡
|
||||||
</a>
|
</a>
|
||||||
ended {{ reservation.end.humanize() }}
|
ended {{ reservation.end.humanize() }}
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
Loading…
Reference in New Issue