diff options
Diffstat (limited to 'jimbrella/templates/admin/umbrellas_mobile.html')
-rw-r--r-- | jimbrella/templates/admin/umbrellas_mobile.html | 62 |
1 files changed, 62 insertions, 0 deletions
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 %} +<div class="data-table-container"> + <table class="data"> + {% for umb in umbrellas %} + {% if umb.serial == edit %} + <form method="post" action="/admin/umbrellas/edit"> + <input name="serial" type="number" value="{{ umb.serial }}" hidden /> + <tr id="{{ umb.serial }}" class="{{ umb.status }}"> + <th rowspan=5> + {{ umb.serial }} <br /> + {{ status_dropdown(umb) }} <br /> + <input type="submit" value="Submit" /> + </th> + <td><input name="tenant_name" value="{{ umb.tenant_name }}" /></td> + </tr> + <tr class="{{ umb.status }}"> + <td><input name="tenant_id" type="number" value="{{ umb.tenant_id }}" /></td> + </tr> + <tr class="{{ umb.status }}"> + <td><input name="tenant_phone" type="tel" value="{{ umb.tenant_phone }}" /></td> + </tr> + <tr class="{{ umb.status }}"> + <td><input name="lent_at" type="datetime-local" value="{{ 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> + </form> + {% else %} + {# not edit mode #} + {% if umb.status in ["lent", "overdue"] %} + <tr id="{{ umb.serial }}" class="{{ umb.status }}"> + <th rowspan=5> + {{ umb.serial }} <br /> + {{ umb.status }} <br /> + <a href="/admin/umbrellas?edit={{ umb.serial }}">Edit</a> + </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 id="{{ umb.serial }}" class="{{ umb.status }}"> + <th colspan=2> + {{ umb.serial }} <br /> + {{ umb.status }} <br /> + <a href="/admin/umbrellas?edit={{ umb.serial }}#{{ umb.serial }}">Edit</a> + </th> + </tr> + {% endif %} + {% endif %} + {% endfor %} + </table> +</div> +{% endblock %} |