summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2021-01-21 22:25:21 -0800
committerBryan Newbold <bnewbold@archive.org>2021-01-21 22:25:21 -0800
commit39fc53dd8de38f5b6a666e6eb9e0b9a0e210946c (patch)
tree1a3a0540f750a669488087edaae9039b7d039202
parent45000e5d24cd7775980d7c30632b89fdc4eb34ff (diff)
downloadfatcat-scholar-39fc53dd8de38f5b6a666e6eb9e0b9a0e210946c.tar.gz
fatcat-scholar-39fc53dd8de38f5b6a666e6eb9e0b9a0e210946c.zip
doi domain display: handle /help page
-rw-r--r--fatcat_scholar/templates/help.html4
-rw-r--r--fatcat_scholar/templates/search_macros.html7
2 files changed, 8 insertions, 3 deletions
diff --git a/fatcat_scholar/templates/help.html b/fatcat_scholar/templates/help.html
index df514e3..5b8ddc2 100644
--- a/fatcat_scholar/templates/help.html
+++ b/fatcat_scholar/templates/help.html
@@ -128,11 +128,11 @@ apply range queries like <code>year:&gt;1989 year:&lt;2000</code>.{% endtrans %}
<td>{% trans %}Digitized copies of works on microfilm may be linked to experimentally. Access may be limited to controlled lending{% endtrans %}</td>
</tr>
<tr>
- <td>{{ search_macros.doi_access_button({'doi': '#'}, is_oa=False) }}</td>
+ <td>{{ search_macros.doi_access_button({'biblio': {'doi': '#'}}, is_oa=False) }}</td>
<td>{% trans %}A publisher landing page is the authoriative source for the "version of record" of a research publication, but content is not always accessible to the general public{% endtrans %}</td>
</tr>
<tr>
- <td>{{ search_macros.doi_access_button({'doi': '#'}, is_oa=True) }}</td>
+ <td>{{ search_macros.doi_access_button({'biblio': {'doi': '#'}}, is_oa=True) }}</td>
<td>{% trans %}When the work is from an Open Access publication (sometimes known as "Gold" or "Diamond" OA), and the publisher is expected to provide access to all readers, the button has an orange "unlocked" icon{% endtrans %}</td>
</tr>
<tr>
diff --git a/fatcat_scholar/templates/search_macros.html b/fatcat_scholar/templates/search_macros.html
index 25ba7f5..2f8ddc7 100644
--- a/fatcat_scholar/templates/search_macros.html
+++ b/fatcat_scholar/templates/search_macros.html
@@ -108,7 +108,12 @@
{% else %}
<i class="external alternate icon"></i>
{% endif %}
- {{ paper._obj.biblio.doi_link_domain("Publisher / doi.org") }}
+ {% set default_domain = "Publisher / doi.org" %}
+ {% if paper._obj and paper._obj.biblio %}
+ {{ paper._obj.biblio.doi_link_domain(default_domain) }}
+ {% else %}
+ {{ default_domain }}
+ {% endif %}
</button>
</a>
{% endif %}