8000 Redesigned the section which summarizes the send messages · symfony/swiftmailer-bundle@152dad0 · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Feb 6, 2022. It is now read-only.

Commit 152dad0

Browse files
committed
Redesigned the section which summarizes the send messages
1 parent 830c3dd commit 152dad0

File tree

1 file changed

+17
-36
lines changed

1 file changed

+17
-36
lines changed

Resources/views/Collector/swiftmailer.html.twig

Lines changed: 17 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -92,55 +92,36 @@
9292
</div>
9393
{% endif %}
9494

95-
{% if profiler_markup_version == 1 %}
95+
{% if profiler_markup_version == 1 or collector.mailers|length > 1 %}
9696
<table>
9797
<thead>
9898
<tr>
99-
<th scope="col">Mailer</th>
100-
<th scope="col">Messages</th>
99+
<th scope="col">Mailer Name</th>
100+
<th scope="col">Num. of messages</th>
101+
<th scope="col">Messages status</th>
102+
<th scope="col">Notes</th>
101103
</tr>
102104
</thead>
103105
<tbody>
104106
{% for name in collector.mailers %}
105107
<tr>
106-
<th>{{ name }}{{ collector.isDefaultMailer(name) ? ' (default mailer)' : '' }}</th>
107-
<td>{{ collector.messageCount(name) }} {{ collector.isSpool(name) ? 'spooled' : 'sent' }}</td>
108+
<th class="font-normal">{{ name }}</th>
109+
<td class="font-normal">{{ collector.messageCount(name) }}</td>
110+
<td class="font-normal">{{ collector.isSpool(name) ? 'spooled' : 'sent' }}</td>
111+
<td class="font-normal">{{ collector.isDefaultMailer(name) ? 'This is the default mailer' }}</td>
108112
</tr>
109113
{% endfor %}
110114
</tbody>
111115
</table>
112116
{% else %}
113-
{% if collector.mailers|length > 1 %}
114-
<h3>Messages sent by each mailer</h3>
115-
116-
<div class="metrics">
117-
{% for name in collector.mailers %}
118-
<div class="metric">
119-
<span class="value">{{ collector.messageCount(name) }}
120-
{% if collector.messageCount(name) > 0 %}
121-
<span class="unit">{{ collector.isSpool(name) ? 'spooled' : 'sent' }}</span>
122-
{% endif %}
123-
</span>
124-
<span class="label">
125-
{{ name }} {{ collector.isDefaultMailer(name) ? ' (default app mailer)' }}
126-
</span>
127-
</div>
128-
{% endfor %}
129-
</div>
130-
{% else %}
131-
<div class="metrics">
132-
{% for name in collector.mailers %}
133-
<div class="metric">
134-
<span class="value">{{ collector.messageCount(name) }}
135-
{% if collector.messageCount(name) > 0 %}
136-
<span class="unit">{{ collector.isSpool(name) ? 'spooled' : 'sent' }}</span>
137-
{% endif %}
138-
</span>
139-
<span class="label">sent messages</span>
140-
</div>
141-
{% endfor %}
142-
</div>
143-
{% endif %}
117+
<div class="metrics">
118+
{% for name in collector.mailers %}
119+
<div class="metric">
120+
<span class="value">{{ collector.messageCount(name) }}</span>
121+
<span class="label">{{ collector.isSpool(name) ? 'spooled' : 'sent' }} {{ collector.messageCount(name) == 1 ? 'message' : 'messages' }}</span>
122+
</div>
123+
{% endfor %}
124+
</div>
144125
{% endif %}
145126

146127
{% for name in collector.mailers %}

0 commit comments

Comments
 (0)
0