/bans: size columns to avoid unnecessary wrapping.
Sizes columns such that they automatically shrink to fit. This fixes problems with usernames and dates wrapping in the middle.
This commit is contained in:
@@ -40,6 +40,22 @@ table.striped {
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* A table where one column expands to fill the screen, while the
|
||||
* other columns shrink to fit their contents.
|
||||
*/
|
||||
table.autofit {
|
||||
td, th, .col-fit {
|
||||
white-space: nowrap;
|
||||
padding-right: 2em;
|
||||
}
|
||||
|
||||
.col-expand {
|
||||
white-space: normal;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
table.search {
|
||||
tr {
|
||||
height: 2em;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div id="a-index">
|
||||
<h1>Bans</h1>
|
||||
|
||||
<table class="striped" width="100%">
|
||||
<table class="striped autofit">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>User</th>
|
||||
@@ -16,7 +16,7 @@
|
||||
<tr id="ban-<%= ban.id %>" data-expired="<%= ban.expired? %>">
|
||||
<td><%= link_to_user(ban.user) %></td>
|
||||
<td><%= ban.expires_at %></td>
|
||||
<td><%= format_text ban.reason, :ragel => true %></td>
|
||||
<td class="col-expand"><%= format_text ban.reason, :ragel => true %></td>
|
||||
<td>
|
||||
<% if CurrentUser.is_moderator? %>
|
||||
<%= link_to "Edit", edit_ban_path(ban) %>
|
||||
|
||||
Reference in New Issue
Block a user