akkounts/app/views/invitations/index.html.erb
Sebastian Kippe 698e4381c2
All checks were successful
continuous-integration/drone/push Build is passing
Improve table styles
* Nicer table headers
* Hide invitation IDs on small screens
2021-02-01 18:53:48 +01:00

49 lines
1.1 KiB
Plaintext

<section>
<h2>Invitations</h2>
<% if @invitations_unused.any? %>
<table>
<thead>
<tr>
<th>URL</th>
</tr>
</thead>
<tbody>
<% @invitations_unused.each do |invitation| %>
<tr>
<td><%= invitation_url(invitation.token) %></td>
</tr>
<% end %>
</tbody>
</table>
<% else %>
<p>
You do not have any invitations to give away yet. All good
things come in time.
</p>
<% end %>
</section>
<% if @invitations_used.any? %>
<section>
<h3>Accepted Invitations</h3>
<table>
<thead>
<tr>
<th class="hide-small">ID</th>
<th>Accepted</th>
<th>Invited user</th>
</tr>
</thead>
<tbody>
<% @invitations_used.each do |invitation| %>
<tr>
<td class="hide-small"><%= invitation.token %></td>
<td><%= invitation.used_at.strftime("%Y-%m-%d") %></td>
<td><%= User.find(invitation.invited_user_id).address %></td>
</tr>
<% end %>
</tbody>
</table>
</section>
<% end %>