mirror of
https://github.com/ENSL/ensl.org.git
synced 2024-11-15 17:31:27 +00:00
1e64b50109
- Bans - Articles - Forums - Users Further styling improvements to form elements
36 lines
1 KiB
Text
36 lines
1 KiB
Text
<table class="bans striped">
|
|
<tr>
|
|
<th class="user">User</th>
|
|
<th class="type">Type</th>
|
|
<th class="expiry">Expiry</th>
|
|
<th class="reason">Reason</th>
|
|
<% if cuser and cuser.admin? %>
|
|
<th class="actions"></th>
|
|
<% end %>
|
|
</tr>
|
|
|
|
<% bans.each do |ban| %>
|
|
<tr class="<%= ban.color %>">
|
|
<td>
|
|
<% if ban.user %>
|
|
<%= link_to "#{ban.user}", ban %>
|
|
<% else %>
|
|
<%= link_to "# #{ban.id}", ban %>
|
|
<% end %>
|
|
</td>
|
|
<td><%= ban.types[ban.ban_type] %></td>
|
|
<td><%= shorttime ban.expiry %></td>
|
|
<td><%= shorten ban.reason, 30 %></td>
|
|
<% if cuser and cuser.admin? %>
|
|
<td class="actions">
|
|
<% if ban.can_update? cuser %>
|
|
<%= link_to icon('pencil'), edit_ban_path(ban) %>
|
|
<% end %>
|
|
<% if ban.can_destroy? cuser %>
|
|
<%= link_to icon('times'), ban, confirm: 'Are you sure?', method: :delete %>
|
|
<% end %>
|
|
</td>
|
|
<% end %>
|
|
</tr>
|
|
<% end %>
|
|
</table>
|