diff options
author | Harald Eilertsen <haraldei@anduin.net> | 2020-08-23 13:24:01 +0200 |
---|---|---|
committer | Harald Eilertsen <haraldei@anduin.net> | 2020-08-23 13:24:01 +0200 |
commit | 0ac32b7e08b270fccc54d93861c025fa01c68a89 (patch) | |
tree | cb2939e0ef8029a46086b5bfaf9f643870e95be3 /templates/film | |
parent | 2e611ce080ce4c9d3bb74ab9cd423a6b123e7043 (diff) | |
download | ramaskrik-social-0ac32b7e08b270fccc54d93861c025fa01c68a89.tar.gz ramaskrik-social-0ac32b7e08b270fccc54d93861c025fa01c68a89.tar.bz2 ramaskrik-social-0ac32b7e08b270fccc54d93861c025fa01c68a89.zip |
Implement adding and listing films.
Diffstat (limited to 'templates/film')
-rw-r--r-- | templates/film/list.tera | 26 | ||||
-rw-r--r-- | templates/film/new.tera | 15 |
2 files changed, 41 insertions, 0 deletions
diff --git a/templates/film/list.tera b/templates/film/list.tera new file mode 100644 index 0000000..e5676b8 --- /dev/null +++ b/templates/film/list.tera @@ -0,0 +1,26 @@ +<!DOCTYPE html> +<html> +<head> +<title>Room list</title> +</head> +<body> +<h1>Films</h1> + +<p> +<a href="/films/new">Add film</a></p> + +{% if films | length <= 0%} +No films defined. +{% else %} +<ul> +{% for r in films -%} + <li> + {% if r.url -%}<a href="{{ r.url }}">{% endif -%} + {{ r.title }} + {% if r.url -%}</a>{% endif -%} + ({{ r.id }}) +{% endfor -%} +</ul> +{% endif %} +</body> +</html> diff --git a/templates/film/new.tera b/templates/film/new.tera new file mode 100644 index 0000000..30d567e --- /dev/null +++ b/templates/film/new.tera @@ -0,0 +1,15 @@ +<!DOCTYPE html> +<html> +<head> +<title>New film</title> +</head> +<body> +<h1>New film</h1> + +<form name="new_film_form" action="/films" method="POST"> + <label for="title">Title: </label><input name="title" type="text"> + <label for="url">Url: </label><input name="url" type="text"> + <input type="submit" value="Save"> +</form> +</body> +</html> |