diff options
author | Frederick Yin <fkfd@fkfd.me> | 2021-10-25 00:20:20 +0800 |
---|---|---|
committer | Frederick Yin <fkfd@fkfd.me> | 2021-10-25 00:20:20 +0800 |
commit | da7ec241f13f4fb2b422dd15f87942cacc1659e0 (patch) | |
tree | c5613af5c1f86e344da5fe275a7169efd06968df /jimbrella | |
parent | ab7b7f9b24e6bfdf231e142db64e7ae52cbe7fd3 (diff) |
HTML fragment: admin is taken to the row to edit
Diffstat (limited to 'jimbrella')
-rw-r--r-- | jimbrella/templates/admin/umbrellas.html | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/jimbrella/templates/admin/umbrellas.html b/jimbrella/templates/admin/umbrellas.html index 8c92b4d..3a1455e 100644 --- a/jimbrella/templates/admin/umbrellas.html +++ b/jimbrella/templates/admin/umbrellas.html @@ -30,7 +30,7 @@ {% if umb.serial == edit %} <form method="post" action="/admin/umbrellas/edit"> <input name="serial" type="number" value="{{ umb.serial }}" hidden /> - <tr class="{{ umb.status }}"> + <tr id="{{ umb.serial }}" class="{{ umb.status }}"> <th rowspan=5> {{ umb.serial }} <br /> {{ status_dropdown(umb) }} <br /> @@ -55,7 +55,7 @@ {% else %} {# not edit mode #} {% if umb.status in ["lent", "overdue"] %} - <tr class="{{ umb.status }}"> + <tr id="{{ umb.serial }}" class="{{ umb.status }}"> <th rowspan=5> {{ umb.serial }} <br /> {{ umb.status }} <br /> @@ -71,11 +71,11 @@ {% if umb.status in ["lent", "overdue"] %} ago {% endif %} </td></tr> {% else %} - <tr class="{{ umb.status }}"> + <tr id="{{ umb.serial }}" class="{{ umb.status }}"> <th colspan=2> {{ umb.serial }} <br /> {{ umb.status }} <br /> - <a href="/admin/umbrellas?edit={{ umb.serial }}">Edit</a> + <a href="/admin/umbrellas?edit={{ umb.serial }}#{{ umb.serial }}">Edit</a> </th> </tr> {% endif %} @@ -99,7 +99,7 @@ </thead> <tbody> {% for umb in umbrellas %} - <tr class="{{ umb.status }}"> + <tr id="{{ umb.serial }}" class="{{ umb.status }}"> {% if umb.serial == edit %} <form method="post" action="/admin/umbrellas/edit"> <input name="serial" type="number" value="{{ umb.serial }}" hidden/> @@ -127,7 +127,7 @@ {% if umb.status in ["lent", "overdue"] %} ago {% endif %} </td> <td> - <a href="/admin/umbrellas?edit={{ umb.serial }}">Edit</a> + <a href="/admin/umbrellas?edit={{ umb.serial }}#{{ umb.serial }}">Edit</a> </td> {% endif %} </tr> |