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/umbrellas.html | 42 +++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) (limited to 'jimbrella/templates/admin/umbrellas.html') 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