parent
e0f76c7aba
commit
abaf80e5c4
5 changed files with 76 additions and 10 deletions
@ -0,0 +1,53 @@ |
||||
<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><%= link_to notification.member do %><%= notification.member.display_name %> <<%= notification.member.email %>><% end %></td> |
||||
<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> |
||||
|
||||
<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> |
||||
<th><%= t('notifications.attributes.status') %></th> |
||||
<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> |
||||
<td><%= notification_status(notification.status) %></td> |
||||
<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> |
Loading…
Reference in new issue