Implement basic wishlist
This commit is contained in:
parent
d80d667e0d
commit
f2dd4da50b
9 changed files with 315 additions and 0 deletions
36
templates/user/wish.html.twig
Normal file
36
templates/user/wish.html.twig
Normal file
|
@ -0,0 +1,36 @@
|
|||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}Whishlist{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
{% for message in app.flashes('success') %}
|
||||
<div class="alert alert-success" role="alert">
|
||||
{{ message }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
<div class="mb-3">
|
||||
<h1>Your Whishlist</h1>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
{% if wishes == [] %}
|
||||
<div class="alert alert-warning" role="alert">
|
||||
There are currently no wishes!
|
||||
</div>
|
||||
{% else %}
|
||||
<ul class="list-group">
|
||||
{% for wish in wishes %}
|
||||
<li class="list-group-item"> {{ wish.title }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
<div mb-3>
|
||||
<h3><i class="fas fa-star"></i> New wish</h3>
|
||||
{{ form(wish_form) }}
|
||||
</div>
|
||||
{% endblock %}
|
Reference in a new issue