From 18b4424faba782e136202ab4d41086e79ace1bd7 Mon Sep 17 00:00:00 2001 From: Frederick Yin Date: Sun, 24 Oct 2021 23:12:27 +0800 Subject: Admin can now modify database from web console --- jimbrella/templates/admin/logs.html | 34 ++++++++++++++++++++++++++ jimbrella/templates/admin/umbrellas.html | 42 +++++++++++++++++++++++++++++++- 2 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 jimbrella/templates/admin/logs.html (limited to 'jimbrella/templates/admin') diff --git a/jimbrella/templates/admin/logs.html b/jimbrella/templates/admin/logs.html new file mode 100644 index 0000000..6f0ed71 --- /dev/null +++ b/jimbrella/templates/admin/logs.html @@ -0,0 +1,34 @@ + + + + JI Umbrella + + + + +

JI Umbrella Logs

+
+ {% include "admin/tabs.html" %} +
+ + + + + + + + + + {% for log in logs %} + + + + + + {% endfor %} + +
DateEventNote
{{ log.date_str }}{{ log.description }}{{ log.note }}
+
+
+ + diff --git a/jimbrella/templates/admin/umbrellas.html b/jimbrella/templates/admin/umbrellas.html index 6bb4af5..15b6f02 100644 --- a/jimbrella/templates/admin/umbrellas.html +++ b/jimbrella/templates/admin/umbrellas.html @@ -15,7 +15,11 @@ {% for umb in umbrellas %} {% if umb.status in ["lent", "overdue"] %} - {{ umb.serial }}
{{ umb.status }} + + {{ umb.serial }}
+ {{ umb.status }}
+ Edit + {{ umb.tenant_name }} {{ umb.tenant_id }} @@ -47,8 +51,40 @@ + {% macro status_opt(umb, status) -%} + + {%- endmacro %} + {% for umb in umbrellas %} + {% if umb.serial == edit %} +
+ + {{ umb.serial }} + + + + + + + + {{ umb.lent_time_ago_str }} + {% if umb.status in ["lent", "overdue"] %} ago {% endif %} + + + + +
+ {% else %} {{ umb.serial }} {{ umb.status }} {{ umb.tenant_name }} @@ -58,6 +94,10 @@ {{ umb.lent_time_ago_str }} {% if umb.status in ["lent", "overdue"] %} ago {% endif %} + + Edit + + {% endif %} {% endfor %} -- cgit v1.2.3