aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2021-04-15 23:48:06 -0700
committerBryan Newbold <bnewbold@robocracy.org>2021-07-23 10:55:09 -0700
commit570074b514259bf6345c376faea8128f279bd0b4 (patch)
treea57b73747cb89c79f3cba6fec1183ff6cf95b0eb /python
parent314aba35d06eb80be0c5ffc068774bb9bca38e76 (diff)
downloadfatcat-570074b514259bf6345c376faea8128f279bd0b4.tar.gz
fatcat-570074b514259bf6345c376faea8128f279bd0b4.zip
web: inbound/outbound refs as links (temporarily); change URL names
Diffstat (limited to 'python')
-rw-r--r--python/fatcat_web/ref_routes.py4
-rw-r--r--python/fatcat_web/templates/entity_base.html4
-rw-r--r--python/fatcat_web/templates/release_view_fuzzy_refs.html2
3 files changed, 7 insertions, 3 deletions
diff --git a/python/fatcat_web/ref_routes.py b/python/fatcat_web/ref_routes.py
index dc39299f..bd8ae550 100644
--- a/python/fatcat_web/ref_routes.py
+++ b/python/fatcat_web/ref_routes.py
@@ -18,7 +18,7 @@ from fatcat_web.forms import *
from fatcat_web.entity_helpers import *
-@app.route('/release/<string(length=26):ident>/refs/inbound', methods=['GET'])
+@app.route('/release/<string(length=26):ident>/inbound-refs', methods=['GET'])
def release_view_refs_inbound(ident):
# lookup release ident, ensure it exists
@@ -35,7 +35,7 @@ def release_view_refs_inbound(ident):
return render_template('release_view_fuzzy_refs.html', direction="inbound", entity=release, hits=hits, enriched_refs=enriched_refs), 200
-@app.route('/release/<string(length=26):ident>/refs/outbound', methods=['GET'])
+@app.route('/release/<string(length=26):ident>/outbound-refs', methods=['GET'])
def release_view_refs_outbound(ident):
# lookup release ident, ensure it exists
diff --git a/python/fatcat_web/templates/entity_base.html b/python/fatcat_web/templates/entity_base.html
index 36280f5d..c23dbef2 100644
--- a/python/fatcat_web/templates/entity_base.html
+++ b/python/fatcat_web/templates/entity_base.html
@@ -86,6 +86,10 @@
{% elif entity_type == "release" and entity.state != 'deleted' %}
{{ entity_tab("contribs", "Authors", "/contribs", entity._authors|count ) }}
{{ entity_tab("references", "References", "/references", entity.refs|count) }}
+ {% if entity.state == 'active' %}
+ {{ entity_tab("inbound-refs", "Inbound", "/inbound-refs") }}
+ {{ entity_tab("outbound-refs", "Outbound", "/outbound-refs") }}
+ {% endif %}
{% endif %}
{{ entity_tab("metadata", "Metadata", "/metadata") }}
</div>
diff --git a/python/fatcat_web/templates/release_view_fuzzy_refs.html b/python/fatcat_web/templates/release_view_fuzzy_refs.html
index bc1fa171..9ceb6060 100644
--- a/python/fatcat_web/templates/release_view_fuzzy_refs.html
+++ b/python/fatcat_web/templates/release_view_fuzzy_refs.html
@@ -1,5 +1,5 @@
{% set release = entity %}
-{% set entity_view = "references" %}
+{% set entity_view = "{{ direction }}-refs" %}
{% set entity_type = "release" %}
{% import "entity_macros.html" as entity_macros %}
{% extends "entity_base.html" %}