]> git.openstreetmap.org Git - rails.git/blob - app/views/user_blocks/_block.html.erb
Merge remote-tracking branch 'upstream/pull/1576'
[rails.git] / app / views / user_blocks / _block.html.erb
1 <tr>
2   <% c1 = cycle('table0', 'table1') %>
3
4   <% if show_user_name %>
5   <td class="<%= c1 %>"><%= link_to h(block.user.display_name), user_path(block.user) %></td>
6   <% end %>
7   <% if show_creator_name %>
8   <td class="<%= c1 %>"><%= link_to h(block.creator.display_name), user_path(block.creator) %></td>
9   <% end %>
10   <td class="<%= c1 %>"><%=h truncate(block.reason) %></td>
11   <td class="<%= c1 %>"><%=h block_status(block) %></td>
12   <td class="<%= c1 %>">
13     <% if block.revoker_id.nil? %>
14       <%= t('.not_revoked') %>
15     <% else %>
16       <%= link_to h(block.revoker.display_name), user_path(block.revoker) %>
17     <% end %>
18   </td>
19   <td class="<%= c1 %>"><%= link_to t('.show'), block %></td>
20   <td class="<%= c1 %>"><% if current_user and current_user.id == block.creator_id and block.active? %><%= link_to t('.edit'), edit_user_block_path(block) %><% end %></td>
21   <% if show_revoke_link %>
22   <td class="<%= c1 %>"><% if block.active? %><%= link_to t('.revoke'), :controller => 'user_blocks', :action => 'revoke', :id => block.id %><% end %></td>
23   <% end %>
24 </tr>