From a8d260a0ef20e92f5ddf8bcb945cdbd0de6c501a Mon Sep 17 00:00:00 2001 From: Frederick Yin Date: Wed, 27 Oct 2021 10:07:45 +0800 Subject: Split umbrellas.html into desktop and mobile view Because the difference is friggin massive --- jimbrella/templates/admin/umbrellas.html | 114 +---------------------- jimbrella/templates/admin/umbrellas_desktop.html | 53 +++++++++++ jimbrella/templates/admin/umbrellas_mobile.html | 62 ++++++++++++ jimbrella/templates/auth.html | 29 ++++++ 4 files changed, 145 insertions(+), 113 deletions(-) create mode 100644 jimbrella/templates/admin/umbrellas_desktop.html create mode 100644 jimbrella/templates/admin/umbrellas_mobile.html create mode 100644 jimbrella/templates/auth.html (limited to 'jimbrella/templates') diff --git a/jimbrella/templates/admin/umbrellas.html b/jimbrella/templates/admin/umbrellas.html index 3a1455e..09b329a 100644 --- a/jimbrella/templates/admin/umbrellas.html +++ b/jimbrella/templates/admin/umbrellas.html @@ -23,119 +23,7 @@

All Umbrellas

{% include "admin/tabs.html" %} - {% if mobile %} -
- - {% for umb in umbrellas %} - {% if umb.serial == edit %} - - - - - - - - - - - - - - - - - - {% else %} - {# not edit mode #} - {% if umb.status in ["lent", "overdue"] %} - - - - - - - - - {% else %} - - - - {% endif %} - {% endif %} - {% endfor %} -
- {{ umb.serial }}
- {{ status_dropdown(umb) }}
- -
- {{ umb.lent_time_ago_str }} - {% if umb.status in ["lent", "overdue"] %} ago {% endif %} -
- {{ umb.serial }}
- {{ umb.status }}
- Edit -
{{ umb.tenant_name }}
{{ umb.tenant_id }}
{{ umb.tenant_phone }}
{{ umb.lent_at_str }}
- {{ umb.lent_time_ago_str }} - {% if umb.status in ["lent", "overdue"] %} ago {% endif %} -
- {{ umb.serial }}
- {{ umb.status }}
- Edit -
-
- {% else %} - {# not mobile #} -
- - - - - - - - - - - - - {% for umb in umbrellas %} - - {% if umb.serial == edit %} - - - - - - - - - - - - {% else %} - - - - - - - - - {% endif %} - - {% endfor %} - -
#StatusTenantIDPhoneLent at
{{ umb.serial }}{{ status_dropdown(umb) }}{{ umb.lent_time_ago_str }} - {% if umb.status in ["lent", "overdue"] %} ago {% endif %} - - - {{ umb.serial }}{{ umb.status }}{{ umb.tenant_name }}{{ umb.tenant_id }}{{ umb.tenant_phone }}{{ umb.lent_at_str }}{{ umb.lent_time_ago_str }} - {% if umb.status in ["lent", "overdue"] %} ago {% endif %} - - Edit -
-
- {% endif %} + {% block table %}{% endblock %}
diff --git a/jimbrella/templates/admin/umbrellas_desktop.html b/jimbrella/templates/admin/umbrellas_desktop.html new file mode 100644 index 0000000..c8b0044 --- /dev/null +++ b/jimbrella/templates/admin/umbrellas_desktop.html @@ -0,0 +1,53 @@ +{% extends "admin/umbrellas.html" %} +{% block table %} +
+ + + + + + + + + + + + + {% for umb in umbrellas %} + + {% if umb.serial == edit %} + + + + + + + + + + + + {% else %} + + + + + + + + + {% endif %} + + {% endfor %} + +
#StatusTenantIDPhoneLent at
{{ umb.serial }}{{ status_dropdown(umb) }}{{ umb.lent_time_ago_str }} + {% if umb.status in ["lent", "overdue"] %} ago {% endif %} + + + {{ umb.serial }}{{ umb.status }}{{ umb.tenant_name }}{{ umb.tenant_id }}{{ umb.tenant_phone }}{{ umb.lent_at_str }}{{ umb.lent_time_ago_str }} + {% if umb.status in ["lent", "overdue"] %} ago {% endif %} + + Edit +
+
+{% endblock %} diff --git a/jimbrella/templates/admin/umbrellas_mobile.html b/jimbrella/templates/admin/umbrellas_mobile.html new file mode 100644 index 0000000..3c63418 --- /dev/null +++ b/jimbrella/templates/admin/umbrellas_mobile.html @@ -0,0 +1,62 @@ +{% extends "admin/umbrellas.html" %} +{% block table %} +
+ + {% for umb in umbrellas %} + {% if umb.serial == edit %} + + + + + + + + + + + + + + + + + + {% else %} + {# not edit mode #} + {% if umb.status in ["lent", "overdue"] %} + + + + + + + + + {% else %} + + + + {% endif %} + {% endif %} + {% endfor %} +
+ {{ umb.serial }}
+ {{ status_dropdown(umb) }}
+ +
+ {{ umb.lent_time_ago_str }} + {% if umb.status in ["lent", "overdue"] %} ago {% endif %} +
+ {{ umb.serial }}
+ {{ umb.status }}
+ Edit +
{{ umb.tenant_name }}
{{ umb.tenant_id }}
{{ umb.tenant_phone }}
{{ umb.lent_at_str }}
+ {{ umb.lent_time_ago_str }} + {% if umb.status in ["lent", "overdue"] %} ago {% endif %} +
+ {{ umb.serial }}
+ {{ umb.status }}
+ Edit +
+
+{% endblock %} diff --git a/jimbrella/templates/auth.html b/jimbrella/templates/auth.html new file mode 100644 index 0000000..9fb1e14 --- /dev/null +++ b/jimbrella/templates/auth.html @@ -0,0 +1,29 @@ + + + + JI Umbrella + + + + + {% if action == "login" %} +

Login to JI Umbrella

+ {% else %} +

Register for JI Umbrella

+ {% endif %} + +
+ {% include "admin/tabs.html" %} + +
+ + -- cgit v1.2.3