From 3375483dbfa09d3621d423a47d2fdf3193487ab4 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Tue, 15 Feb 2022 19:55:12 -0800 Subject: web: update container landing page --- python/fatcat_web/templates/container_view.html | 107 ++++++++++++++---------- python/fatcat_web/templates/entity_base.html | 4 + 2 files changed, 65 insertions(+), 46 deletions(-) (limited to 'python') diff --git a/python/fatcat_web/templates/container_view.html b/python/fatcat_web/templates/container_view.html index abb31e06..db458589 100644 --- a/python/fatcat_web/templates/container_view.html +++ b/python/fatcat_web/templates/container_view.html @@ -8,23 +8,13 @@
-{% if (container.extra != None) and (container.extra['urls'] != None) and (container.extra['urls']|length > 0) %} -
- {{ container.extra['urls'][0] }} -
-{% elif (container.extra != None) and (container.extra['webarchive_urls'] != None) and (container.extra['webarchive_urls']|length > 0) %} -{# fallback to a webarchive URL if no valid/live homepage URL #} -
- {{ container.extra['webarchive_urls'][0] }} -
-{% endif %} -

-{% if container.publisher != None %} - Published by {{ container.publisher }} +{% if container.container_type %} + {% set pub_type_phrase = container.container_type %} +{% else %} + {% set pub_type_phrase = '"container" (a publication venue)' %} {% endif %} -{% if container.state == "active" %} -

Search Content

+{% if container.state == 'active' %}
@@ -35,14 +25,30 @@ {% endif %} +{% if (container.extra != None) and (container.extra['urls'] or container.extra['webarchive_urls']) %} +

Homepage URLs

+ + + {% for url in container.extra['urls'] or [] %} + + {% endfor %} + {% for url in container.extra['webarchive_urls'] or [] %} + + {% endfor %} + +
{{ url }}
{{ url }}
+{% endif %} + {% if container._random_releases %} -

Example Publications

+

Example Publications

{% for random_release in container._random_releases %} {{ entity_macros.release_search_result_row(random_release) }} {% endfor %} {% endif %}
+ +{# start right-hand entity column #}
{% if container._stats %} @@ -54,37 +60,45 @@
+{% endif %} {% if container._es and container._es.is_oa == True %}
Open Access Publication
+{% endif %} +{% if container._stats and container._stats.total >= 1 %} +
+ Preservation Summary [more]
+ {{ entity_macros.preservation_bar(container._stats.preservation) }} + {{ entity_macros.preservation_small_table(container._stats.preservation) }} +
{% endif %} -{% if container._stats.total >= 1 %} -
- Preservation Status
- {{ entity_macros.preservation_bar(container._stats.preservation) }} - {{ entity_macros.preservation_small_table(container._stats.preservation) }} -
-
- Work Types
- + +{% if container._stats and container._stats.total >= 1 %} +
+ Release Types
+ {% if container._stats.total >= 1 %} +
{% for type_row in container._stats.release_type %}
+ {% if type_row == "_unknown" %}unknown-type{% else %}{{ type_row }}{% endif %} + {% if type_row == "_unknown" %} - unknown-type + {% else %} - {{ type_row }} + {% endif %} - {{ "{:,}".format(container._stats.release_type[type_row]) }} + {{ "{:,}".format(container._stats.release_type[type_row]) }} + {% endfor %}
-
-{% endif %} + {% endif %} +
{% endif %} {% if container.container_type != None or container.publication_status != None %} @@ -95,6 +109,9 @@ {% if container.publication_status != None %} Publication Status  {{ container.publication_status or 'unknown' }}
{% endif %} + {% if container.extra and container.extra.country %} + Country Code  {{ container.extra.country }}
+ {% endif %} {% endif %} @@ -102,17 +119,22 @@
{% if container.issnl != None %} ISSN-L? -  {{ container.issnl }} +  {{ container.issnl }}
{% endif %} {% if container.issnp or (container.extra != None and container.extra.issnp != None and (container.extra.issnp|length > 0)) %} -
Print:  {{ container.issnp or container.extra.issnp }} +     Print:  {{ container.issnp or container.extra.issnp }}
{% endif %} {% if container.issne or (container.extra != None and container.extra.issne != None and (container.extra.issne|length > 0)) %} -
Electronic:  {{ container.issne or container.extra.issne }} +     Electronic:  {{ container.issne or container.extra.issne }}
{% endif %} -
{% if container.wikidata_qid != None %} - Wikidata  {{ container.wikidata_qid }} + Wikidata  {{ container.wikidata_qid }}
+ {% endif %} + {% if container.extra and container.extra.dblp %} + dblp  {{ container.extra.dblp.prefix }}
+ {% endif %} + {% if container.extra and container.extra.ia and container.extra.ia.sim %} + archive.org  sim_pubid:{{ container.extra.ia.sim.sim_pubid }}
{% endif %}
{% endif %} @@ -128,23 +150,15 @@ {% if container._es.in_road == True %} In ISSN ROAD
- {% elif container._es.in_road == False %} - Not in ISSN ROAD
- {% endif %} - - {% if container._es.any_kbart == True %} - In Keepers Registery -
- {% elif container._es.any_kbart == False %} - Not in Keepers Registry
{% endif %} - {% if container.extra and container.extra.sherpa_romeo and container.extra.sherpa_romeo.color %} - SHERPA/RoMEO color: {{ container.extra.sherpa_romeo.color }} + {% if container.extra and container.extra.szczepanski %} + In Szczepanski List
{% endif %} {% endif %} +{# {%- if container.extra and container.extra.kbart %}
Preservation Holdings
@@ -175,6 +189,7 @@ {% endfor %}
{% endif %} +#}
Lookup Links
diff --git a/python/fatcat_web/templates/entity_base.html b/python/fatcat_web/templates/entity_base.html index 633f3aee..626c102a 100644 --- a/python/fatcat_web/templates/entity_base.html +++ b/python/fatcat_web/templates/entity_base.html @@ -75,6 +75,10 @@ {% endif %}
{% endif %} + {% elif entity_type == "container" %} + {% if entity.publisher %} +

{{ entity.publisher }} + {% endif %} {% endif %}

-- cgit v1.2.3