forum: add back 'new' label, move status labels to right-side column.
Also prevent long usernames from wrapping. Fixes #4332.
This commit is contained in:
@@ -61,6 +61,7 @@
|
|||||||
--forum-vote-up-color: green;
|
--forum-vote-up-color: green;
|
||||||
--forum-vote-meh-color: goldenrod;
|
--forum-vote-meh-color: goldenrod;
|
||||||
--forum-vote-down-color: red;
|
--forum-vote-down-color: red;
|
||||||
|
--forum-topic-status-new-color: hsla(0, 50%, 55%, 1);
|
||||||
--forum-topic-status-pending-color: hsla(210, 25%, 55%, 1);
|
--forum-topic-status-pending-color: hsla(210, 25%, 55%, 1);
|
||||||
--forum-topic-status-approved-color: hsla(120, 25%, 55%, 1);
|
--forum-topic-status-approved-color: hsla(120, 25%, 55%, 1);
|
||||||
--forum-topic-status-rejected-color: hsla(0, 25%, 55%, 1);
|
--forum-topic-status-rejected-color: hsla(0, 25%, 55%, 1);
|
||||||
@@ -327,6 +328,7 @@ body[data-current-user-theme="dark"] {
|
|||||||
--forum-vote-up-color: var(--green-1);
|
--forum-vote-up-color: var(--green-1);
|
||||||
--forum-vote-meh-color: var(--yellow-1);
|
--forum-vote-meh-color: var(--yellow-1);
|
||||||
--forum-vote-down-color: var(--red-1);
|
--forum-vote-down-color: var(--red-1);
|
||||||
|
--forum-topic-status-new-color: var(--red-3);
|
||||||
--forum-topic-status-pending-color: var(--blue-3);
|
--forum-topic-status-pending-color: var(--blue-3);
|
||||||
--forum-topic-status-approved-color: var(--green-3);
|
--forum-topic-status-approved-color: var(--green-3);
|
||||||
--forum-topic-status-rejected-color: var(--red-3);
|
--forum-topic-status-rejected-color: var(--red-3);
|
||||||
|
|||||||
@@ -40,6 +40,15 @@ div.list-of-forum-posts {
|
|||||||
}
|
}
|
||||||
|
|
||||||
div#c-forum-topics {
|
div#c-forum-topics {
|
||||||
|
td.status-column {
|
||||||
|
white-space: nowrap;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
td.creator-column, td.updated-by-column {
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
span.topic-status {
|
span.topic-status {
|
||||||
margin-right: 0.25em;
|
margin-right: 0.25em;
|
||||||
vertical-align: bottom;
|
vertical-align: bottom;
|
||||||
@@ -48,7 +57,7 @@ div#c-forum-topics {
|
|||||||
font-size: 0.7em;
|
font-size: 0.7em;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
padding: 3px;
|
padding: 4px;
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -57,6 +66,10 @@ div#c-forum-topics {
|
|||||||
font-size: 1em;
|
font-size: 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&.new {
|
||||||
|
background-color: var(--forum-topic-status-new-color);
|
||||||
|
}
|
||||||
|
|
||||||
&.pending {
|
&.pending {
|
||||||
background-color: var(--forum-topic-status-pending-color);
|
background-color: var(--forum-topic-status-pending-color);
|
||||||
}
|
}
|
||||||
@@ -71,15 +84,11 @@ div#c-forum-topics {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#a-index {
|
#a-index {
|
||||||
tr[data-is-read="false"] .forum-post-link {
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
.updated-at-column {
|
.updated-at-column {
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.updated-by-column, .updated-at-column {
|
.creator-column, .updated-by-column, .updated-at-column {
|
||||||
@media screen and (max-width: 660px) {
|
@media screen and (max-width: 660px) {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
<%= table_for forum_topics, width: "100%" do |t| %>
|
<%= table_for forum_topics, width: "100%" do |t| %>
|
||||||
<% t.column "Title" do |topic| %>
|
<% t.column "Title" do |topic| %>
|
||||||
|
<% if !topic.is_read? %>
|
||||||
|
<span class="topic-status label new">New</span>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
<% if topic.is_sticky? %>
|
<% if topic.is_sticky? %>
|
||||||
<span class="topic-status icon stickied">
|
<span class="topic-status icon stickied">
|
||||||
<i class="fas fa-thumbtack" title="Stickied"></i>
|
<i class="fas fa-thumbtack" title="Stickied"></i>
|
||||||
@@ -24,9 +28,7 @@
|
|||||||
</span>
|
</span>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% status = forum_topic_status(topic) %>
|
<% if forum_topic_status(topic).present? %>
|
||||||
<% if status.present? %>
|
|
||||||
<span class="topic-status label <%= status %>"><%= status %></span>
|
|
||||||
<%= link_to topic.pretty_title, forum_topic_path(topic), class: "forum-post-link" %>
|
<%= link_to topic.pretty_title, forum_topic_path(topic), class: "forum-post-link" %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= link_to topic.title, forum_topic_path(topic), class: "forum-post-link" %>
|
<%= link_to topic.title, forum_topic_path(topic), class: "forum-post-link" %>
|
||||||
@@ -36,6 +38,10 @@
|
|||||||
<%= link_to "page #{topic.last_page}", forum_topic_path(topic, :page => topic.last_page), :class => "last-page" %>
|
<%= link_to "page #{topic.last_page}", forum_topic_path(topic, :page => topic.last_page), :class => "last-page" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
<% t.column "Status", width: "1%" do |topic| %>
|
||||||
|
<% status = forum_topic_status(topic) %>
|
||||||
|
<span class="topic-status label <%= status %>"><%= status %></span>
|
||||||
|
<% end %>
|
||||||
<% t.column "Creator", width: "8%" do |topic| %>
|
<% t.column "Creator", width: "8%" do |topic| %>
|
||||||
<%= link_to_user topic.creator %>
|
<%= link_to_user topic.creator %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|||||||
Reference in New Issue
Block a user