summaryrefslogtreecommitdiffstats
path: root/python/fatcat_web/templates
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2019-02-22 14:28:27 -0800
committerBryan Newbold <bnewbold@robocracy.org>2019-02-22 14:28:27 -0800
commiteebce42d74f8c0e5176bf0a0cfa8036f88a3da34 (patch)
tree762fd83d7acde23710029686fef2e021520f72ec /python/fatcat_web/templates
parent56826236f55b78fa1d41935e9a274d44582a4769 (diff)
downloadfatcat-eebce42d74f8c0e5176bf0a0cfa8036f88a3da34.tar.gz
fatcat-eebce42d74f8c0e5176bf0a0cfa8036f88a3da34.zip
rework container page (search, stats)
Diffstat (limited to 'python/fatcat_web/templates')
-rw-r--r--python/fatcat_web/templates/container_view.html39
1 files changed, 35 insertions, 4 deletions
diff --git a/python/fatcat_web/templates/container_view.html b/python/fatcat_web/templates/container_view.html
index ffe01185..1d237023 100644
--- a/python/fatcat_web/templates/container_view.html
+++ b/python/fatcat_web/templates/container_view.html
@@ -13,17 +13,37 @@
<div class="one wide column"></div>
<div class="ten wide column" style="font-size: 16px;">
-<p><b>Publisher:</b>
-{% if container.publisher != None %}{{ container.publisher }}{% else %}<i>Unknown</i>{% endif %}
+<p>
{% if (container.extra != None) and (container.extra['urls'] != None) and (container.extra['urls']|length > 0) %}
-<br><b>Homepage:</b> <a href="{{ container.extra['urls'][0] }}">&nbsp;<code>{{ container.extra['urls'][0] }}</code></a>
+ <a href="{{ container.extra['urls'][0] }}"><code>{{ container.extra['urls'][0] }}</code></a><br>
+{% endif %}
+{% if container.publisher != None %}
+ Published by {{ container.publisher }}
+{% endif %}
+
+{% if container.issnl %}
+<h3>Search Releases from this Container</h3>
+<form class="" role="search" action="/release/search" method="get">
+ <div class="ui form">
+ <div class="ui action input large fluid">
+ <input type="text" placeholder="Search Articles..." name="q" aria-label="search release metadata">
+ <input type="hidden" name="container_issnl" value="{{ container.issnl }}">
+ <button class="ui button">Search</button>
+ </div>
+ </div>
+</form>
{% endif %}
{% if container.extra %}
<h3>Extra Metadata (raw JSON)</h3>
+<table class="ui definition single line fixed compact small unstackable table">
+<tbody>
{% for (key, value) in container.extra.items() %}
-<code><b>{{ key }}:</b> {{ value }}</code><br>
+ <tr><td class="three wide"><code>{{ key }}</code></td>
+ <td class="seven wide"><code>{{ value }}</code>
{% endfor %}
+</tbody>
+</table>
{% endif %}
<!--
@@ -61,6 +81,17 @@ Raw Object:
</div><div class="ui segment attached">
{% endif %}
+{% if container_stats %}
+<b>Release Counts</b><br>
+{{ container_stats.total }} total
+<br>{{ container_stats.is_preserved }}
+(<b>{{ "%.1f"|format(container_stats.is_preserved/container_stats.total*100) }}%</b>)
+preserved or archived
+<br>{{ container_stats.in_web }}
+(<b>{{ "%.1f"|format(container_stats.in_web/container_stats.total*100) }}%</b>)
+fulltext available to read
+ </div><div class="ui segment attached">
+{% endif %}
{% if (container.es and container.es != None) %}
<b>Directory Listings</b><br>