summaryrefslogtreecommitdiffstats
path: root/python/fatcat_web/templates/entity_macros.html
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2020-07-30 20:31:56 -0700
committerBryan Newbold <bnewbold@robocracy.org>2020-07-30 23:45:30 -0700
commit29593e492b632c8884c31993230d258d646e3d8c (patch)
tree377487ac715a48b0d5f2dc1e1d7752ea050ead50 /python/fatcat_web/templates/entity_macros.html
parentbedf147fecf7134fd22ea0ca7c94c5b7d4554416 (diff)
downloadfatcat-29593e492b632c8884c31993230d258d646e3d8c.tar.gz
fatcat-29593e492b632c8884c31993230d258d646e3d8c.zip
routes: handle case of viewing deleted entity in editgroup context
Eg, consider deleting an entity. When viewing the editgroup, want to be able to click the deleted entity and see the "deleted entity" page instead of a generic 404.
Diffstat (limited to 'python/fatcat_web/templates/entity_macros.html')
-rw-r--r--python/fatcat_web/templates/entity_macros.html12
1 files changed, 7 insertions, 5 deletions
diff --git a/python/fatcat_web/templates/entity_macros.html b/python/fatcat_web/templates/entity_macros.html
index 718c071c..0ce646bf 100644
--- a/python/fatcat_web/templates/entity_macros.html
+++ b/python/fatcat_web/templates/entity_macros.html
@@ -33,7 +33,7 @@
{% if entity.state %}
State is "{{ entity.state }}".
{% endif %}
- {% if entity.state != "deleted" %}
+ {% if entity.revision %}
Revision:
<br><small><code><a href="/{{ entity_type }}/rev/{{ entity.revision }}">{{ entity.revision }}</a></code></small>
{% endif %}
@@ -43,11 +43,13 @@
{%- else -%}
https://api.{{ config.FATCAT_DOMAIN }}
{%- endif -%}
- /v0/{{ entity_type }}
- {%- if entity.ident -%}
- /{{ entity.ident }}
+ /v0
+ {%- if editgroup and entity.ident -%}
+ /editgroup/{{ editgroup.editgroup_id }}{# /{{ entity_type }}/{{ entity.ident }} #}
+ {%- elif entity.ident -%}
+ /{{ entity_type }}/{{ entity.ident }}
{%- elif entity.revision -%}
- /rev/{{ entity.revision }}
+ /{{ entity_type }}/rev/{{ entity.revision }}
{% endif %}
{% if expand %}?expand={{ expand}}{% endif %}">
As JSON object via API