diff options
Diffstat (limited to 'templates/screening')
-rw-r--r-- | templates/screening/edit.tera | 39 | ||||
-rw-r--r-- | templates/screening/list.tera | 1 |
2 files changed, 40 insertions, 0 deletions
diff --git a/templates/screening/edit.tera b/templates/screening/edit.tera new file mode 100644 index 0000000..39268fe --- /dev/null +++ b/templates/screening/edit.tera @@ -0,0 +1,39 @@ +<!DOCTYPE html> +<html> +<head> +<title>Edit screening</title> +</head> +<body> +<h1>Edit screening</h1> + +<form name="edit_screening_form" action="/screenings" method="POST"> + <input name="_method" value="PATCH" type="hidden"> + <input name="id" value="{{ screening.id }}" type="hidden"> + + <label for="film_id">Film: </label> + <select name="film_id"> + {% for film in films %} + <option value="{{ film.id }}"{% if film.id == screening.film_id %} selected{% endif %}>{{ film.title }}</option> + {% endfor %} + </select> + + <label for="room_id">Room: </label> + <select name="room_id"> + {% for room in rooms %} + <option value="{{ room.id }}"{% if room.id == screening.room_id %} selected{% endif %}>{{ room.name }}</option> + {% endfor %} + + <label for="date">Date: </label> + <input name="date" type="date" value="{{ screening.start_time | date }}"> + + <label for="start_time">Start time: </label> + <input name="start_time" type="time" value="{{ screening.start_time | date(format="%H:%M") }}"> + + <label for="end_time">End time: </label> + <input name="end_time" type="time" value="{{ screening.end_time | date(format="%H:%M") }}"> + + </select> + <input type="submit" value="Save"> +</form> +</body> +</html> diff --git a/templates/screening/list.tera b/templates/screening/list.tera index 21ef7e2..7112796 100644 --- a/templates/screening/list.tera +++ b/templates/screening/list.tera @@ -25,6 +25,7 @@ No screenings defined. <td>{{ s.film.title }}</td> <td>({{ s.room.name }})</td> <td> + <a href="/screenings/{{ s.id }}">Edit</a> <form class="delete-item" id="delete-screening-{{ s.id }}" action="/screenings" method="POST"> <input name="_method" value="DELETE" type="hidden"> <input name="screening_id" value="{{ s.id }}" type="hidden"> |