diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2022-02-16 20:04:58 -0800 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2022-03-09 16:09:51 -0800 |
commit | 7f6a03c31d2bae482896243e7468bc1290b1678b (patch) | |
tree | 2ebdd47624ce812b9d88fabbbfccce3ceaf956d2 /python/fatcat_web/templates/edit_macros.html | |
parent | e4cbe43692a9c26911ea54ee88d7df0980e1d9fe (diff) | |
download | fatcat-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.html | 10 |
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 %} |