Merge remote-tracking branch 'origin/main' into MK/multi_page_tables

pull/133/head
mariusrklein 10 months ago
commit a95a2013b0

@ -30,7 +30,9 @@ def serve_media(filename, content_type):
with open(media_path(filename), 'rb') as f:
response = HttpResponse(FileWrapper(f))
response['Content-Type'] = content_type
response['Content-Disposition'] = 'attachment; filename='+filename
# download other files than pdf, show pdfs in the browser
response['Content-Disposition'] = 'filename='+filename if content_type == 'application/pdf' else 'attachment; filename='+filename
return response

@ -57,7 +57,7 @@ This also includes a detailed, tabularized time schedule and is produced as an e
{% blocktrans %}A cost and participants overview. This is not required for the actual application, but is provided for convience as a PDF document.{% endblocktrans %}
</td>
<td>
<a href="{% url 'admin:members_freizeit_download_ljp_costs_participants' memberlist.pk %}" class="button">{% translate "Download" %}</a>
<a href="{% url 'admin:members_freizeit_download_ljp_costs_participants' memberlist.pk %}" class="button" target="_blank">{% translate "Download" %}</a>
</td>
</tr>
</table>

@ -30,7 +30,7 @@
{% blocktrans %}The application needs to be complemented with an invoice from the trip as proof.{% endblocktrans %}
</p>
<form action="" method="post">
<form action="" method="post" target="_blank">
{% csrf_token %}
<p>
<table>

@ -4,7 +4,7 @@
{% block object-tools-items %}
<li>
<form method="post" action="{% url 'admin:members_freizeit_action' original.pk %}">
<form method="post" action="{% url 'admin:members_freizeit_action' original.pk %}" target="_blank">
{% csrf_token %}
<input type="submit" name="crisis_intervention_list" value="{% trans 'Generate crisis intervention list' %}">
</form>
@ -25,7 +25,7 @@
</li>
<li>
<form method="post" action="{% url 'admin:members_freizeit_action' original.pk %}">
<form method="post" action="{% url 'admin:members_freizeit_action' original.pk %}" target="_blank">
{% csrf_token %}
<input type="submit" name="notes_list" value="{% trans 'Generate overview' %}">
</form>

Loading…
Cancel
Save