-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add feature to resend emails (#1278)
## Describe your changes Fixes: #
- Loading branch information
1 parent
787e89e
commit abef520
Showing
4 changed files
with
188 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
{% extends "base.html" %} | ||
|
||
{% load crispy_forms_tags %} | ||
|
||
{% block nav-banquet %} | ||
<li role="presentation" class="active"><a href="{% url 'banquet_dashboard' fair.year %}">Banquet</a></li> | ||
{% endblock %} | ||
|
||
{% block content %} | ||
{% if did_error_email %} | ||
<h1 style=" | ||
background-color: #f2dede; | ||
border-color: #ebccd1; | ||
color: #a94442; | ||
margin: 0 0 20px 0; | ||
padding: 15px; | ||
border: 1px solid transparent; | ||
border-radius: 4px; | ||
">Failed to send some emails!</h1> | ||
{% endif %} | ||
|
||
<h1>{{ banquet.name }} – Unsent Email</h1> | ||
|
||
<div style="margin-bottom: 10px; display: flex; justify-content: space-between;"> | ||
<div> | ||
<a class="btn btn-default" href="{% url 'banquet_manage_invitations' fair.year banquet.pk %}">Invitations</a> | ||
<a class="btn btn-default" href="{% url 'banquet_manage_participants' fair.year banquet.pk %}">Participants</a> | ||
</div> | ||
<div> | ||
<form method="post"> | ||
{% csrf_token %} | ||
<button class="btn btn-danger">Send emails</button> | ||
</form> | ||
</div> | ||
</div> | ||
|
||
<style type="text/css"> | ||
.form_no_ul ul | ||
{ | ||
margin: 0; | ||
padding: 0; | ||
margin: 0 0 20px 15px; | ||
} | ||
|
||
.form_no_ul ul li | ||
{ | ||
list-style-type: none; | ||
} | ||
|
||
.form_no_ul ul li label | ||
{ | ||
font-weight: 400; | ||
} | ||
</style> | ||
|
||
<div class="table-responsive"> | ||
<table class="table" id="invitation_table"> | ||
<thead> | ||
<tr> | ||
<th>Group</th> | ||
<th>Deadline</th> | ||
<th>Name</th> | ||
<th>Reason</th> | ||
<th>Part of Matching</th> | ||
<th>Email sent</th> | ||
<th style="text-align: right; white-space: nowrap;">Price (SEK)</th> | ||
<th></th> | ||
</tr> | ||
</thead> | ||
|
||
<tbody> | ||
{% for invitation in invitations %} | ||
<tr> | ||
<td>{{ invitation.group }}</td> | ||
<td>{% if invitation.deadline_smart is not None %} <span style="display: none;">{{ invitation.deadline_smart|date:"U" }}</span> {{ invitation.deadline_smart }} {% else %} <span style="font-style: italic;">no deadline</span> {% endif %}</td> | ||
<td> | ||
{% if invitation.user %} <a href="{% url 'people:profile' fair.year invitation.user.pk %}">{{ invitation.name }}</a> {% else %} {{ invitation.name }} {% endif %} | ||
|
||
{% if invitation.status == 'GOING' %}<span class="label label-success">Going</span>{% endif %} | ||
{% if invitation.status == 'HAS_NOT_PAID' %}<span class="label label-warning">Has not paid</span>{% endif %} | ||
{% if invitation.status == 'NOT_GOING' %}<span class="label label-danger">Not going</span>{% endif %} | ||
{% if invitation.status == 'PENDING' %}<span class="label label-default">Pending</span>{% endif %} | ||
</td> | ||
<td>{% if invitation.reason %}{{ invitation.reason }}{% endif %}</td> | ||
<td>{% if invitation.matching_status %} Yes {% else %} No {% endif %}</td> | ||
<td>{% if invitation.has_sent_mail %} Yes {% else %} No {% endif %}</td> | ||
<td style="text-align: right;">{{ invitation.price }}</td> | ||
<td style="text-align: right;"><a href="{% url 'banquet_manage_invitation' fair.year banquet.pk invitation.pk %}" class="btn btn-sm btn-default">Details</a></td> | ||
</tr> | ||
{% endfor %} | ||
</tbody> | ||
</table> | ||
</div> | ||
{% endblock %} | ||
|
||
{% block scripts %} | ||
<script src="https://cdn.datatables.net/1.10.12/js/jquery.dataTables.min.js"></script> | ||
<script src="https://cdn.datatables.net/1.10.12/js/dataTables.bootstrap.min.js"></script> | ||
<link href="https://cdn.datatables.net/1.10.12/css/dataTables.bootstrap.min.css" rel="stylesheet" /> | ||
<script> | ||
$(function() | ||
{ | ||
$('#invitation_table').DataTable( | ||
{ | ||
'paging': false, | ||
"columns": | ||
[ | ||
null, | ||
null, | ||
null, | ||
null, | ||
null, | ||
null, | ||
null, | ||
{ 'orderable': false } | ||
] | ||
}); | ||
}) | ||
</script> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters