saucy/app/views/members/show.html.erb

76 lines
3.3 KiB
Plaintext
Raw Normal View History

2022-06-25 12:48:46 +00:00
<p style="color: green"><%= notice %></p>
<h1><%= t('members.show.title') %></h1>
<table class='lined'>
2022-06-25 12:48:46 +00:00
<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>
2022-06-26 09:44:30 +00:00
<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>
2022-06-25 12:48:46 +00:00
<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>
2022-10-02 12:48:06 +00:00
<tr><td><%= t('members.attributes.regular_ifthenpay_link') %></td><td><%= link_to @member.regular_ifthenpay_link, @member.regular_ifthenpay_link %></td></tr>
<tr><td><%= t('members.attributes.reduced_ifthenpay_link') %></td><td><%= link_to @member.reduced_ifthenpay_link, @member.reduced_ifthenpay_link %></td></tr>
2022-06-25 12:48:46 +00:00
</table>
<div>
<%= link_to t('members.show.actions.edit'), edit_member_path(@member) %>
</div>
<h2><%= t('members.show.contribution_history') %></h2>
<table class='zebra'>
2022-06-25 12:48:46 +00:00
<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>
2022-06-25 12:48:46 +00:00
</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>
2022-06-25 12:48:46 +00:00
</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>
2022-07-16 10:27:43 +00:00
<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>
2022-07-16 10:27:43 +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>