From 09caaed60efbf525d7eadb73887b50843bd2d9bd Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Mon, 12 Apr 2021 17:30:01 -0700 Subject: prefer contrib.creator.display_name over contrib.raw_name These will be getting updates from ORCID and are usually more complete and more correct for display, attribution, and search purposes. Might need to tweak fuzzycat code to handle multiple names at the verification stage. --- python/fatcat_web/templates/entity_base.html | 4 ++-- python/fatcat_web/templates/release_view_contribs.html | 11 ++++++++--- 2 files changed, 10 insertions(+), 5 deletions(-) (limited to 'python/fatcat_web/templates') diff --git a/python/fatcat_web/templates/entity_base.html b/python/fatcat_web/templates/entity_base.html index f30df0da..36280f5d 100644 --- a/python/fatcat_web/templates/entity_base.html +++ b/python/fatcat_web/templates/entity_base.html @@ -65,8 +65,8 @@

{% if entity._authors and entity._authors != [] %} by {% for contrib in entity._authors[:12] %} - {% if contrib.creator_id %} - {{ contrib.raw_name }}{% if not loop.last %}, {% endif %} + {% if contrib.creator_id and contrib.creator and contrib.creator.display_name %} + {{ contrib.creator.display_name }}{% if not loop.last %}, {% endif %} {% else %} {% if contrib.raw_name != None %}{{ contrib.raw_name }}{% else %}Unknown{% endif %}{% if not loop.last %}, {% endif %} {% endif %} diff --git a/python/fatcat_web/templates/release_view_contribs.html b/python/fatcat_web/templates/release_view_contribs.html index 55cdf133..f4969e32 100644 --- a/python/fatcat_web/templates/release_view_contribs.html +++ b/python/fatcat_web/templates/release_view_contribs.html @@ -12,12 +12,17 @@ {% for contrib in release.contribs %} {% if contrib.index or contrib.index == 0 %} {{ contrib.index + 1 }}{% endif %}