diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2022-02-09 17:16:11 -0800 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2022-02-09 18:06:55 -0800 |
commit | d73ab1f7cc45c122f321f0e717de2067554baabb (patch) | |
tree | 1c3b869c710291dcf818d5c2306eebb3f207ffb4 /python/fatcat_web/templates | |
parent | 5bc77c47eed20676cd3db162c9675311f77c6cf9 (diff) | |
download | fatcat-d73ab1f7cc45c122f321f0e717de2067554baabb.tar.gz fatcat-d73ab1f7cc45c122f321f0e717de2067554baabb.zip |
containers: initial work on 'browse' feature
Diffstat (limited to 'python/fatcat_web/templates')
-rw-r--r-- | python/fatcat_web/templates/container_view_browse.html | 32 | ||||
-rw-r--r-- | python/fatcat_web/templates/entity_base.html | 1 |
2 files changed, 33 insertions, 0 deletions
diff --git a/python/fatcat_web/templates/container_view_browse.html b/python/fatcat_web/templates/container_view_browse.html new file mode 100644 index 00000000..b5691899 --- /dev/null +++ b/python/fatcat_web/templates/container_view_browse.html @@ -0,0 +1,32 @@ +{% set container = entity %} +{% set entity_view = "browse" %} +{% set entity_type = "container" %} +{% import "entity_macros.html" as entity_macros %} +{% extends "entity_base.html" %} + +{% block entity_main %} + +{% if entity._browse_volume_year %} +<h2>Browse by Year and Volume</h2> +<ul> +{% for year in entity._browse_volume_year.keys()|sort|reverse %} + {% for volume in entity._browse_volume_year[year].keys()|sort|reverse %} + {% if volume == '_unknown' %} + <li><a href="/container/{{ entity.ident }}/browse?year={{ year }}&volume=">{{ year }}</a> ({{ entity._browse_volume_year[year][volume] }} releases) + {% else %} + <li><a href="/container/{{ entity.ident }}/browse?year={{ year }}&volume={{ volume }}">{{ year }} | Vol. {{ volume }}</a> ({{ entity._browse_volume_year[year][volume] }} releases) + {% endif %} + {% endfor %} +{% endfor %} +</ul> +{% elif entity._browse_issues %} +{% for issue in entity._browse_issues.keys()|sort|reverse %} + <h4>{{ issue }}</h4> + {% for paper in entity._browse_issues[issue] %} + {{ paper.title }}<br> + {% endfor %} +{% endfor %} +{% endif %} + +{% endblock %} + diff --git a/python/fatcat_web/templates/entity_base.html b/python/fatcat_web/templates/entity_base.html index 2782edd5..633f3aee 100644 --- a/python/fatcat_web/templates/entity_base.html +++ b/python/fatcat_web/templates/entity_base.html @@ -82,6 +82,7 @@ <div class="ui small tabular compact menu"> {{ entity_tab("overview", "Overview", "") }} {% if entity_type == "container" and entity.state == 'active' and not editgroup %} + {{ entity_tab("browse", "Browse", "/browse") }} {{ entity_tab("coverage", "Preservation", "/coverage") }} {{ entity_tab("search", "Search", "/search") }} {% elif entity_type == "release" and entity.state != 'deleted' %} |