journalduhacker/app/views/invitations/index.html.erb

51 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. Spam will be cleared out by a moderator.
</p>
<table class="data" 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>
<% if @user.is_moderator? %>
<th></th>
<% end %>
</tr>
<% bit = 0 %>
<% @invitation_requests.each do |ir| %>
<tr class="row<%= bit %>">
<td><%= ir.created_at.strftime("%Y-%m-%d %H:%M:%S") %></td>
<td><%= ir.name %></td>
<td><%= raw ir.markeddown_memo %></td>
<td><%= form_tag send_invitation_for_request_url do %>
<%= hidden_field_tag "code", ir.code %>
<%= submit_tag "Send Invitiation", :data => { :confirm => "Are " <<
"you sure you want to invite this person and remove this request?" } %>
<% end %></td>
<% if @user.is_moderator? %>
<td><%= form_tag delete_invitation_request_url do %>
<%= hidden_field_tag "code", ir.code %>
<%= submit_tag "Delete", :data => { :confirm => "Are you sure " <<
"you want to delete this request?" } %>
<% end %></td>
<% end %>
</tr>
<% bit = (bit == 1 ? 0 : 1) %>
<% 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>