From c5f6122b63f40744b6ae44d49495e0e3d886ba52 Mon Sep 17 00:00:00 2001 From: Craig Oates Date: Sat, 18 Dec 2021 05:07:16 +0000 Subject: [PATCH] add .html views to /templates/users (part of Chapter 5). These are new files I created whilst working through Chapter 5. They are just '.html' template files which connect to the new (URL) routes created in Chapter 5. --- templates/users/index.html | 40 ++++++++++++++++++++++++++++ templates/users/show.html | 54 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 94 insertions(+) create mode 100644 templates/users/index.html create mode 100644 templates/users/show.html diff --git a/templates/users/index.html b/templates/users/index.html new file mode 100644 index 0000000..370a0f2 --- /dev/null +++ b/templates/users/index.html @@ -0,0 +1,40 @@ +{% extends "layouts/app.html" %} +{% block title %}{% lisp (title! "list of users") %}{% endblock %} +{% block content %} +

{% lisp (title!) %}

+ +
Add a New User
+{% if users %} + + + + + + + + + + + {% for user in users %} + + + + + + {% endfor %} + +
NumberNameFull NameOperation
{{user.number}}{{user.name}}{{user.full-name}} + Edit | + Delete + +
+{% else %} +

There are no accounts on this site.

+{% endif %} +{% endblock %} diff --git a/templates/users/show.html b/templates/users/show.html new file mode 100644 index 0000000..202aba8 --- /dev/null +++ b/templates/users/show.html @@ -0,0 +1,54 @@ +{% extends "layouts/app.html" %} +{% block title %}{% lisp (title! "User detail") %}{% endblock %} +{% block content %} +

{% lisp (title!) %}

+ +
Edit
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Number{{user.number}}
Name{{user.name}}
Full name{{user.full-name}}
Sex + {% ifequal user.sex 1 %} + Male + {% else %} + Female + {% endifequal %} +
Birthday + {{ user.birthday| + lisp: local-time:timestamp-to-universal| + date: ((:year 4)"/"(:month 2)"/"(:day 2)) }} +
Mail adress{{user.email}}
administrator + {% if user.administrator %} + Yes + {% else %} + No + {% endif %} +
+{% endblock %}