diff options
Diffstat (limited to 'python/fatcat_web/templates/entity_macros.html')
-rw-r--r-- | python/fatcat_web/templates/entity_macros.html | 63 |
1 files changed, 55 insertions, 8 deletions
diff --git a/python/fatcat_web/templates/entity_macros.html b/python/fatcat_web/templates/entity_macros.html index 9b419c41..b801f3c5 100644 --- a/python/fatcat_web/templates/entity_macros.html +++ b/python/fatcat_web/templates/entity_macros.html @@ -267,23 +267,70 @@ {% endmacro %} -{% macro container_search_result_row(entity) -%} +{% macro container_search_result_row(entity, show_stats=False) -%} <div> - <h4 style="margin-top: 1em; margin-bottom: 4px; font-size: 1.1em;"> + {% if show_stats %} + <div style="float: right; margin-left: 0.5em; margin-top:0px; width: 150px; text-align: right;"> + {% if entity.releases_total %} + <b>~{{ "{:,}".format(entity.releases_total) }}</b> releases + {% elif entity.releases_total == 0 %} + <i>(not indexed)</i> + {% endif %} + {% if entity.releases_total %} + {{ preservation_bar({'bright': entity.preservation_bright, 'dark': entity.preservation_dark, 'none': entity.preservation_none, 'total': entity.releases_total}) }} + {% endif %} + </div> + {% endif %} + <h4 style="margin-top: 1em; margin-bottom: 0em; font-size: 1.1em;"> <a href="/container/{{ entity.ident }}" style="color: #2224c7;">{{ entity['name'] }}</a> - {% if entity.is_oa %}<i class="icon unlock orange small"></i>{% endif %} </h4> + {% if entity.original_name %} + <i>{{ entity.original_name }}</i></br> + {% endif %} {% if entity.publisher %} - <h5 style="margin-top: 4px; margin-bottom: 0px; font-size: 1em;">{{ entity.publisher }}</h5> + <a href="/container/search?q=publisher:%22{{ entity.publisher }}%22" style="color: black; margin-top: 0em;">{{ entity.publisher }}</a> + <br> {% endif %} {% if entity.issnl %} - <a href="https://portal.issn.org/resource/ISSN/{{entity.issnl }}" style="color: green;">issn:{{ entity.issnl }}</a> + <a href="https://portal.issn.org/resource/ISSN/{{ entity.issnl }}" style="color: green;">issnl:{{ entity.issnl }}</a> + {% endif %} + {% if entity.wikidata_qid %} + <a href="https://wikidata.org/wiki/{{ entity.wikidata_qid }}" style="color: green;">wikidata:{{ entity.wikidata_qid }}</a> + {% endif %} + {% if entity.dblp_prefix %} + <a href="https://dblp.org/db/{{ entity.dblp_prefix }}/index.html" style="color: green;">dblp:{{ entity.dblp_prefix }}</a> + {% endif %} + {% if entity.ia_sim_collection %} + <a href="https://archive.org/details/{{ entity.ia_sim_collection }}" style="color: green;">[archive.org]</a> + {% elif entity.sim_pubid %} + <a href="https://archive.org/search.php?query=sim_pubid%3A{{ entity.sim_pubid }}%20mediatype%3Acollection" style="color: green;">[archive.org]</a> + {% endif %} + {# too much clutter + {% if entity.country_code %} + <span style="color: black;">country:{{ entity.country_code }}</span> + {% endif %} + {% for lang in entity.languages %} + <span style="color: black;">lang:{{ lang }}</span> + {% endfor %} + {% if entity.any_kbart %} + <span style="color: black;">[KBART]</span> + {% endif %} + <br> + #} + {% if entity.in_doaj %} + <span style="color: #c54e00;">[DOAJ]</span> + {% endif %} + {% if entity.in_road %} + <span style="color: #c54e00;">[ROAD]</span> + {% endif %} + {% if entity.is_oa and not (entity.in_doaj or entity.in_road) %} + <span style="color: #c54e00;">[open-access]</span> {% endif %} - {% if entity.container_type %} - {{ entity.container_type }} + {% if entity.container_type and entity.container_type != "journal" %} + <b>[{{ entity.container_type }}]</b> {% endif %} {% if entity.publication_status and entity.publication_status != "active" %} - {{ entity.publication_status }} + <span style="color: brown;">{{ entity.publication_status }}</span> {% endif %} </div> {% endmacro %} |