From aba2ef34e5f4cfa7976006ae57e04d58c47c763c Mon Sep 17 00:00:00 2001 From: Christian Heller <c.heller@plomlompom.de> Date: Tue, 3 Dec 2024 04:34:58 +0100 Subject: [PATCH] In /file view, move deletion checkbox out of danger zone. --- src/templates/_base.tmpl | 3 +++ src/templates/file_data.tmpl | 12 ++++++++++-- src/templates/playlist.tmpl | 2 -- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/templates/_base.tmpl b/src/templates/_base.tmpl index 8839067..3f9edf4 100644 --- a/src/templates/_base.tmpl +++ b/src/templates/_base.tmpl @@ -9,6 +9,9 @@ </script> <style> body { background-color: #aaaa00; } +table { width: 100%; } +th { text-align: left; } +td { vertical-align: top; } {% block css %} {% endblock %} </style> diff --git a/src/templates/file_data.tmpl b/src/templates/file_data.tmpl index 15637f4..ceb6c2a 100644 --- a/src/templates/file_data.tmpl +++ b/src/templates/file_data.tmpl @@ -1,17 +1,25 @@ {% extends '_base.tmpl' %} +{% block css %} +td { width: 100%; } +td.flags { text-align: right; } +{% endblock %} + + {% block body %} {{ macros.nav_head(page_names) }} +<form action="/{{page_names.file}}/{{file.digest.b64}}" method="POST" /> <table> <tr><th>path:</th><td>{{file.rel_path}}</td></tr> <tr><th>YouTube ID:</th><td><a href="/{{page_names.yt_result}}/{{file.yt_id}}">{{file.yt_id}}</a></tr> <tr><th>present:</th><td>{% if file.present %}<a href="/{{page_names.download}}/{{file.yt_id}}">yes</a>{% else %}no{% endif %}</td></tr> -</table> -<form action="/{{page_names.file}}/{{file.digest.b64}}" method="POST" /> +<tr><th>flags:</th><td class="flags"> {% for flag_name in flag_names %} {{ flag_name }}: <input type="checkbox" name="{{flag_name}}" {% if file.is_flag_set(flag_name) %}checked {% endif %} /><br /> {% endfor %} +</td></tr> +</table> <input type="submit" /> </form> {% endblock %} diff --git a/src/templates/playlist.tmpl b/src/templates/playlist.tmpl index 507d1c3..e82aff1 100644 --- a/src/templates/playlist.tmpl +++ b/src/templates/playlist.tmpl @@ -29,10 +29,8 @@ window.onload = keep_updated; {% block css %} -table { width: 100%; } #status { text-align: center; font-weight: bold; } th { text-align: center; } -td { vertical-align: top; } td.history { width: 50%; } td.entry_buttons { width: 5em; } {% endblock %} -- 2.30.2