diff options
author | Frederick Yin <fkfd@fkfd.me> | 2021-10-20 16:31:16 +0800 |
---|---|---|
committer | Frederick Yin <fkfd@fkfd.me> | 2021-10-20 16:31:16 +0800 |
commit | 06b15c08c1b78adf9e26eb738b7a3964199989f1 (patch) | |
tree | b9d8a2c78112ccdd3846166e46d80a26401aa2f1 /jimbrella/templates | |
parent | 27c8be28e00fbf110143d4bc4b949c610f704639 (diff) |
Add page /admin/umbrellas
Lists all umbrellas in a table.
Diffstat (limited to 'jimbrella/templates')
-rw-r--r-- | jimbrella/templates/admin/index.html | 12 | ||||
-rw-r--r-- | jimbrella/templates/admin/umbrellas.html | 40 |
2 files changed, 50 insertions, 2 deletions
diff --git a/jimbrella/templates/admin/index.html b/jimbrella/templates/admin/index.html index 7a62a14..ddbe4e5 100644 --- a/jimbrella/templates/admin/index.html +++ b/jimbrella/templates/admin/index.html @@ -2,18 +2,26 @@ <html> <head> <title>JI Umbrella</title> - <link rel="stylesheet" href="static/jimbrella.css" /> + <link rel="stylesheet" href="/static/jimbrella.css" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> </head> <body> <h1>JI Umbrella Overview</h1> <div id="container"> + <header> + <table class="tabs"> + <tr> + <td><a href="/admin">Overview</a></td> + <td><a href="/admin/umbrellas">All</a></td> + </tr> + </table> + </header> <!--Takes up full width of container--> <div class="banner-container"> {% if overdue %} <div class="banner overdue"> <h2 class="banner-heading">Overdue</h2> - <table> + <table class="data"> <tr> <td>#</td> <td>Tenant</td> diff --git a/jimbrella/templates/admin/umbrellas.html b/jimbrella/templates/admin/umbrellas.html new file mode 100644 index 0000000..c64111e --- /dev/null +++ b/jimbrella/templates/admin/umbrellas.html @@ -0,0 +1,40 @@ +<!DOCTYPE html> +<html> + <head> + <title>JI Umbrella</title> + <link rel="stylesheet" href="/static/jimbrella.css" /> + <meta name="viewport" content="width=device-width, initial-scale=1" /> + </head> + <body> + <h1>All Umbrellas</h1> + <div id="container"> + <table class="data"> + <thead> + <tr> + <th>#</th> + <th>Status</th> + <th>Tenant</th> + <th>ID</th> + <th>Phone</th> + <th colspan=2>Lent at</th> + </tr> + </thead> + <tbody> + {% for umb in umbrellas %} + <tr class="{{ umb.status }}"> + <td>{{ umb.serial }}</td> + <td>{{ umb.status }}</td> + <td>{{ umb.tenant_name }}</td> + <td>{{ umb.tenant_id }}</td> + <td>{{ umb.tenant_phone }}</td> + <td>{{ umb.lent_at_str }}</td> + <td>{{ umb.lent_time_ago_str }} + {% if umb.status == "lent" %} ago {% endif %} + </td> + </tr> + {% endfor %} + </tbody> + </table> + </div> + </body> +</html> |