Merge pull request #4226 from nabinhait/email_digest

[fix] Events in Email Digest
This commit is contained in:
Nabin Hait 2015-10-26 14:47:09 +05:30
commit 13a65d52dd
2 changed files with 3 additions and 1 deletions

View File

@ -139,7 +139,7 @@ class EmailDigest(Document):
for i, e in enumerate(events):
e.starts_on_label = format_time(e.starts_on)
e.ends_on_label = format_time(e.ends_on)
e.ends_on_label = format_time(e.ends_on) if e.ends_on else None
e.date = formatdate(e.starts)
e.link = get_url_to_form("Event", e.name)

View File

@ -52,6 +52,8 @@
<span style="{{ label_css }}">
{% if e.all_day %}
{{ _("All Day") }}
{% elif (not e.ends_on_label or e.starts_on_label == e.ends_on_label)%}
{{ e.starts_on_label }}
{% else %}
{{ e.starts_on_label }} - {{ e.ends_on_label }}
{% endif %}