FIX: Add a custom mobile view for the assigned-topics-list (#33)

This commit is contained in:
Roman Rizzi 2019-05-08 21:53:45 -03:00 committed by Sam
parent 1eaeb39749
commit 2f5af6e2cb
3 changed files with 77 additions and 2 deletions

View File

@ -0,0 +1,43 @@
<td>
<div class='main-link'>
{{topic-status topic=topic}}
{{~#if isPrivateMessage}}
{{~d-icon "envelope" class="private-message-icon"}}
{{~/if}}
{{~topic-link topic}}
{{#if topic.unseen}}
<span class="badge-notification new-topic"></span>
{{/if}}
{{#if topic.hasExcerpt}}
<div class="topic-excerpt">
{{{topic.excerpt}}}
{{#if topic.excerptTruncated}}
{{#unless topic.canClearPin}}<a href="{{unbound topic.url}}">{{i18n 'read_more'}}</a>{{/unless}}
{{/if}}
{{#if topic.canClearPin}}
<a href {{action "clearPin" topic}} title="{{i18n 'topic.clear_pin.help'}}">{{i18n 'topic.clear_pin.title'}}</a>
{{/if}}
</div>
{{/if}}
</div>
<div class='pull-right'>
{{assign-actions-dropdown topic=topic
user=username
unassign=unassign
reassign=reassign}}
</div>
<div class='clearfix'></div>
<div class="topic-item-stats clearfix">
{{discourse-tags topic mode="list" tagsForUser=tagsForUser}}
<div class="pull-right">
{{raw "list/activity-column" topic=topic tagName="div" class="num activity last"}}
<a href="{{topic.lastPostUrl}}" title='{{i18n 'last_post'}}: {{{raw-date topic.bumped_at}}}'>{{topic.last_poster_username}}</a>
</div>
{{#unless hideCategory}}
<div class='category'>
{{category-link topic.category}}
</div>
{{/unless}}
<div class="clearfix"></div>
</div>
</td>

View File

@ -0,0 +1,30 @@
{{#conditional-loading-spinner condition=loading}}
{{#if hasIncoming}}
<div class="show-mores">
<div class='alert alert-info clickable' {{action showInserted}}>
{{count-i18n key="topic_count_" suffix="latest" count=incomingCount}}
</div>
</div>
{{/if}}
{{#if topics}}
<table class="topic-list">
<tbody>
{{#each topics as |t|}}
{{assigned-topic-list-item topic=t
expandGloballyPinned=expandGloballyPinned
expandAllPinned=expandAllPinned
lastVisitedTopic=lastVisitedTopic
selected=selected
tagsForUser=tagsForUser
unassign=unassign
reassign=reassign}}
{{/each}}
</tbody>
</table>
{{else}}
<div class='alert alert-info'>
{{i18n 'choose_topic.none_found'}}
</div>
{{/if}}
{{/conditional-loading-spinner}}

View File

@ -75,6 +75,8 @@
} }
} }
.private-message-icon { .topic-list-item {
margin-right: 5px; .private-message-icon {
margin-right: 5px;
}
} }