Skip to content

Commit

Permalink
Merge pull request #5364 from jamesachamp/5284/bug/new-author-links
Browse files Browse the repository at this point in the history
Add new remote ID links to author pages
  • Loading branch information
cdrini committed Jun 28, 2021
2 parents ccaf7d4 + bf3ff60 commit c682bf1
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions openlibrary/templates/type/author/view.html
Original file line number Diff line number Diff line change
Expand Up @@ -171,14 +171,11 @@ <h3>$:_('Links <span class="gray small sansserif">(outside Open Library)')</span
$if page.links or page.remote_ids or (page.wikipedia and page.wikipedia.startswith("http")):
<ul class="booklinks sansserif">
$if page.remote_ids:
$if page.remote_ids.isni:
$ isni = page.remote_ids.isni
<li>ISNI: <a itemprop="sameAs" href="http://www.isni.org/$isni">$' '.join([isni[i:i+4] for i in range(0, 16, 4)])</a></li>
$if page.remote_ids.viaf:
$ viaf = page.remote_ids.viaf
<li>VIAF: <a itemprop="sameAs" href="https://viaf.org/viaf/$viaf">$viaf</a></li>
$if page.remote_ids.wikidata:
<li>Wikidata: <a itemprop="sameAs" href="https://tools.wmflabs.org/reasonator/?q=$page.remote_ids.wikidata">$page.remote_ids.wikidata</a></li>
$ configured_ids = get_author_config()['identifiers']
$for id in configured_ids:
$if id.name in page.remote_ids:
$ href = id.url.replace('@@@', page.remote_ids[id.name])
<li>$id.label: <a itemprop="sameAs" href="$href">$page.remote_ids[id.name]</a></li>
$if page.wikipedia and page.wikipedia.startswith("http"):
<li><a itemprop="sameAs" href="$page.wikipedia">Wikipedia</a></li>
$for link in page.links:
Expand Down

0 comments on commit c682bf1

Please sign in to comment.