This commit is contained in:
@@ -1,56 +1,61 @@
|
||||
<section>
|
||||
<h2>Invitations</h2>
|
||||
<% if @invitations_unused.any? %>
|
||||
<p>
|
||||
Invite your friends to a Kosmos account by sharing an invitation URL with them:
|
||||
</p>
|
||||
<% end %>
|
||||
</section>
|
||||
<%= render partial: "components/header", locals: { page_title: "Invitations" } %>
|
||||
|
||||
<section>
|
||||
<% 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>
|
||||
<main class="w-full max-w-6xl mx-auto pb-12 px-4 sm:px-6 lg:px-8">
|
||||
<div class="bg-white rounded-lg shadow px-6 py-12 sm:px-12">
|
||||
<section>
|
||||
<% if @invitations_unused.any? %>
|
||||
<p>
|
||||
Invite your friends to a Kosmos account by sharing an invitation URL with them:
|
||||
</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 %>
|
||||
<section>
|
||||
<% if @invitations_unused.any? %>
|
||||
<table>
|
||||
<thead>
|
||||
<tr class="text-left">
|
||||
<th>URL</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @invitations_unused.each do |invitation| %>
|
||||
<tr>
|
||||
<td class="font-mono"><%= 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 %>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
Reference in New Issue
Block a user