Merge pull request #26 from julienmalik/show_date

[enh] add show_date setting, to be able to order galleries
This commit is contained in:
Laurent Peuch 2016-02-19 09:44:50 +01:00
commit c00dd133fb
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") page_template = templates.get_template("page.html")
SETTINGS = { SETTINGS = {
"show_date": True,
"gm": { "gm": {
"quality": 75, "quality": 75,
"auto-orient": True "auto-orient": True

View File

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