This removes the custom table styling code, and move to using bootstrap table styling for almost all remaining tables.
-/* General styles for tables */
-
-table {
- width: 100%;
- margin-bottom: $lineheight;
- th, td {
- text-align: left;
- padding: $lineheight/4;
- line-height: $lineheight;
- }
- th {
- font-weight: 600;
- vertical-align: top;
- }
- td {
- vertical-align: middle;
- }
-}
-
/* Utility for de-emphasizing content */
.deemphasize {
/* Utility for de-emphasizing content */
.deemphasize {
margin-left: auto;
margin-right: auto;
}
margin-left: auto;
margin-right: auto;
}
- td {
- padding: 0 $lineheight/4 $lineheight/4 $lineheight/4;
- }
}
/* Rules for search sidebar */
}
/* Rules for search sidebar */
table-layout: fixed;
border-collapse: separate;
border-spacing: 0;
table-layout: fixed;
border-collapse: separate;
border-spacing: 0;
th, td {
border-bottom: 1px solid $grey;
th, td {
border-bottom: 1px solid $grey;
-/* Rules for the trace list shown by the traces tab etc */
-
-#trace_list {
- border-width: 0px;
- text-align: right;
-
- .trace_summary {
- font-size: 12px;
- color: gray;
- }
-}
-
/* Rules for the new trace form */
#new_trace {
/* Rules for the new trace form */
#new_trace {
/* Rules for messages pages */
.messages {
/* Rules for messages pages */
.messages {
- width: 100%;
- border: 1px solid $grey;
-
input[type="submit"] {
margin: auto;
}
input[type="submit"] {
margin: auto;
}
- tbody tr {
- border-top: 1px solid $grey;
- }
.inbox-row {
background: $offwhite;
}
.inbox-row-unread {
.inbox-row {
background: $offwhite;
}
.inbox-row-unread {
}
.right {
float: right;
}
}
.right {
float: right;
}
-
- tr td,
- tr th {
- padding: $lineheight/4;
- }
- p:last-child,
- h2:last-child,
- h3:last-child,
- ol:last-child,
- ul:last-child {
- margin-bottom:0;
- }
- tr td {
- height: 30px;
- border-right: 1px solid $lightgrey;
- }
}
.inbox-row .inbox-mark-read {
}
.inbox-row .inbox-mark-read {
.note_list {
tr.creator {
.note_list {
tr.creator {
- background-color: $lightgrey;
- }
-
- td {
- padding: 3px;
- }
-
- p {
- margin-bottom: 0px;
+ background-color: $offwhite;
background: $lightgrey;
opacity: 0.7;
}
background: $lightgrey;
opacity: 0.7;
}
-
-.issues-list {
- td:nth-child(2) {
- white-space: nowrap;
- }
-}
-<table class="issues-list">
+<table class="table table-sm">
<thead>
<tr>
<th><%= t ".status" %></th>
<thead>
<tr>
<th><%= t ".status" %></th>
<% @issues.each do |issue| %>
<tr>
<td><%= t ".states.#{issue.status}" %></td>
<% @issues.each do |issue| %>
<tr>
<td><%= t ".states.#{issue.status}" %></td>
- <td><%= link_to t(".reports_count", :count => issue.reports_count), issue %></td>
+ <td class="text-nowrap"><%= link_to t(".reports_count", :count => issue.reports_count), issue %></td>
<td><%= link_to reportable_title(issue.reportable), reportable_url(issue.reportable) %></td>
<td><%= link_to issue.reported_user.display_name, user_path(issue.reported_user) if issue.reported_user %></td>
<td>
<td><%= link_to reportable_title(issue.reportable), reportable_url(issue.reportable) %></td>
<td><%= link_to issue.reported_user.display_name, user_path(issue.reported_user) if issue.reported_user %></td>
<td>
<h4><%= render :partial => "message_count" %></h4>
<% if current_user.messages.size > 0 %>
<h4><%= render :partial => "message_count" %></h4>
<% if current_user.messages.size > 0 %>
- <table class="messages">
+ <table class="table table-sm">
<thead>
<tr>
<th><%= t ".from" %></th>
<thead>
<tr>
<th><%= t ".from" %></th>
<h4><%= t ".messages", :count => current_user.sent_messages.size %></h4>
<% if current_user.sent_messages.size > 0 %>
<h4><%= t ".messages", :count => current_user.sent_messages.size %></h4>
<% if current_user.sent_messages.size > 0 %>
- <table class="messages">
+ <table class="table table-sm">
<thead>
<tr>
<th><%= t ".to" %></th>
<thead>
<tr>
<th><%= t ".to" %></th>
<%= render :partial => "notes_paging_nav" %>
<%= render :partial => "notes_paging_nav" %>
-<table class="note_list">
+<table class="table table-sm note_list">
<% unless @tokens.empty? %>
<h3><%= t ".my_tokens" %></h3>
<p><%= t ".list_tokens" %></p>
<% unless @tokens.empty? %>
<h3><%= t ".my_tokens" %></h3>
<p><%= t ".list_tokens" %></p>
+<table class="table table-sm">
<thead>
<tr>
<th><%= t ".application" %></th>
<thead>
<tr>
<th><%= t ".application" %></th>
- <table class="mapkey-table">
+ <table class="table table-sm table-borderless mapkey-table">
<% YAML.load_file(Rails.root.join("config/key.yml")).each do |name,data| %>
<% data.each do |entry| %>
<tr class="mapkey-table-entry" data-layer="<%= name %>" data-zoom-min="<%= entry["min_zoom"] %>" data-zoom-max="<%= entry["max_zoom"] %>">
<% YAML.load_file(Rails.root.join("config/key.yml")).each do |name,data| %>
<% data.each do |entry| %>
<tr class="mapkey-table-entry" data-layer="<%= name %>" data-zoom-min="<%= entry["min_zoom"] %>" data-zoom-max="<%= entry["max_zoom"] %>">
- <td class="mapkey-table-key">
+ <td class="mapkey-table-key align-middle">
<%= image_tag "key/#{name}/#{entry['image']}" %>
</td>
<td class="mapkey-table-value">
<%= image_tag "key/#{name}/#{entry['image']}" %>
</td>
<td class="mapkey-table-value">
<% end %>
</td>
<td><%= link_to trace.name, :controller => "traces", :action => "show", :display_name => trace.user.display_name, :id => trace.id %>
<% end %>
</td>
<td><%= link_to trace.name, :controller => "traces", :action => "show", :display_name => trace.user.display_name, :id => trace.id %>
- <span class="trace_summary" title="<%= trace.timestamp %>"> ...
+ <span class="deemphasize" title="<%= trace.timestamp %>"> ...
<% if trace.inserted %>
(<%= t ".count_points", :count => trace.size %>)
<% end %>
<% if trace.inserted %>
(<%= t ".count_points", :count => trace.size %>)
<% end %>
+<table class="table table-borderless table-sm">
<tr>
<td><%= t ".filename" %></td>
<td><%= @trace.name %> (<%= link_to t(".download"), trace_data_path(@trace) %>)</td>
<tr>
<td><%= t ".filename" %></td>
<td><%= @trace.name %> (<%= link_to t(".download"), trace_data_path(@trace) %>)</td>
get :inbox
assert_response :success
assert_template "inbox"
get :inbox
assert_response :success
assert_template "inbox"
- assert_select "table.messages", :count => 1 do
+ assert_select ".content-inner > table", :count => 1 do
assert_select "tr", :count => 2
assert_select "tr#inbox-#{read_message.id}.inbox-row", :count => 1
end
assert_select "tr", :count => 2
assert_select "tr#inbox-#{read_message.id}.inbox-row", :count => 1
end
get :outbox
assert_response :success
assert_template "outbox"
get :outbox
assert_response :success
assert_template "outbox"
- assert_select "table.messages", :count => 1 do
+ assert_select ".content-inner > table", :count => 1 do
assert_select "tr", :count => 2
assert_select "tr.inbox-row", :count => 1
end
assert_select "tr", :count => 2
assert_select "tr.inbox-row", :count => 1
end
assert_select "tr", :count => traces.length do |rows|
traces.zip(rows).each do |trace, row|
assert_select row, "a", Regexp.new(Regexp.escape(trace.name))
assert_select "tr", :count => traces.length do |rows|
traces.zip(rows).each do |trace, row|
assert_select row, "a", Regexp.new(Regexp.escape(trace.name))
- assert_select row, "span.trace_summary", Regexp.new(Regexp.escape("(#{trace.size} points)")) if trace.inserted?
+ assert_select row, "span", Regexp.new(Regexp.escape("(#{trace.size} points)")) if trace.inserted?
assert_select row, "td", Regexp.new(Regexp.escape(trace.description))
assert_select row, "td", Regexp.new(Regexp.escape("by #{trace.user.display_name}"))
end
assert_select row, "td", Regexp.new(Regexp.escape(trace.description))
assert_select row, "td", Regexp.new(Regexp.escape("by #{trace.user.display_name}"))
end