2 <% c1 = cycle('table0', 'table1') %>
4 <% if show_user_name %>
5 <td class="<%= c1 %>"><%= link_to h(block.user.display_name), :controller => 'user', :action => 'view', :display_name => block.user.display_name %></td>
7 <% if show_moderator_name %>
8 <td class="<%= c1 %>"><%= link_to h(block.moderator.display_name), :controller => 'user', :action => 'view', :display_name => block.moderator.display_name %></td>
10 <td class="<%= c1 %>"><%=h truncate(block.reason) %></td>
11 <td class="<%= c1 %>">
12 <% if block.active? %>
13 <% if block.needs_view? %>
14 <%= t'user_block.partial.until_login' %>
16 <%= t('user_block.partial.time_future', :time => distance_of_time_in_words_to_now(block.end_at)) %>
19 <%= t'user_block.partial.not_active' %>
22 <td class="<%= c1 %>">
23 <% if block.revoker_id.nil? %>
24 <%= t('user_block.partial.not_revoked') %>
26 <%= link_to h(block.revoker.display_name), :controller => 'user', :action => 'view', :display_name => block.revoker.display_name %>
29 <td class="<%= c1 %>"><%= link_to t('user_block.partial.show'), block %></td>
30 <td class="<%= c1 %>"><% if @user and @user.id == block.moderator_id and block.active? %><%= link_to t('user_block.partial.edit'), edit_user_block_path(block) %><% end %></td>
31 <% if show_revoke_link %>
32 <td class="<%= c1 %>"><% if block.active? %><%= link_to t('user_block.partial.revoke'), block, :confirm => t('user_block.partial.confirm'), :action => :revoke %><% end %></td>