48 lines
1.7 KiB
HTML
48 lines
1.7 KiB
HTML
{% extends 'base.html' %}
|
|
{% load i18n %}
|
|
{% load crispy_forms_tags %}
|
|
{% block title %}
|
|
{% trans "Wishlist" %}
|
|
{% endblock %}
|
|
{% block content %}
|
|
<div class="mb-3">
|
|
<h1>{{ title }}</h1>
|
|
</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 %}
|
|
<div class="alert alert-warning" role="alert">{% trans "There are currently no wishes!" %}</div>
|
|
{% endif %}
|
|
</div>
|
|
{% if form %}
|
|
<hr class="mb-5"/>
|
|
<div class="mb-3">
|
|
<h3>
|
|
<i class="fas fa-star"></i> {% trans "New wish" %}
|
|
</h3>
|
|
<form method="post" enctype="multipart/form-data">
|
|
{% csrf_token %}
|
|
{{ form|crispy }}
|
|
<button type="submit" class="btn btn-pfl">{% trans "Add" %}</button>
|
|
</form>
|
|
</div>
|
|
{% endif %}
|
|
{% endblock %}
|