mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
work in progress new category list page
This commit is contained in:
parent
1ee49798b2
commit
e82d975279
@ -4,7 +4,6 @@
|
|||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class='category'>{{i18n categories.category}}</th>
|
<th class='category'>{{i18n categories.category}}</th>
|
||||||
<th class='posters'>{{i18n categories.participants}}</th>
|
|
||||||
<th class='num topics'>{{i18n categories.topics}}</th>
|
<th class='num topics'>{{i18n categories.topics}}</th>
|
||||||
<th class='num posts'>{{i18n categories.posts}}</th>
|
<th class='num posts'>{{i18n categories.posts}}</th>
|
||||||
<th class='latest'>{{i18n categories.latest}}</th>
|
<th class='latest'>{{i18n categories.latest}}</th>
|
||||||
@ -20,25 +19,35 @@
|
|||||||
{{#if newTopics}}
|
{{#if newTopics}}
|
||||||
<a href={{unbound url}} class='badge new-posts badge-notification' title='{{i18n topic.new_topics count="newTopics"}}'>{{unbound newTopics}} <i class='icon icon-asterisk'></i></a>
|
<a href={{unbound url}} class='badge new-posts badge-notification' title='{{i18n topic.new_topics count="newTopics"}}'>{{unbound newTopics}} <i class='icon icon-asterisk'></i></a>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
<div class='featured-users'>
|
||||||
|
{{#each featured_users}}
|
||||||
|
<a href="/users/{{unbound username_lower}}">{{avatar this imageSize="small"}}</a>
|
||||||
|
{{/each}}
|
||||||
|
</div>
|
||||||
{{#if description_excerpt}}
|
{{#if description_excerpt}}
|
||||||
<div class="category-description">
|
<div class="category-description">
|
||||||
{{{description_excerpt}}}
|
{{{description_excerpt}}}
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</td>
|
</td>
|
||||||
<td>{{#each featured_users}}
|
<td class='num'>{{number topic_count}}</td>
|
||||||
<a href="/users/{{unbound username_lower}}">{{avatar this imageSize="small"}}</a>
|
<td class='num'>{{number post_count}}</td>
|
||||||
{{/each}}
|
|
||||||
</td>
|
|
||||||
<td>{{number topic_count}}</td>
|
|
||||||
<td>{{number post_count}}</td>
|
|
||||||
{{#with latestTopic}}
|
{{#with latestTopic}}
|
||||||
<td {{bindAttr class="archived"}}>
|
<td {{bindAttr class="archived"}}>
|
||||||
{{topicStatus topic=this}}
|
{{topicStatus topic=this}}
|
||||||
{{{topicLink this}}}
|
<a class='title' href="{{unbound lastUnreadUrl}}">{{{unbound fancy_title}}}</a>
|
||||||
<div class='lastUserInfo'>
|
{{#if unread}}
|
||||||
{{i18n categories.by}} <a href="{{{unbound lastPosterUrl}}}">{{unbound last_poster.username}}</a>
|
<a href="{{unbound lastUnreadUrl}}" class='badge unread badge-notification' title='{{i18n topic.unread_posts count="unread"}}'>{{unbound unread}}</a>
|
||||||
{{unboundAge last_posted_at}}
|
{{/if}}
|
||||||
|
{{#if new_posts}}
|
||||||
|
<a href="{{unbound lastUnreadUrl}}" class='badge new-posts badge-notification' title='{{i18n topic.new_posts count="new_posts"}}'>{{unbound new_posts}}</a>
|
||||||
|
{{/if}}
|
||||||
|
{{#if unseen}}
|
||||||
|
<a href="{{unbound lastUnreadUrl}}" class='badge new-posts badge-notification' title='{{i18n topic.new}}'><i class='icon icon-asterisk'></i></a>
|
||||||
|
{{/if}}
|
||||||
|
<div class='last-user-info'>
|
||||||
|
{{i18n categories.latest_by}} <a href="{{{unbound lastPosterUrl}}}">{{unbound last_poster.username}}</a>
|
||||||
|
<a href="{{unbound lastPostUrl}}">{{unboundAge last_posted_at}}</a>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
{{/with}}
|
{{/with}}
|
||||||
|
@ -193,8 +193,21 @@
|
|||||||
|
|
||||||
|
|
||||||
#topic-list.categories {
|
#topic-list.categories {
|
||||||
|
.last-user-info {
|
||||||
|
font-size: 12px;
|
||||||
|
margin-top: 3px;
|
||||||
|
}
|
||||||
|
tbody td {
|
||||||
|
padding-bottom: 20px;
|
||||||
|
}
|
||||||
.category{
|
.category{
|
||||||
width: 50%;
|
position: relative;
|
||||||
|
width: 55%;
|
||||||
|
.featured-users {
|
||||||
|
position: absolute;
|
||||||
|
right: 5px;
|
||||||
|
top: 3px;
|
||||||
|
}
|
||||||
.category-description {
|
.category-description {
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
}
|
}
|
||||||
|
@ -20,9 +20,8 @@ class ListableTopicSerializer < BasicTopicSerializer
|
|||||||
:archived
|
:archived
|
||||||
|
|
||||||
has_one :last_poster, serializer: BasicUserSerializer, embed: :objects
|
has_one :last_poster, serializer: BasicUserSerializer, embed: :objects
|
||||||
|
def include_last_poster?
|
||||||
def include_associations!
|
object.include_last_poster
|
||||||
include! :last_poster if object.include_last_poster
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def bumped
|
def bumped
|
||||||
|
@ -185,11 +185,10 @@ en:
|
|||||||
|
|
||||||
categories:
|
categories:
|
||||||
category: "Category"
|
category: "Category"
|
||||||
participants: "Participants"
|
|
||||||
posts: "Posts"
|
posts: "Posts"
|
||||||
topics: "Topics"
|
topics: "Topics"
|
||||||
latest: "Latest"
|
latest: "Latest"
|
||||||
by: "by"
|
latest_by: "latest by"
|
||||||
|
|
||||||
user:
|
user:
|
||||||
said: "{{username}} said:"
|
said: "{{username}} said:"
|
||||||
|
Loading…
Reference in New Issue
Block a user