show start/end for events

This commit is contained in:
Kyle Mahan 2016-03-08 16:06:46 -08:00
parent 43925d9119
commit 3d506a6ab3
2 changed files with 18 additions and 0 deletions

View file

@ -534,6 +534,12 @@ def hentry_to_entry(hentry, feed, backfill, now):
if value:
entry.set_property(prop, value)
if 'start-str' in hentry:
entry.set_property('start', hentry.get('start-str'))
if 'end-str' in hentry:
entry.set_property('end', hentry.get('end-str'))
# set a flag for events so we can show RSVP buttons
if hentry.get('type') == 'event':
entry.set_property('event', True)

View file

@ -46,6 +46,18 @@
<h1>{{ entry.title }}</h1>
{% endif %}
{% if entry.get_property('event') %}
<p>
{% if entry.get_property('start') %}
<strong>start:</strong> {{ entry.get_property('start') }}
{% endif %}
<br/>
{% if entry.get_property('end') %}
<strong>end:</strong> {{ entry.get_property('end') }}
{% endif %}
</p>
{% endif %}
{% set photo = entry.get_property('photo') %}
{% if photo and (not entry.content or '<img' not in entry.content) %}
<div class="photo">