Merge pull request #4226 from nabinhait/email_digest
[fix] Events in Email Digest
This commit is contained in:
commit
13a65d52dd
@ -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)
|
||||
|
||||
|
@ -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 %}
|
||||
|
Loading…
Reference in New Issue
Block a user