parent
9f7bce2be0
commit
d2ad7b3125
@ -1,26 +1,46 @@
|
|||||||
{% extends "template.html" %}
|
{% extends "template.html" -%}
|
||||||
|
|
||||||
{% block content %}
|
{% block content -%}
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="archive">
|
<div class="archive">
|
||||||
<h1>Archive</h1><br>
|
<h1>Archive</h1><br>
|
||||||
{% set ns = namespace(last_year="") %}
|
{% set ns = namespace(last_year="", last_name="", open_li = False, open_ul = False) -%}
|
||||||
{% for entry in entries %}
|
{% for entry in entries -%}
|
||||||
{% if entry.item.date != ns.last_year %}
|
{% if ns.last_name != entry.item.name and ns.last_name != "" -%}
|
||||||
{% if ns.last_year != "" %}
|
</li>
|
||||||
</ul>
|
{% set ns.open_li = False -%}
|
||||||
{% endif %}
|
{% endif -%}
|
||||||
<h2> {{ entry.item.date }} </h2>
|
{% if entry.item.date != ns.last_year -%}
|
||||||
<ul>
|
{% if ns.last_year != "" -%}
|
||||||
{% endif %}
|
</ul>
|
||||||
{% set ns.last_year = entry.item.date %}
|
{% set ns.open_ul = False -%}
|
||||||
<li>
|
{% endif -%}
|
||||||
{{ entry.item.name }}
|
<h2> {{ entry.item.date }} </h2>
|
||||||
|
<ul>
|
||||||
|
{% set ns.open_ul = True -%}
|
||||||
|
{% endif -%}
|
||||||
|
{% if ns.last_name == entry.item.name and ns.last_year == entry.item.date -%}
|
||||||
|
<br>
|
||||||
<a href="{{ url_for('entry', ident=entry.id) }}">
|
<a href="{{ url_for('entry', ident=entry.id) }}">
|
||||||
{{ r_to_star(entry.rating) }} by {{ entry.user.name }}
|
{{ r_to_star(entry.rating) }} by {{ entry.user.name }}
|
||||||
</a>
|
</a>
|
||||||
</li><br>
|
{% else -%}
|
||||||
{% endfor %}
|
<li>
|
||||||
|
{{ entry.item.name }}<br>
|
||||||
|
<a href="{{ url_for('entry', ident=entry.id) }}">
|
||||||
|
{{ r_to_star(entry.rating) }} by {{ entry.user.name }}
|
||||||
|
</a>
|
||||||
|
{% set ns.open_li = True -%}
|
||||||
|
{% endif -%}
|
||||||
|
{% set ns.last_year = entry.item.date -%}
|
||||||
|
{% set ns.last_name = entry.item.name -%}
|
||||||
|
{% endfor -%}
|
||||||
|
{% if ns.open_li -%}
|
||||||
|
</li>
|
||||||
|
{% endif -%}
|
||||||
|
{% if ns.open_ul -%}
|
||||||
|
</ul>
|
||||||
|
{% endif -%}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
{% endblock -%}
|
||||||
{% endblock %}
|
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
{% extends "template.html" %}
|
{% extends "template.html" -%}
|
||||||
|
|
||||||
{% block content %}
|
{% block content -%}
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="important">
|
<div class="important">
|
||||||
Error<br>
|
Error<br>
|
||||||
<span>{{ errorcode }}</span>
|
<span>{{ errorcode }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock -%}
|
||||||
|
@ -1,29 +1,29 @@
|
|||||||
{% extends "template.html" %}
|
{% extends "template.html" -%}
|
||||||
|
|
||||||
{% block content %}
|
{% block content -%}
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="archive">
|
<div class="archive">
|
||||||
<h1>User: {{ name }}</h1><br>
|
<h1>User: {{ name }}</h1><br>
|
||||||
{% set ns = namespace(last_year="") %}
|
{% set ns = namespace(last_year="") -%}
|
||||||
{% for entry in entries %}
|
{% for entry in entries -%}
|
||||||
{% if entry.item.date != ns.last_year %}
|
{% if entry.item.date != ns.last_year -%}
|
||||||
{% if ns.last_year != "" %}
|
{% if ns.last_year != "" -%}
|
||||||
</ul>
|
</ul>
|
||||||
{% endif %}
|
{% endif -%}
|
||||||
<h2> {{ entry.item.date }} </h2>
|
<h2> {{ entry.item.date }} </h2>
|
||||||
<ul>
|
<ul>
|
||||||
{% endif %}
|
{% endif -%}
|
||||||
{% set ns.last_year = entry.item.date %}
|
{% set ns.last_year = entry.item.date -%}
|
||||||
<li>
|
<li>
|
||||||
{{ entry.item.name }}
|
{{ entry.item.name }}
|
||||||
<a href="{{ url_for('entry', ident=entry.id) }}">
|
<a href="{{ url_for('entry', ident=entry.id) }}">
|
||||||
{{ r_to_star(entry.rating) }} by {{ entry.user.name }}
|
{{ r_to_star(entry.rating) }} by {{ entry.user.name }}
|
||||||
</a>
|
</a>
|
||||||
</li><br>
|
</li><br>
|
||||||
{% endfor %}
|
{% endfor -%}
|
||||||
{% autoescape off %}
|
{% autoescape off -%}
|
||||||
{{ content_string }}
|
{{ content_string }}
|
||||||
{% endautoescape %}
|
{% endautoescape -%}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock -%}
|
||||||
|
Loading…
Reference in new issue