mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
UX: mobile topic list and suggested topics: show new/unread counts OR total post count, not both.
This commit is contained in:
parent
18d7c1c75d
commit
4b43edee91
@ -0,0 +1,5 @@
|
||||
{{#if view.showBadges}}
|
||||
{{raw "topic-post-badges" unread=topic.unread newPosts=topic.displayNewPosts unseen=topic.unseen url=topic.lastUnreadUrl}}
|
||||
{{else}}
|
||||
{{raw "list/posts-count-column" topic=topic tagName="div"}}
|
||||
{{/if}}
|
@ -5,13 +5,9 @@
|
||||
{{#each t in topics}}
|
||||
<tr {{bind-attr class="t.archived"}}>
|
||||
<td>
|
||||
<div class='main-link clearfix'>
|
||||
<div class='main-link'>
|
||||
{{topic-status topic=t}}
|
||||
{{topic-link t}}
|
||||
{{topic-post-badges unread=t.unread
|
||||
newPosts=t.new_posts
|
||||
unseen=t.unseen
|
||||
url=t.lastUnreadUrl}}
|
||||
|
||||
{{#if t.hasExcerpt}}
|
||||
<div class="topic-excerpt">
|
||||
@ -25,10 +21,14 @@
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
<div class='pull-right'>
|
||||
{{raw "list/post-count-or-badges" topic=t postBadgesEnabled="true"}}
|
||||
</div>
|
||||
<div class='clearfix'></div>
|
||||
<div class="topic-item-stats clearfix">
|
||||
<div class="pull-right">
|
||||
{{raw "list/posts-count-column" topic=t tagName="div"}}
|
||||
{{raw "list/activity-column" topic=t tagName="div" class="num activity last"}}
|
||||
<a href="{{t.lastPostUrl}}" title='{{i18n 'last_post'}}: {{{raw-date t.bumped_at}}}'>{{t.last_poster_username}}</a>
|
||||
</div>
|
||||
{{#unless controller.hideCategory}}
|
||||
<div class='category'>
|
||||
|
@ -2,13 +2,10 @@
|
||||
<div class='main-link'>
|
||||
{{raw "topic-status" topic=content}}
|
||||
{{topic-link content}}
|
||||
{{#if controller.showTopicPostBadges}}
|
||||
{{raw "topic-post-badges" unread=content.unread newPosts=content.displayNewPosts unseen=content.unseen url=content.lastUnreadUrl}}
|
||||
{{/if}}
|
||||
{{raw "list/topic-excerpt" topic=content}}
|
||||
</div>
|
||||
<div class='pull-right'>
|
||||
{{raw "list/posts-count-column" topic=content tagName="div"}}
|
||||
{{raw "list/post-count-or-badges" topic=content postBadgesEnabled=controller.showTopicPostBadges}}
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
|
||||
@ -22,8 +19,8 @@
|
||||
|
||||
<div class="pull-right">
|
||||
<div class='num activity last'>
|
||||
<a href="{{content.lastPostUrl}}" title='{{i18n 'last_post'}}: {{{raw-date content.bumped_at}}}'>{{content.last_poster_username}}</a>
|
||||
{{raw "list/activity-column" topic=content tagName="span" class="age"}}
|
||||
<a href="{{content.lastPostUrl}}" title='{{i18n 'last_post'}}: {{{raw-date content.bumped_at}}}'>{{content.last_poster_username}}</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
|
@ -0,0 +1,6 @@
|
||||
import computed from "ember-addons/ember-computed-decorators";
|
||||
|
||||
export default Ember.Object.extend({
|
||||
postCountsPresent: Ember.computed.or('topic.unread', 'topic.displayNewPosts', 'topic.unseen'),
|
||||
showBadges: Ember.computed.and('postBadgesEnabled', 'postCountsPresent')
|
||||
});
|
@ -357,7 +357,7 @@ td .main-link {
|
||||
padding: 5px 10px 5px 0;
|
||||
}
|
||||
}
|
||||
.topic-list-item {
|
||||
.topic-list {
|
||||
.posts-map {
|
||||
font-size: 1.071em;
|
||||
padding-top: 2px;
|
||||
|
Loading…
Reference in New Issue
Block a user