aboutsummaryrefslogtreecommitdiffstats
path: root/python/fatcat_web/templates/edit_macros.html
diff options
context:
space:
mode:
authorbnewbold <bnewbold@archive.org>2021-02-26 22:33:52 +0000
committerbnewbold <bnewbold@archive.org>2021-02-26 22:33:52 +0000
commitdf79a3dd9ffae5fcb8f32ea331c49ae4e9d998ed (patch)
tree1b4c4b589a43a36c0a11b578d6f4f96c3129213a /python/fatcat_web/templates/edit_macros.html
parent67ee012ccc63ffcd98964ab58b2bcc49c5b6693a (diff)
parenta5e9309c148019539127f41d7fefd722d0ae3bf2 (diff)
downloadfatcat-df79a3dd9ffae5fcb8f32ea331c49ae4e9d998ed.tar.gz
fatcat-df79a3dd9ffae5fcb8f32ea331c49ae4e9d998ed.zip
Merge branch 'bnewbold-202102-tweaks' into 'master'
Feb 2021 web UI/UX tweaks See merge request webgroup/fatcat!96
Diffstat (limited to 'python/fatcat_web/templates/edit_macros.html')
-rw-r--r--python/fatcat_web/templates/edit_macros.html15
1 files changed, 14 insertions, 1 deletions
diff --git a/python/fatcat_web/templates/edit_macros.html b/python/fatcat_web/templates/edit_macros.html
index d4839373..a7cf725b 100644
--- a/python/fatcat_web/templates/edit_macros.html
+++ b/python/fatcat_web/templates/edit_macros.html
@@ -1,4 +1,17 @@
+{% macro edit_link_bar(entity_type, existing_ident, view) -%}
+ {% set has_form = entity_type in ['release', 'file', 'container'] %}
+ <div class="ui {% if has_form %}four{% else %}three{% endif %} item menu">
+ <a class="item" href="/{{ entity_type }}/{{ existing_ident }}">View</a>
+ {% if has_form %}
+ <a class="item {% if view == 'form' %}active{% endif %}" href="/{{ entity_type }}/{{ existing_ident }}/edit">Edit Form</a>
+ {% endif %}
+ <a class="item {% if view == 'toml' %}active{% endif %}" href="/{{ entity_type }}/{{ existing_ident }}/edit/toml">Edit TOML</a>
+ <a class="red item {% if view == 'delete' %}active{% endif %}" href="/{{ entity_type }}/{{ existing_ident }}/delete">Delete</a>
+ </div>
+{% endmacro %}
+
+
{% macro form_field_errors(field) -%}
{% if field.errors %}
<div class="ui pointing red label">
@@ -71,7 +84,7 @@
<div class="menu">
{% for peg in potential_editgroups %}
<div class="item" data-value="{{ peg.editgroup_id }}">
- <div class="right floated">{{ peg.created }}</div>
+ <div class="right floated">{{ peg.created.strftime('%Y-%m-%d %X') }}</div>
<code><b>editgroup_{{ peg.editgroup_id }}</b></code>
{% if peg.description %}
<br>{{ peg.description[:200] }}