46 lines
2.1 KiB
Plaintext
46 lines
2.1 KiB
Plaintext
<p style="color: green"><%= notice %></p>
|
|
|
|
<h1><%= t 'members.index.title' %></h1>
|
|
|
|
<%= link_to t('members.index.actions.new'), new_member_path %>
|
|
|
|
<%= form_with url: members_path, method: :get do |form| %>
|
|
<%= form.text_field :q %>
|
|
<%= form.select :status, %w[ any active passive pending expired cancelled ], selected: params[:status] %>
|
|
<%= form.select :category, %w[ any student employed unemployed retired ], selected: params[:category], multiple: true %>
|
|
<%= form.submit 'Search', name: '' %>
|
|
<% if params[:q].present? || params[:status].present? || params[:category].present? %>
|
|
<%= link_to t('members.index.actions.clear_search'), members_path %>
|
|
<% end %>
|
|
<% end %>
|
|
|
|
<table class='zebra'>
|
|
<tr>
|
|
<th><%= link_to_current_with_sort t('members.attributes.number'), 'number.asc' %></th>
|
|
<th><%= link_to_current_with_sort t('members.attributes.status'), 'status.asc' %></th>
|
|
<th><%= link_to_current_with_sort t('members.attributes.email'), 'email.asc' %></th>
|
|
<th><%= link_to_current_with_sort t('members.attributes.display_name'), 'display_name.asc' %></th>
|
|
<th><%= link_to_current_with_sort t('members.attributes.joined_on'), 'joined_on.asc' %></th>
|
|
<th><%= link_to_current_with_sort t('members.attributes.expires_on'), 'expires_on.asc' %></th>
|
|
<th><%= t('members.index.actions.title') %></th>
|
|
</tr>
|
|
<% @members.each do |member| %>
|
|
<tr id="<%= dom_id member %>">
|
|
<td><%= member.number %></td>
|
|
<td><%= member_status(member.status) %></td>
|
|
<td><%= member.email %></td>
|
|
<td><%= member.display_name %></td>
|
|
<td><%= member.joined_on %></td>
|
|
<td><%= member.expires_on %></td>
|
|
<td>
|
|
<ul>
|
|
<li><%= link_to t('members.index.actions.show'), member %></li>
|
|
<li><%= link_to t('members.index.actions.edit'), edit_member_path(member) %></li>
|
|
<li><%= link_to t('members.index.actions.new_contribution'), new_member_contribution_path(member) %></li>
|
|
<li><%= link_to t('members.index.actions.delete'), delete_member_path(member) %></li>
|
|
</ul>
|
|
</td>
|
|
</tr>
|
|
<% end %>
|
|
</table>
|