aboutsummaryrefslogtreecommitdiffstats
path: root/python/fatcat_web/templates/entity_macros.html
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2019-08-24 13:58:19 +0200
committerBryan Newbold <bnewbold@robocracy.org>2019-08-24 13:58:19 +0200
commitd186fa7735a0c4947c51b9df2de75770b361dca4 (patch)
treeea2451d524be0d1568999ff49ae7defc986877e2 /python/fatcat_web/templates/entity_macros.html
parentf1a1fc9af060a07029546e7fde51c9c1f24d9fa3 (diff)
downloadfatcat-d186fa7735a0c4947c51b9df2de75770b361dca4.tar.gz
fatcat-d186fa7735a0c4947c51b9df2de75770b361dca4.zip
fix revision JSON entity links in webface side bar
Diffstat (limited to 'python/fatcat_web/templates/entity_macros.html')
-rw-r--r--python/fatcat_web/templates/entity_macros.html16
1 files changed, 15 insertions, 1 deletions
diff --git a/python/fatcat_web/templates/entity_macros.html b/python/fatcat_web/templates/entity_macros.html
index e553fe79..4d6e80f2 100644
--- a/python/fatcat_web/templates/entity_macros.html
+++ b/python/fatcat_web/templates/entity_macros.html
@@ -37,7 +37,21 @@
Revision:
<br><small><code><a href="/{{ entity_type }}/rev/{{ entity.revision }}">{{ entity.revision }}</a></code></small>
{% endif %}
- <br><a href="{% if config.FATCAT_DOMAIN == 'dev.fatcat.wiki' %}http://localhost:9411{% else %}https://api.{{ config.FATCAT_DOMAIN }}{% endif %}/v0/{{ entity_type }}/{{ entity.ident }}{% if expand %}?expand={{ expand}}{% endif %}">As JSON object via API</a>
+ <br><a href="
+ {%- if config.FATCAT_DOMAIN == 'dev.fatcat.wiki' -%}
+ http://localhost:9411
+ {%- else -%}
+ https://api.{{ config.FATCAT_DOMAIN }}
+ {%- endif -%}
+ /v0/{{ entity_type }}
+ {%- if entity.ident -%}
+ /{{ entity.ident }}
+ {%- elif entity.revision -%}
+ /rev/{{ entity.revision }}
+ {% endif %}
+ {% if expand %}?expand={{ expand}}{% endif %}">
+ As JSON object via API
+ </a>
</div>
<div class="two ui buttons bottom attached">