From d280b1b4fdc57bfd4c0c9cb56fd836d2ae80dbb5 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Fri, 26 Feb 2021 10:29:57 -0800 Subject: web: generic view improvements (entities, lists) --- python/fatcat_web/templates/entity_macros.html | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) (limited to 'python/fatcat_web/templates/entity_macros.html') diff --git a/python/fatcat_web/templates/entity_macros.html b/python/fatcat_web/templates/entity_macros.html index e8a763d2..e68254de 100644 --- a/python/fatcat_web/templates/entity_macros.html +++ b/python/fatcat_web/templates/entity_macros.html @@ -5,15 +5,15 @@
{% if editgroup.changelog_index %} Accepted Edit Version -

This is the version of the entity as of a specific merged editgroup: +

This is the version of the entity as of a specific point in time: {% elif editgroup.submitted %} Submitted Edit Version -

This is a version of the entity that has been submitted for approval as part of an editgroup: +

This is a version of the entity that has been submitted for approval as part of: {% else %} Edit In Progress -

This is a version of the entity that has not yet been submitted for approval, part of an editgroup: +

This is a version of the entity that has not yet been submitted for approval. Part of: {% endif %} - {{ editgroup.editgroup_id }} + editgroup_{{ editgroup.editgroup_id }}

{% elif entity.state == None and entity.ident == None %}
@@ -27,17 +27,15 @@
{% endif %} -
- Fatcat Bits -

- {% if entity.state %} - State is "{{ entity.state }}". +

+ Catalog Record + {% if entity.state and entity.state != "active" %} +
State: {{ entity.state }} {% endif %} {% if entity.revision %} - Revision: -
{{ entity.revision }} +
Revision: {{ entity.revision }} {% endif %} -
- As JSON object via API + JSON
-- cgit v1.2.3 From 8274a975d2db3697eb1d69dd22ddcc33592bbbf7 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Fri, 26 Feb 2021 10:31:08 -0800 Subject: web: release search (SERP) changes - show preservation status instead of fulltext tag - more external identifiers --- python/fatcat_web/templates/entity_macros.html | 29 ++++++++++++++++++++----- python/fatcat_web/templates/release_search.html | 2 +- 2 files changed, 24 insertions(+), 7 deletions(-) (limited to 'python/fatcat_web/templates/entity_macros.html') diff --git a/python/fatcat_web/templates/entity_macros.html b/python/fatcat_web/templates/entity_macros.html index e68254de..204347cd 100644 --- a/python/fatcat_web/templates/entity_macros.html +++ b/python/fatcat_web/templates/entity_macros.html @@ -178,11 +178,20 @@ - {% if paper.best_pdf_url %}
-   fulltext +    + {% if paper.preservation == "bright" %} + {% if paper.best_pdf_url %} + bright archive + {% else %} + bright archive + {% endif %} + {% elif paper.preservation == "dark" %} + dark archive + {% else %} + no archive + {% endif %}
- {% endif %} {# ### AUTHOR ROW #} {% if paper.contrib_names %} @@ -230,15 +239,23 @@ {% if paper.doi %} doi:{{ paper.doi }}   {% endif %} - {% if paper.pmid %} - pmid:{{ paper.pmid }}   - {% endif %} {% if paper.pmcid %} pmcid:{{ paper.pmcid }}   + {% elif paper.pmid %} + pmid:{{ paper.pmid }}   {% endif %} {% if paper.arxiv_id %} arXiv:{{ paper.arxiv_id }}   {% endif %} + {% if paper.jstor_id %} + jstor:{{ paper.jstor_id }}   + {% endif %} + {% if paper.doaj_id %} + doaj:{{ paper.doaj_id }}   + {% endif %} + {% if paper.doaj_id %} + dblp:{{ paper.dblp_id }}   + {% endif %} {# WIP: elastic release work grouping searches
diff --git a/python/fatcat_web/templates/release_search.html b/python/fatcat_web/templates/release_search.html index b1021322..4de56fa2 100644 --- a/python/fatcat_web/templates/release_search.html +++ b/python/fatcat_web/templates/release_search.html @@ -24,7 +24,7 @@
- +

Can also lookup by identifier or search for containers (eg, journals). -- cgit v1.2.3 From 0880e0ecca4e65fd00a4ffafec948873be45193e Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Fri, 26 Feb 2021 12:02:08 -0800 Subject: web: refactor container SERP rows into macro --- python/fatcat_web/templates/container_search.html | 1 + python/fatcat_web/templates/entity_macros.html | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+) (limited to 'python/fatcat_web/templates/entity_macros.html') diff --git a/python/fatcat_web/templates/container_search.html b/python/fatcat_web/templates/container_search.html index bd92dc2b..0c7823b1 100644 --- a/python/fatcat_web/templates/container_search.html +++ b/python/fatcat_web/templates/container_search.html @@ -35,6 +35,7 @@ {{ search_macros.top_results(query, found) }} {% for entity in found.results %} + {{ entity_macros.container_search_result_row(entity) }}

{{ entity['name'] }} diff --git a/python/fatcat_web/templates/entity_macros.html b/python/fatcat_web/templates/entity_macros.html index 204347cd..45f00362 100644 --- a/python/fatcat_web/templates/entity_macros.html +++ b/python/fatcat_web/templates/entity_macros.html @@ -265,6 +265,26 @@

{% endmacro %} + +{% macro container_search_result_row(entity) -%} +
+

+ {{ entity['name'] }} + {% if entity.is_oa %}{% endif %} +

+ {% if entity.publisher %} +
{{ entity.publisher }}
+ {% endif %} + {% if entity.issnl %} + issn:{{ entity.issnl }} + {% endif %} + {% if entity.container_type %} +  {{ entity.container_type }} + {% endif %} +
+{% endmacro %} + + {% macro progress_color(frac) -%} {% if frac >= 1 %} green -- cgit v1.2.3