Skip to content

Commit

Permalink
Some little improvement to make planned reminder messages more visibl…
Browse files Browse the repository at this point in the history
…e, and hide the long body text in the message history
  • Loading branch information
bruecksen committed Nov 21, 2024
1 parent 9d7ce87 commit 32a561c
Showing 1 changed file with 13 additions and 15 deletions.
28 changes: 13 additions & 15 deletions bakeup/templates/workshop/productionday_reminder.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@
{% endblock %}

{% block page_content %}
{% if messages_sending %}
<div class="row">
<div class=" col">
{% for message in messages_sending %}
<p><span class="badge bg-warning text-dark">{% if message.is_sending %}SENDING{% elif message.is_planned_sending %}PLANNED SENDING{% endif %}</span> {{ message.get_orders.count }} emails to users: <small> {{ message }}</small></p>
{% endfor %}
</div>
</div>
<hr>
{% endif %}
{{ form.errors }}
<div class="row">
<div class="col-sm-10 col">
Expand Down Expand Up @@ -59,20 +69,7 @@
</form>
</div>
</div>
{% if messages_sending %}
<div class="row mt-4">
<div class="col">
<h2>Message pipeline<h2>
</div>
</div>
<div class="row">
<div class="col-sm-8 col">
{% for message in messages_sending %}
<p><span class="badge bg-warning text-dark">{% if message.is_sending %}SENDING{% elif message.is_planned_sending %}PLANNED SENDING{% endif %}</span> {{ message.get_orders.count }} emails to users: <small> {{ message }}</small></p>
{% endfor %}
</div>
</div>
{% endif %}
<hr>
{% if messages_sent %}
<div class="row mt-4">
<div class="col">
Expand All @@ -88,7 +85,8 @@ <h2>Message History</h2>
<p class="small mb-0">{{ message.sent_date }}</p>
<h5>{% if message.error_log %}<i class="fas fa-exclamation-triangle"></i> {% endif %}{{ message }} </h5>
<hr>
<p>{{ message.body|safe }}</p>
<a data-bs-toggle="collapse" href=".email-body-{{ message.pk }}" role="button" aria-expanded="false" aria-controls="collapseExample">E-mail body</a>
<div class="collapse email-body-{{ message.pk }}">{{ message.body|safe }}</div>
<hr>
<p><small>
<a data-bs-toggle="collapse" href=".email-log-{{ message.pk }}" role="button" aria-expanded="false" aria-controls="collapseExample">E-mail send: {{ message.send_log|length }}</a>
Expand Down

0 comments on commit 32a561c

Please sign in to comment.