2022-10-06 14:50:38 +00:00
|
|
|
<h1><%= t('notifications.index.title') %></h1>
|
|
|
|
|
|
|
|
<details>
|
|
|
|
<summary><h2 style="display: inline"><%= t('notifications.index.scheduled') %></h2></summary>
|
|
|
|
<table class='zebra'>
|
|
|
|
<tr>
|
|
|
|
<th><%= t('notifications.attributes.to_be_sent_on') %></th>
|
|
|
|
<th><%= t('notifications.attributes.template') %></th>
|
|
|
|
<th><%= t('notifications.attributes.member') %></th>
|
|
|
|
<th><%= t('members.show.contribution_actions') %></th>
|
|
|
|
</tr>
|
|
|
|
<% @scheduled.each do |notification| %>
|
|
|
|
<tr>
|
|
|
|
<td><%= notification.to_be_sent_on %></td>
|
|
|
|
<td><code><%= notification.template %></code></td>
|
|
|
|
<td>
|
2023-03-17 16:03:01 +00:00
|
|
|
<% if notification.member %>
|
|
|
|
<%= link_to notification.member do %><%= notification.member.display_name %> <<%= notification.member.email %>><% end %>
|
|
|
|
<% else %>
|
|
|
|
---
|
2022-10-06 14:50:38 +00:00
|
|
|
<% end %>
|
|
|
|
</td>
|
2023-03-17 16:03:01 +00:00
|
|
|
<td></td>
|
2022-10-06 14:50:38 +00:00
|
|
|
</tr>
|
|
|
|
<% end %>
|
|
|
|
</table>
|
|
|
|
</details>
|
|
|
|
|
|
|
|
<details>
|
|
|
|
<summary><h2 style="display: inline"><%= t('notifications.index.sent') %></h2></summary>
|
|
|
|
<table class='zebra'>
|
|
|
|
<tr>
|
|
|
|
<th><%= t('notifications.attributes.to_be_sent_on') %></th>
|
|
|
|
<th><%= t('notifications.attributes.template') %></th>
|
2022-10-06 14:53:27 +00:00
|
|
|
<th><%= t('notifications.attributes.member') %></th>
|
2022-10-06 14:50:38 +00:00
|
|
|
<th><%= t('members.show.contribution_actions') %></th>
|
|
|
|
</tr>
|
|
|
|
<% @sent.each do |notification| %>
|
|
|
|
<tr>
|
|
|
|
<td><%= notification.to_be_sent_on %></td>
|
|
|
|
<td><code><%= notification.template %></code></td>
|
2024-02-01 09:13:44 +00:00
|
|
|
<td>
|
|
|
|
<% if notification.member %>
|
|
|
|
<%= link_to notification.member do %><%= notification.member.display_name %> <<%= notification.member.email %>><% end %>
|
|
|
|
<% else %>
|
|
|
|
---
|
|
|
|
<% end %>
|
|
|
|
</td>
|
2022-10-06 14:50:38 +00:00
|
|
|
<td>
|
|
|
|
<% if notification.status == 'scheduled' %>
|
|
|
|
<%= form_with url: deliver_notification_path(notification) do |form| %>
|
|
|
|
<%= form.submit t('members.show.actions.deliver_notification') %>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<% end %>
|
|
|
|
</table>
|
|
|
|
</details>
|