summaryrefslogtreecommitdiffstats
path: root/fatcat_scholar
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2021-08-12 16:34:35 -0700
committerBryan Newbold <bnewbold@archive.org>2021-08-12 16:34:40 -0700
commitfc841bdf3a43c22b34e8173fae4cd02c376a8e63 (patch)
tree13b2c7a09b536ea421f02ba3d7be065677b2ffec /fatcat_scholar
parente9b4e93a100f1c88ccdc0889d4ac560152572bc7 (diff)
downloadfatcat-scholar-fc841bdf3a43c22b34e8173fae4cd02c376a8e63.tar.gz
fatcat-scholar-fc841bdf3a43c22b34e8173fae4cd02c376a8e63.zip
web: permalink button goes to landing page, if one exists
Old URLs should continue to work.
Diffstat (limited to 'fatcat_scholar')
-rw-r--r--fatcat_scholar/templates/search_macros.html2
1 files changed, 1 insertions, 1 deletions
diff --git a/fatcat_scholar/templates/search_macros.html b/fatcat_scholar/templates/search_macros.html
index f518fcd..45c3c28 100644
--- a/fatcat_scholar/templates/search_macros.html
+++ b/fatcat_scholar/templates/search_macros.html
@@ -473,7 +473,7 @@
</div>
</a>
- <a href="{{ lang_prefix }}/search?q=key:{{ paper.key }}" rel="noopener" title="{{ _('permalink to this record') }}">
+ <a href="{{ lang_prefix }}{% if paper.doc_type == "work" %}/work/{{ paper.work_ident }}{% else %}/search?q=key:{{ paper.key }}{% endif %}" rel="noopener" title="{{ _('permalink to this record') }}">
<div class="circular ui icon compact basic button">
<i class="linkify icon"></i>
</div>