split drinks by with/without alcohol + disable direct-cash button for anonym
This commit is contained in:
@@ -57,19 +57,25 @@
|
||||
<input type="radio" name="booking_mode" value="for_free" />
|
||||
<span>Gratis (z.B. Artists am Spieltag)</span>
|
||||
</label>
|
||||
<label class="for-free-toggle">
|
||||
<input type="radio" name="booking_mode" value="cash_paid" />
|
||||
<span>Direkt bar bezahlt</span>
|
||||
</label>
|
||||
<div class="drink-grid">
|
||||
{% for drink in drinks %}
|
||||
<button type="submit" name="drink_id" value="{{ drink.id }}" class="drink-btn drink-btn-{{ drink.category }}">
|
||||
<span class="drink-plus">+1</span>
|
||||
<span class="drink-name">{{ drink.name }}</span>
|
||||
<span class="drink-price">{{ drink.sale_price_per_bottle|floatformat:2 }} €</span>
|
||||
</button>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% if not is_anonymous_target %}
|
||||
<label class="for-free-toggle">
|
||||
<input type="radio" name="booking_mode" value="cash_paid" />
|
||||
<span>Direkt bar bezahlt</span>
|
||||
</label>
|
||||
{% endif %}
|
||||
{% regroup drinks by alcohol_label as drink_groups %}
|
||||
{% for group in drink_groups %}
|
||||
<h4 class="drink-group-heading">{{ group.grouper }}</h4>
|
||||
<div class="drink-grid">
|
||||
{% for drink in group.list %}
|
||||
<button type="submit" name="drink_id" value="{{ drink.id }}" class="drink-btn drink-btn-{{ drink.category }}">
|
||||
<span class="drink-plus">+1</span>
|
||||
<span class="drink-name">{{ drink.name }}</span>
|
||||
<span class="drink-price">{{ drink.sale_price_per_bottle|floatformat:2 }} €</span>
|
||||
</button>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</form>
|
||||
</section>
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user