2018-12-07 15:53:46 +11:00
{% extends 'sspromotions/email/base.html' %}
{#
Society Self-Service
2019-01-11 15:45:11 +11:00
Copyright © 2018-2019 Yingtong Li (RunasSudo)
2018-12-07 15:53:46 +11:00
Design by SendWithUs (Apache 2.0 licence)
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see < https: / / www . gnu . org / licenses / > .
#}
2019-02-10 13:19:10 +11:00
{% block css %}
.group-options {
width: 100px;
position: absolute;
right: 8px;
top: 8px;
color: #ccc;
text-align: right;
font-size: 8pt;
}
.group-options a {
color: inherit !important;
}
{% endblock %}
2018-12-07 15:53:46 +11:00
{% block content %}
2019-02-10 13:18:32 +11:00
< tr >
< th class = "small-12 large-12 columns first last" >
Hi {{ member.first_name if member else '[Name]' }}! Here's your latest news from MUMUS:
< / th >
< / tr >
2019-01-27 17:41:44 +11:00
< tr > <!-- Masthead -->
2019-01-11 15:45:11 +11:00
< th class = "small-12 large-12 columns first last" >
2018-12-07 15:53:46 +11:00
< table >
2019-02-13 15:44:59 +11:00
{% set ns = namespace(last_date=None) %}
2019-01-11 15:45:11 +11:00
{% for event in events %}
< tr >
2019-02-13 15:44:59 +11:00
{#< td class = "small-12 large-3" > {% if ns.last_date != event.date.date() %}{{ event.date.strftime('%a %d %b') }}{% endif %}< / td > {% set ns.last_date = event.date.date() %}
< td class = "small-12 large-9 last small-margafter" > < b > {{ event.title }}< / b > {% if event.link %} · < a href = "{{ event.link }}" > Read more › < / a > {% endif %}< / td > #}
< td class = "small-12 large-3" > {% if ns.last_date != event.date.date() %}{{ event.date.strftime('%a %d %b') }}{% endif %}< / td > {% set ns.last_date = event.date.date() %}
< td class = "small-12 large-9 last small-margafter" > {% if event.link %}< a href = "{{ event.link }}" style = "color: inherit;" > {% endif %}< b > {{ event.title }}< / b > {% if event.link %}< / a > {% endif %}< / td >
2019-01-11 15:45:11 +11:00
< / tr >
{% endfor %}
2018-12-07 15:53:46 +11:00
< / table >
< / th >
2019-01-27 17:41:44 +11:00
< / tr >
{% for group in groups %}
2018-12-07 15:53:46 +11:00
{% if not loop.first %}
{{ gap }}
{% endif %}
2019-01-27 17:41:44 +11:00
< tr class = "heading" > <!-- Section heading -->
2018-12-07 15:53:46 +11:00
< th class = "small-12 large-12 columns first last" >
2019-01-27 17:41:44 +11:00
< h2 class = "text-center" > {{ group.name }}< / h2 >
2019-02-10 13:19:10 +11:00
{% if group.group.subscribable %}
< div class = "group-options" > < a href = "https://{{ settings.ALLOWED_HOSTS[0] }}{{ url('membership') }}" > Unsubscribe< / a > < / div >
2019-02-13 15:24:14 +11:00
{% elif group.name not in settings.PROMO_GROUPS_MANDATORY %}
2019-02-10 13:19:10 +11:00
< div class = "group-options" > < a href = "https://{{ settings.ALLOWED_HOSTS[0] }}{{ url('membership') }}" > Change year level< / a > < / div >
{% endif %}
2018-12-07 15:53:46 +11:00
< / th >
2019-01-27 17:41:44 +11:00
< th class = "expander" > < / th >
< / tr >
2018-12-07 15:53:46 +11:00
{{ gap }}
2019-01-27 17:41:44 +11:00
{% for item in group.bulletin_items %}
< tr > <!-- Main Digest content -->
2018-12-07 15:53:46 +11:00
< th class = "small-12 large-{% if item.image %}8{% else %}12 first{% endif %} columns last" >
2019-01-27 17:41:44 +11:00
< b > < h5 > {{ item.title }}< / h5 > < / b >
< p > {{ item.content | markdown }}< / p >
{% if item.link %}< p > < a href = "{{ item.link }}" > Read more › < / a > < / p > {% endif %}
2019-03-05 20:17:06 +11:00
{% if not loop.last %}< hr > {% endif %}
2018-12-07 15:53:46 +11:00
< / th >
2019-01-27 17:41:44 +11:00
< / tr >
2018-12-07 15:53:46 +11:00
{% endfor %}
{% endfor %}
{% if more %}
2019-01-27 17:41:44 +11:00
< tr class = "heading" > < th class = "small-12 large-12 columns first last" >
< p > More from MUMUS:< / p >
< / th > < / tr >
2018-12-07 15:53:46 +11:00
{{ gap }}
2019-03-05 20:17:06 +11:00
{% for item in more %}
< tr >
< th class = "small-12 large-4 columns{% if loop.first %} first{% endif %}{% if loop.last %} last{% endif %}" >
{% if item.image %}{% if item.link %}< a href = "{{ item.link }}" > {% endif %}< img src = "https://{{ settings.ALLOWED_HOSTS[0] }}{{ MEDIA_URL }}{{ item.image }}" alt = "{{ item.title }}" style = "max-height: 10em;" > {% if item.link %}< / a > {% endif %}< br > {% endif %}
< p > {{ item.content|striptags|truncate(200) }}< / p >
< p > < a href = "https://{{ settings.ALLOWED_HOSTS[0] }}{{ url('bulletin_preview') }}?full" > Read more › < / a > < / p >
< / th >
< / tr >
{% endfor %}
2018-12-07 15:53:46 +11:00
{% endif %}
{% endblock content %}
2019-02-10 13:19:10 +11:00
{% block footer %}
MUMUS Mail is personalised for you. < a href = "https://{{ settings.ALLOWED_HOSTS[0] }}{{ url('membership') }}" > Unsubscribe or manage your email subscription.< / a > < br >
{% endblock %}