123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- <h1>Members of <%= @group.name %></h1>
- <table class="table table-striped">
- <thead>
- <tr>
- <th><%= t 'activerecord.attributes.group.name' %></th>
- <% if @admin %>
- <th colspan="2"><%= t :actions %></th>
- <% end %>
- </tr>
- </thead>
- <tbody>
- <% @members.each do |member| %>
- <tr>
- <td>
- <%= link_to member.person.full_name, group_member_path(@group, member) %>
- <% if member.is_leader %>
- (<i class="fa fa-angle-up"></i>)
- <% end %>
- </td>
- <% if @admin and current_person != member.person %>
- <% if member.is_leader %>
- <td>
- <%= link_to t('groups.demote'), demote_group_member_path(@group, member), method: :post, data: { confirm: t(:areyousure)} %>
- </td>
- <% else %>
- <td>
- <%= link_to t('groups.promote'), promote_group_member_path(@group, member), method: :post, data: { confirm: t(:areyousure)} %>
- </td>
- <% end %>
- <td>
- <%= link_to t(:remove), group_member_path(@group, member), method: :delete, data: { confirm: t(:areyousure)} %>
- </td>
- <% else %>
- <td></td><td></td>
- <% end %>
- </tr>
- <% end %>
- </tbody>
- </table>
- <br>
- <%= link_to t('groups.member.add'), new_group_member_path(@group) %> |
- <%= link_to t('groups.member.invite'), group_invite_path(@group) %>
|