movieclub/templates/watchlist/index.html
Michal Kunc 87086cdce9
All checks were successful
continuous-integration/drone/push Build is passing
Add tests and fix bugs
2023-02-11 22:40:16 +01:00

24 lines
936 B
HTML

{% extends 'base.html' %}
{% block content %}
<div class="container-lg">
<h1>Watchlist</h1>
{% if object_list %}
<ul>
{% for movie in object_list %}
<li>{% if movie.watched %}<i>{% endif %}<a href="{% url 'watchlist:detail' movie.id %}">{{movie.name}}</a>{% if movie.watched %}</i>{% endif %}{% if request.user.is_authenticated and movie not in voted_movies %}<sup>*</sup>{% endif %} &mdash; {{movie.score}}</li>
{% endfor %}
</ul>
{% else %}
<p>No movies yet.</p>
{% endif %}
{% if can_add_movie %}
<h2>Submit new movie</h2>
<form action="{% url 'watchlist:submit' %}" method="post">
{% csrf_token %}
<label class="form-label" for="name">Movie name</label>
<input class="form-control" type="text" id="name" name="name" required>
<input class="btn btn-primary" type="submit" value="Submit">
</form>
{% endif %}
</div>
{% endblock %}