summaryrefslogtreecommitdiff
path: root/jimbrella/templates/admin
diff options
context:
space:
mode:
authorFrederick Yin <fkfd@fkfd.me>2021-10-21 00:21:12 +0800
committerFrederick Yin <fkfd@fkfd.me>2021-10-21 00:21:12 +0800
commitabcde5044ee86b4232b30736634db2368564d5a0 (patch)
tree66c7390e3abb3ce13f41b7c051688366fdce3ebd /jimbrella/templates/admin
parenta4afe5313523fbc726415e2025b409193840709c (diff)
Mobile view for /admin/umbrellas
Diffstat (limited to 'jimbrella/templates/admin')
-rw-r--r--jimbrella/templates/admin/umbrellas.html26
1 files changed, 26 insertions, 0 deletions
diff --git a/jimbrella/templates/admin/umbrellas.html b/jimbrella/templates/admin/umbrellas.html
index 56a5dde..6bb4af5 100644
--- a/jimbrella/templates/admin/umbrellas.html
+++ b/jimbrella/templates/admin/umbrellas.html
@@ -9,6 +9,31 @@
<h1>All Umbrellas</h1>
<div id="container">
{% include "admin/tabs.html" %}
+ {% if mobile %}
+ <div class="data-table-container">
+ <table class="data">
+ {% for umb in umbrellas %}
+ {% if umb.status in ["lent", "overdue"] %}
+ <tr class="{{ umb.status }}">
+ <th rowspan=5>{{ umb.serial }} <br /> {{ umb.status }}</th>
+ <td>{{ umb.tenant_name }}</td>
+ </tr>
+ <tr class="{{ umb.status }}"><td>{{ umb.tenant_id }}</td></tr>
+ <tr class="{{ umb.status }}"><td>{{ umb.tenant_phone }}</td></tr>
+ <tr class="{{ umb.status }}"><td>{{ umb.lent_at_str }}</td></tr>
+ <tr class="{{ umb.status }}"><td>
+ {{ umb.lent_time_ago_str }}
+ {% if umb.status in ["lent", "overdue"] %} ago {% endif %}
+ </td></tr>
+ {% else %}
+ <tr class="{{ umb.status }}">
+ <th colspan=2>{{ umb.serial }} <br /> {{ umb.status }}</th>
+ </tr>
+ {% endif %}
+ {% endfor %}
+ </table>
+ </div>
+ {% else %}
<div class="data-table-container">
<table class="data">
<thead>
@@ -38,6 +63,7 @@
</tbody>
</table>
</div>
+ {% endif %}
</div>
</body>
</html>