master
html 42 lines 1.82 KB
Raw
1 {% extends "base.html" %}
2 {% block title %}{{user.name}} - Movie List{% endblock %}
3
4 {% block content %}
5 <h1 class="title" style="text-align: center;">{{user.name}} - Movie List</h1>
6
7 <header>
8 {% if success == True %}
9 <p>Movie updated successfully!</p>
10 {% elif success == False %}
11 <p>Failed to update movie. {{error}}. <br>
12 Please try again!</p>
13 {% elif success == None %}
14 {% endif %}
15
16 </header>
17
18 <img height="200" alt="{{ movie.name }}" src="{{ movie.poster }}">
19 <ul><li>{{ movie.name }} ({{ movie.year }})</li>
20 <li>Director: {{ movie.director }}</li>
21 <li>Plot: {{ movie.plot }}</li>
22 <li>Country: {{ movie.country }}</li>
23 <li>Genre: {{ movie.genre }}</li>
24 <li>Rating: {{ movie.rating }} </li>
25 <li>User Rating: {{ user_movie.user_rating }}</li>
26 {% if user_movie.user_comment %}
27 <li>User Comment: {{ user_movie.user_comment }}</li>
28 {% endif %}
29 <li><form action="/users/{{user.id}}/{{movie.id}}"
30 method="POST">
31 <label for="user_rating">New User Rating:</label>
32 <input type="text" id="user_rating" name="user_rating" min="0.1" max="10.0"
33 step="0.1" required><br><br>
34 <label for="user_comment">New User Comment:</label>
35 <textarea id="user_comment" name="user_comment" rows="4" cols="50"
36 placeholder="Enter your comment"></textarea>
37 <button type="submit">Update</button></form></li>
38 <button type="submit" class="back_button">
39 <a href="/users/{{user.id}}">Back</a></button>
40 </ul>
41
42 {% endblock %}