Verified Commit 295d25ad authored by Sébastiaan Versteeg's avatar Sébastiaan Versteeg
Browse files

Replace .txt output by .html

parent 7b822387
{% extends 'admin/index.html' %}
{% load i18n admin_urls static admin_modify %}
{% block title %}{{ event.title }} | {{ site_title|default:_('Thalia site admin') }}{% endblock %}
{% block opengraph_title %}{{ event.title }} | {{ site_title|default:_('Thalia site admin') }}{% endblock %}
{% block extrastyle %}
{{ block.super }}
<link href="{% static "events/css/admin.css" %}" rel="stylesheet" type="text/css">
{% endblock %}
{% block extrahead %}
{{ block.super }}
<script type="text/javascript" src="{% static "admin/js/vendor/jquery/jquery.js" %}"></script>
<script type="text/javascript" src="{% static "admin/js/jquery.init.js" %}"></script>
<script type="text/javascript" src="{% static "events/js/admin.js" %}"></script>
{% endblock %}
{% block branding %}
<h1 id="site-name"><a href="{% url 'admin:index' %}">{{ site_header|default:_('Thalia administration') }}</a></h1>
{% endblock %}
{% block breadcrumbs %}
<div class="breadcrumbs">
<a href="{% url 'admin:index' %}">{% trans 'home'|capfirst %}</a>
&rsaquo; <a href="{% url 'admin:app_list' app_label='events' %}">{% trans 'events'|capfirst %}</a>
&rsaquo; <a href="/admin/events/event/">{% trans 'events'|capfirst %}</a>
&rsaquo; <a href="{% url 'events:admin-details' event.pk %}">{{ event.title }}</a>
&rsaquo; {% trans "Export email addresses of attendees" %}
</div>
{% endblock %}
{% block content_title %}<h1>{% trans "Copy-pasteable email addresses of attendees:" %}</h1>{% endblock %}
{% block content %}
<div id="content-main">
<p>
{{ addresses | join:', ' }}
</p>
{% if no_addresses %}
<p>
{% trans "Some attendees were registered manually, and are thus not included in the list above:" %}
</p>
<p>
{{ no_addresses | join:'<br />' }}
</p>
{% endif %}
</div>
{% endblock %}
{% block sidebar %}
{% endblock %}
{% load i18n %}{% trans "Copy-pasteable email addresses of attendees:" %}
{{ addresses | join:', ' }}
{% if no_addresses %}
{% trans "Some attendees were registered manually, and are thus not included in the list above:" %}
{% for name in no_addresses %}
{{ name }}
{% endfor %}
{% endif %}
......@@ -155,9 +155,9 @@ def export_email(request, event_id):
registrations = registrations[:event.max_participants]
addresses = [r.member.user.email for r in registrations if r.member]
no_addresses = [r.name for r in registrations if not r.member]
return render(request, 'events/admin/email_export.txt',
{'addresses': addresses,
'no_addresses': no_addresses}, content_type='text/plain')
return render(request, 'events/admin/email_export.html',
{'event': event, 'addresses': addresses,
'no_addresses': no_addresses})
def index(request):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment