From cb3d10a06c0166c4eb8ec2d48852e4bfc236ef27 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Tue, 27 Jul 2021 17:01:29 -0700 Subject: refs: support for wikipedia outbound refs, and display in tables --- python/fatcat_web/templates/refs_macros.html | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'python/fatcat_web/templates/refs_macros.html') diff --git a/python/fatcat_web/templates/refs_macros.html b/python/fatcat_web/templates/refs_macros.html index 405aca73..ba4d18ad 100644 --- a/python/fatcat_web/templates/refs_macros.html +++ b/python/fatcat_web/templates/refs_macros.html @@ -35,12 +35,26 @@ {% if release %} {{ entity_macros.release_summary(release) }} - {% elif row.ref.target_unstructured %} + {% elif direction == "in" and row.ref.source_wikipedia_article %} + {% set wiki_lang = row.ref.source_wikipedia_article.split(':')[0] %} + {% set wiki_article = ':'.join(row.ref.source_wikipedia_article.split(':')[1:]) %} + + + {{ wiki_article }} + + [wikipedia] + +
+ lang:{{ wiki_lang }}  + [references]  + {% elif direction == "out" and row.ref.target_unstructured %} {{ row.ref.target_unstructured }} {% if row.ref.target_openlibrary_work %} -
openlibrary:{{ row.ref.target_openlibrary_work }}  +
+ openlibrary:{{ row.ref.target_openlibrary_work }}  + [cited-by]  {% endif %} - {% elif row.ref.target_csl %} + {% elif direction == "in" and row.ref.target_csl %} {{ entity_macros.csl_summary(row.ref.target_csl) }} {% else %} blank -- cgit v1.2.3