pflaenz.li/pflaenzli/pflaenzli/templates/user/wish.html

48 lines
1.7 KiB
HTML
Raw Normal View History

2023-04-16 00:43:56 +02:00
{% extends 'base.html' %}
2023-05-16 23:36:40 +02:00
{% load i18n %}
2023-04-16 00:43:56 +02:00
{% load crispy_forms_tags %}
2023-05-16 23:36:40 +02:00
{% block title %}
{% trans "Wishlist" %}
{% endblock %}
2023-04-16 00:43:56 +02:00
{% block content %}
<div class="mb-3">
2023-05-16 23:36:40 +02:00
<h1>{{ title }}</h1>
2023-04-16 00:43:56 +02:00
</div>
<div class="mb-5">
{% if wishes %}
<ul class="list-group">
{% for wish in wishes %}
<li class="list-group-item d-flex justify-content-between align-items-center">
{{ wish.title }}
{% if own %}
<span>
<form method="post" action="{% url 'delete_wish' wish.id %}">
{% csrf_token %}
<button type="submit" class="btn btn-danger">
<i class="fas fa-trash-alt" aria-hidden="true" title="Delete"></i>
</button>
</form>
</span>
{% endif %}
</li>
{% endfor %}
</ul>
{% else %}
2023-05-16 23:36:40 +02:00
<div class="alert alert-warning" role="alert">{% trans "There are currently no wishes!" %}</div>
2023-04-16 00:43:56 +02:00
{% endif %}
</div>
{% if form %}
<hr class="mb-5"/>
<div class="mb-3">
<h3>
2023-05-16 23:36:40 +02:00
<i class="fas fa-star"></i> {% trans "New wish" %}
2023-04-16 00:43:56 +02:00
</h3>
<form method="post" enctype="multipart/form-data">
{% csrf_token %}
{{ form|crispy }}
2023-05-16 23:36:40 +02:00
<button type="submit" class="btn btn-pfl">{% trans "Add" %}</button>
2023-04-16 00:43:56 +02:00
</form>
</div>
{% endif %}
{% endblock %}