From b0223b6e10706554e55e5d90f36d1946d285c3e2 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Wed, 4 Sep 2019 11:01:06 -0700 Subject: webface: improve container sidebar style --- python/fatcat_web/templates/container_view.html | 125 ++++++++++++++++-------- 1 file changed, 84 insertions(+), 41 deletions(-) (limited to 'python/fatcat_web') diff --git a/python/fatcat_web/templates/container_view.html b/python/fatcat_web/templates/container_view.html index ac304e95..87e70f2b 100644 --- a/python/fatcat_web/templates/container_view.html +++ b/python/fatcat_web/templates/container_view.html @@ -3,6 +3,18 @@ {% import "entity_macros.html" as entity_macros %} {% extends "entity_base.html" %} +{% macro progress_color(frac) -%} +{% if frac >= 1 %} +green +{% elif frac > 0.95 %} +olive +{% elif frac < 0.5 %} +red +{% else %} +yellow +{% endif %} +{%- endmacro %} + {% block entity_main %}
@@ -43,53 +55,77 @@
+
+ {% if container._es and container._es.is_oa == True %} + Open Access Publisher + {% elif container._es and container._es.is_oa == False %} + Not Open Access + {% else %} + Unknown OA Status + {% endif %} +
-{% if container._es and container._es.is_oa == True %} -Open Access Publisher -{% elif container._es and container._es.is_oa == False %} -Not Open Access -{% else %} -Unknown OA Status +{% if container._stats %} +
+
+
+
{{ "{:,}".format(container._stats.total) }}
+
Known Releases
+
+
+ {% if container._stats.total >= 1 %} + + {% set frac_kbart = container._stats.in_kbart/container._stats.total %} + {% set frac_preserved = container._stats.is_preserved/container._stats.total %} + {% set frac_web = container._stats.in_web/container._stats.total %} + +
+
+
{{ "{:.1f}".format(frac_kbart*100) }}%
+
+
+ {{ "{:,}".format(container._stats.in_kbart ) }} preserved (dark) + +
+
+
{{ "{:.1f}".format(frac_preserved*100) }}%
+
+
+ {{ "{:,}".format(container._stats.is_preserved) }} preserved or available + +
+
+
{{ "{:.1f}".format(frac_web*100) }}%
+
+
+ {{ "{:,}".format(container._stats.in_web) }} fulltext available to read + + {% endif %} +
{% endif %} -
{% if container.issnl != None or container.wikidata_qid != None %} -{% if container.issnl != None %} - ISSN-L? -  {{ container.issnl }} - {% if container.extra != None and container.extra.ISSNp != None and (container.extra.ISSNp|length > 0) %} -
Print:  {{ container.extra.ISSNp }} +
+ {% if container.issnl != None %} + ISSN-L? +  {{ container.issnl }} + {% endif %} + {% if container.extra != None and container.extra.issnp != None and (container.extra.issnp|length > 0) %} +
Print:  {{ container.extra.issnp }} {% endif %} - {% if container.extra != None and container.extra.ISSNe != None and (container.extra.ISSNe|length > 0) %} -
Electronic:  {{ container.extra.ISSNe }} + {% if container.extra != None and container.extra.issne != None and (container.extra.issne|length > 0) %} +
Electronic:  {{ container.extra.issne }} {% endif %}
-{% endif %} -{% if container.wikidata_qid != None %} - Wikidata  {{ container.wikidata_qid }} -{% endif %} -
-{% endif %} - -{% if container._stats %} -Release Counts
- {{ "{:,}".format(container._stats.total) }} total - {% if container._stats.total >= 1 %} -
{{ "{:,}".format(container._stats.in_kbart ) }} - ({{ "{:.1f}".format(container._stats.in_kbart/container._stats.total*100) }}%) - preserved (dark) -
{{ "{:,}".format(container._stats.is_preserved) }} - ({{ "{:.1f}".format(container._stats.is_preserved/container._stats.total*100) }}%) - preserved or available -
{{ "{:,}".format(container._stats.in_web) }} - ({{ "{:.1f}".format(container._stats.in_web/container._stats.total*100) }}%) - fulltext available to read + {% if container.wikidata_qid != None %} + Wikidata  {{ container.wikidata_qid }} {% endif %} -
+
{% endif %} {% if (container._es and container._es != None) %} +
Directory Listings
{% if container._es.in_doaj == True %} In DOAJ
@@ -112,14 +148,21 @@ {% if container.extra and container.extra.sherpa_romeo and container.extra.sherpa_romeo.color %} SHERPA/RoMEO color: {{ container.extra.sherpa_romeo.color }} {% endif %} -
+
{% endif %} -Lookup Links -
SHERPA/RoMEO (access policies) -{% if not container.wikidata_qid %} -
wikidata.org -{% endif %} +
+
Lookup Links
+
+ {% if container.issnl %} + ISSN Portal
+ The Keepers Registry (preservation)
+ SHERPA/RoMEO (access policies)
+ {% endif %} + {% if not container.wikidata_qid %} +
wikidata.org + {% endif %} +
{{ entity_macros.fatcat_bits(entity, "container", "", editgroup) }} -- cgit v1.2.3