tilde.news/app/views/invitations/index.html.erb

49 lines
1.6 KiB
Plaintext

<div class="box wide">
<div class="legend">
Requested Invitations
</div>
<p>
These persons have requested invitations and confirmed their e-mail
addresses. If you recognize anyone, feel free to send them an invitation and
remove their request. If a request looks suspicious, delete it.
</p>
<table class="data zebra" width="100%" cellspacing=0>
<tr>
<th width="15%">Date/Time</th>
<th width="20%">Name</th>
<th width="40%">Memo</th>
<th width="15%"></th>
<th width="10%"></th>
</tr>
<% @invitation_requests.each do |ir| %>
<tr>
<td><%= ir.created_at.strftime("%Y-%m-%d %H:%M:%S") %></td>
<td><%= ir.name %>
<% if @user.is_moderator? %>
<br>
<em><%= ir.email %></em>
<% end %></td>
<td><%= raw ir.markeddown_memo %></td>
<td><%= form_with url: send_invitation_for_request_path do |f| %>
<%= f.hidden_field "code", :value => ir.code %>
<%= f.submit "Send Invitation", :data => { :confirm => "Are " <<
"you sure you want to invite this person and remove this request?" } %>
<% end %></td>
<td><%= form_with url: delete_invitation_request_path do |f| %>
<%= f.hidden_field "code", :value => ir.code %>
<%= f.submit "Delete", :data => { :confirm => "Are you sure " <<
"you want to delete this request?" } %>
<% end %>
</tr>
<% end %>
<% if @invitation_requests.count == 0 %>
<tr>
<td colspan=<%= @user.is_moderator?? 5 : 4 %> align="center"><span
class="na">No invitation requests</span></td>
</tr>
<% end %>
</table>
</div>