aboutsummaryrefslogtreecommitdiffstats
path: root/python/fatcat_web/templates/edit_macros.html
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2021-02-26 13:58:18 -0800
committerBryan Newbold <bnewbold@robocracy.org>2021-02-26 13:58:18 -0800
commit61e8e3f308c908b526270648a74823cbcb361308 (patch)
treeb45b9bcf894a12ea8dd9b27559cc900ad0cb2166 /python/fatcat_web/templates/edit_macros.html
parent5c88e4a883bfda83394bd9b6982c2f7bdaaad8c2 (diff)
downloadfatcat-61e8e3f308c908b526270648a74823cbcb361308.tar.gz
fatcat-61e8e3f308c908b526270648a74823cbcb361308.zip
web: improve edit form navigation
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] }}