diff --git a/i2p2www/anonbib/views.py b/i2p2www/anonbib/views.py index 7ab83451..b98876f1 100644 --- a/i2p2www/anonbib/views.py +++ b/i2p2www/anonbib/views.py @@ -3,7 +3,7 @@ from flask import render_template from i2p2www import ANONBIB_CFG, ANONBIB_FILE from i2p2www.anonbib import BibTeX, config -def papers_list(tag=None, choice=None): +def papers_list(tag='', choice='date'): config.load(ANONBIB_CFG) rbib = BibTeX.parseFile(ANONBIB_FILE) if tag: @@ -31,12 +31,12 @@ def papers_list(tag=None, choice=None): rbib = BibTeX.splitSortedEntriesBy(rbib, 'year') bib = { - 'title': 'Papers on I2P', - 'short_title': 'I2P Papers', - 'otherbibs': '', - 'sectiontypes': sectionType, - 'tag': tag, - 'field': choice, + 'tags': config.ALL_TAGS, + 'tag_titles': config.TAG_TITLES, + 'tag_short_titles': config.TAG_SHORT_TITLES, + 'tag': tag, + 'sectiontypes': sectionType, + 'field': choice, } sections = [] diff --git a/i2p2www/pages/papers/anonbib.cfg b/i2p2www/pages/papers/anonbib.cfg index 809eb780..be14ab8e 100644 --- a/i2p2www/pages/papers/anonbib.cfg +++ b/i2p2www/pages/papers/anonbib.cfg @@ -145,13 +145,13 @@ OMIT_ENTRIES = ("proceedings", "journal") ALL_TAGS = ("selected", ) # Titles of page, by tag. -TAG_TITLES = { "": "The Free Haven Anonymity Bibliography", - "selected": "Free Haven's Selected Papers in Anonymity" +TAG_TITLES = { "": "I2P Bibliography", + "selected": "Selected I2P Papers" } # As TAG_TITLES, but shorter. -TAG_SHORT_TITLES = { "": "Anonymity Bibliography", - "selected": "Selected Papers in Anonymity", +TAG_SHORT_TITLES = { "": "I2P Bibliography", + "selected": "Selected I2P Papers", } # Directories where tag pages get generated. diff --git a/i2p2www/pages/papers/list.html b/i2p2www/pages/papers/list.html index 02eea242..9ef6a770 100644 --- a/i2p2www/pages/papers/list.html +++ b/i2p2www/pages/papers/list.html @@ -1,11 +1,26 @@ {% extends "global/layout.html" %} -{% block title %}{{ bib.title }}{% endblock %} +{% block title %}{{ bib.tag_titles[bib.tag] }}{% endblock %} {% block headextra %} {% endblock %} {% block content %} -

{{ bib.short_title }}

-

{{ bib.otherbibs }}

+

{{ bib.tag_short_titles[bib.tag] }}

+ +

+{%- if bib.tag|length %} +{%- endif %}{{ bib.tag_titles[''] }} +{%- if bib.tag|length %}{% endif %} +{%- for tag in bib.tags %} |  +{%- if tag != bib.tag %} +{%- endif %}{{ bib.tag_titles[tag] }} +{%- if tag != bib.tag %}{% endif %} +{%- endfor -%} +

+

{%- if bib.field != 'topic' %}{% if bib.tag -%}