74 lines
3.0 KiB
Plaintext
74 lines
3.0 KiB
Plaintext
<p style="color: green"><%= notice %></p>
|
|
|
|
<h1><%= t('members.show.title') %></h1>
|
|
|
|
<table class='lined'>
|
|
<tr><td><%= t('members.attributes.display_name') %></td><td><%= @member.display_name %></td></tr>
|
|
<tr><td><%= t('members.attributes.email') %></td><td><%= @member.email %></td></tr>
|
|
<tr><td><%= t('members.attributes.category') %></td><td><%= @member.category %></td></tr>
|
|
<tr><td><%= t('members.attributes.identification_number') %></td><td><%= @member.identification_number %></td></tr>
|
|
<tr><td><%= t('members.attributes.address') %></td><td><%= simple_format @member.address %></td></tr>
|
|
<tr><td><%= t('members.attributes.wants_mailing_list') %></td><td><%= bool_option @member.wants_mailing_list %></td></tr>
|
|
<tr><td><%= t('members.attributes.prefers_postal') %></td><td><%= bool_option @member.prefers_postal %></td></tr>
|
|
<tr><td><%= t('members.attributes.joined_on') %></td><td><%= @member.joined_on %></td></tr>
|
|
<tr><td><%= t('members.attributes.expires_on') %></td><td><%= @member.expires_on %></td></tr>
|
|
<tr><td><%= t('members.attributes.status') %></td><td><%= @member.status %></td></tr>
|
|
</table>
|
|
|
|
<div>
|
|
<%= link_to t('members.show.actions.edit'), edit_member_path(@member) %>
|
|
</div>
|
|
|
|
<h2><%= t('members.show.contribution_history') %></h2>
|
|
|
|
<table class='zebra'>
|
|
<tr>
|
|
<th><%= t('contributions.attributes.payment_on') %></th>
|
|
<th><%= t('contributions.attributes.payment_method') %></th>
|
|
<th><%= t('contributions.attributes.payment_reference') %></th>
|
|
<th><%= t('contributions.attributes.amount') %></th>
|
|
</tr>
|
|
<% @member.contributions.each do |contribution| %>
|
|
<tr>
|
|
<td><%= contribution.payment_on %></td>
|
|
<td><%= contribution.payment_method %></td>
|
|
<td><%= contribution.payment_reference %></td>
|
|
<td>€<%= contribution.eurocents %></td>
|
|
<td>
|
|
<ul>
|
|
<li><%= link_to t('members.show.actions.edit_contribution'), edit_contribution_path(contribution) %></div>
|
|
<li><%= link_to t('members.show.actions.delete_contribution'), delete_contribution_path(contribution) %></li>
|
|
</ul>
|
|
</td>
|
|
</tr>
|
|
<% end %>
|
|
</table>
|
|
|
|
<h2></h2>
|
|
|
|
<h2><%= t('members.show.notifications') %></h2>
|
|
|
|
<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>
|
|
<% @member.notifications.order(to_be_sent_on: :desc).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>
|
|
|