aboutsummaryrefslogtreecommitdiffstats
path: root/python/fatcat_web/templates/edit_macros.html
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2022-02-16 20:04:58 -0800
committerBryan Newbold <bnewbold@robocracy.org>2022-03-09 16:09:51 -0800
commit7f6a03c31d2bae482896243e7468bc1290b1678b (patch)
tree2ebdd47624ce812b9d88fabbbfccce3ceaf956d2 /python/fatcat_web/templates/edit_macros.html
parente4cbe43692a9c26911ea54ee88d7df0980e1d9fe (diff)
downloadfatcat-7f6a03c31d2bae482896243e7468bc1290b1678b.tar.gz
fatcat-7f6a03c31d2bae482896243e7468bc1290b1678b.zip
web editing: fix links between edit tabs for re-editing behavior
Diffstat (limited to 'python/fatcat_web/templates/edit_macros.html')
-rw-r--r--python/fatcat_web/templates/edit_macros.html10
1 files changed, 5 insertions, 5 deletions
diff --git a/python/fatcat_web/templates/edit_macros.html b/python/fatcat_web/templates/edit_macros.html
index a7cf725b..0d20c6db 100644
--- a/python/fatcat_web/templates/edit_macros.html
+++ b/python/fatcat_web/templates/edit_macros.html
@@ -1,13 +1,13 @@
-{% macro edit_link_bar(entity_type, existing_ident, view) -%}
+{% macro edit_link_bar(entity_type, existing_ident, editgroup, 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>
+ <a class="item" href="{% if editgroup %}/editgroup/{{ editgroup.editgroup_id }}{% endif %}/{{ 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>
+ <a class="item {% if view == 'form' %}active{% endif %}" href="{% if editgroup %}/editgroup/{{ editgroup.editgroup_id }}{% endif %}/{{ 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>
+ <a class="item {% if view == 'toml' %}active{% endif %}" href="{% if editgroup %}/editgroup/{{ editgroup.editgroup_id }}{% endif %}/{{ entity_type }}/{{ existing_ident }}/edit/toml">Edit TOML</a>
+ <a class="red item {% if view == 'delete' %}active{% endif %}" href="{% if editgroup %}/editgroup/{{ editgroup.editgroup_id }}{% endif %}/{{ entity_type }}/{{ existing_ident }}/delete">Delete</a>
</div>
{% endmacro %}