journalduhacker/app/views/invitations/index.html.erb
2017-02-05 23:27:35 +01:00

51 lines
1.6 KiB
Plaintext

<div class="box wide">
<div class="legend">
<%= t('.requestedinvtitle') %>
</div>
<p>
<%= t('.requestedinvsummary') %>
</p>
<table class="data" width="100%" cellspacing=0>
<tr>
<th width="15%"><%= t('.requestedinvdate') %></th>
<th width="20%"><%= t('.requestedinvname') %></th>
<th width="40%"><%= t('.requestedinvmemo') %></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 %>
<% if @user.is_moderator? %>
<br>
<em><%= ir.email %></em>
<% end %></td>
<td><%= raw ir.markeddown_memo %></td>
<td><%= form_tag send_invitation_for_request_path do %>
<%= hidden_field_tag "code", ir.code %>
<%= submit_tag t('.sendinvitation'), :data => { :confirm => "#{t('.confirminvitation')}" } %>
<% end %></td>
<% if @user.is_moderator? %>
<td><%= form_tag delete_invitation_request_path do %>
<%= hidden_field_tag "code", ir.code %>
<%= submit_tag t('.deleteinvitation'), :data => { :confirm => "#{t('.confirmdelete')}" } %>
<% 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"><%= t('.noinvitation') %></span></td>
</tr>
<% end %>
</table>
</div>