[enh] add show_date setting, to be able to order galleries, without showing the date

This allows (by chance) date keys to have non-date values, they just need to be comparable.
This commit is contained in:
Julien Malik 2016-02-18 17:00:17 +01:00
parent d9aa086f2b
commit dc5172303d
2 changed files with 2 additions and 1 deletions

View File

@ -16,6 +16,7 @@ gallery_index_template = templates.get_template("gallery-index.html")
page_template = templates.get_template("page.html")
SETTINGS = {
"show_date": True,
"gm": {
"quality": 75,
"auto-orient": True

View File

@ -19,7 +19,7 @@
<div class="gallery-title">
<h2>{{ gallery.title }}</h2>
{% if gallery.sub_title %}<h3>{{ gallery.sub_title }}</h3>{% endif %}
{% if gallery.date %}<div class="gallery-datetime">{{ gallery.date.strftime("%d %B %Y") }}</div>{% endif %}
{% if settings.show_date %}{% if gallery.date %}<div class="gallery-datetime">{{ gallery.date.strftime("%d %B %Y") }}</div>{% endif %}{% endif %}
{% if gallery.tags %}<div class="gallery-tag">IN {% for tag in gallery.tags -%} <span>{{ tag }}</span> {% endfor -%}</div>{% endif %}
</div>
</a>