mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
110 lines
4.6 KiB
Handlebars
110 lines
4.6 KiB
Handlebars
{{post-gap post=this postStream=controller.postStream before="true"}}
|
|
|
|
<div class='row'>
|
|
{{view Discourse.ReplyHistory contentBinding="replyHistory"}}
|
|
</div>
|
|
|
|
<article class='boxed' {{bind-attr id="postElementId"}} {{bind-attr data-post-id="id"}} data-user-id="{{unbound user_id}}">
|
|
<div class='row'>
|
|
{{#if showUserReplyTab}}
|
|
<a href='#' {{action toggleReplyHistory this target="view"}} class='reply-to-tab'>
|
|
{{#if loadingReplyHistory}}
|
|
{{i18n loading}}
|
|
{{else}}
|
|
<i class="fa fa-mail-forward"></i>
|
|
{{avatar reply_to_user imageSize="tiny"}}
|
|
{{reply_to_user.username}}
|
|
{{/if}}
|
|
</a>
|
|
{{/if}}
|
|
<div class='topic-avatar span2'>
|
|
{{#unless userDeleted}}
|
|
<div {{bind-attr class=":contents byTopicCreator:topic-creator :trigger-expansion"}}>
|
|
<a class="main-avatar" href='{{unbound usernameUrl}}' {{action showPosterExpansion this}}>{{avatar this imageSize="large"}}</a>
|
|
|
|
</div>
|
|
{{else}}
|
|
<div class="contents">
|
|
<i class="fa fa-trash-o deleted-user-avatar"></i>
|
|
<div class="names">
|
|
<h3 class="deleted-username">{{i18n user.deleted}}</h3>
|
|
</div>
|
|
</div>
|
|
{{/unless}}
|
|
{{#if wiki}}
|
|
<div class="wiki"><i class="fa fa-pencil-square-o fa-3x"></i></div>
|
|
{{/if}}
|
|
</div>
|
|
|
|
<div class='topic-body span14'>
|
|
<div class='topic-meta-data'>
|
|
<div class="names">
|
|
<span {{bind-attr class="staff new_user :username"}}><a href='{{unbound usernameUrl}}' {{action showPosterExpansion this}}>{{unbound username}}</a>{{#if admin}}<i class='fa fa-trophy'></i>{{else}}{{#if moderator}}<i class='fa fa-magic'></i>{{/if}}{{/if}}
|
|
</span>
|
|
|
|
{{#if showName}}
|
|
<span class="full-name"><a href='{{unbound usernameUrl}}' {{action showPosterExpansion this}}>{{unbound name}}</a></span>
|
|
{{/if}}
|
|
|
|
{{#if user_title}}
|
|
{{#if primary_group_name}}
|
|
<span class="user-title"><a href='/groups/{{unbound primary_group_name}}' class='user-group'>{{unbound user_title}}</a></span>
|
|
{{else}}
|
|
<span class="user-title" {{action showPosterExpansion this}}>{{unbound user_title}}</span>
|
|
{{/if}}
|
|
{{/if}}
|
|
</div>
|
|
<div class='post-info'>
|
|
<a href='#' class='post-date' {{bind-attr data-share-url="shareUrl"}} {{bind-attr data-post-number="post_number"}}>{{unboundAgeWithTooltip created_at}}</a>
|
|
</div>
|
|
{{#if hasHistory}}
|
|
<div class='post-info edits'>
|
|
{{#if can_view_edit_history}}
|
|
<a href='#' class="{{unbound historyHeat}}" {{action showHistory this}} title="{{i18n post.last_edited_on}} {{rawDate updated_at}}">
|
|
{{editCount}}
|
|
<i class='fa fa-pencil'></i>
|
|
</a>
|
|
{{else}}
|
|
<span class="{{unbound historyHeat}}" title="{{i18n post.last_edited_on}} {{rawDate updated_at}}">
|
|
{{editCount}}
|
|
<i class='fa fa-pencil'></i>
|
|
</span>
|
|
{{/if}}
|
|
</div>
|
|
{{/if}}
|
|
</div>
|
|
|
|
<div {{bind-attr class=":select-posts controller.multiSelect::hidden"}}>
|
|
<button {{action toggledSelectedPostReplies this}} {{bind-attr class="view.canSelectReplies::hidden"}}>{{i18n topic.multi_select.select_replies}}</button>
|
|
<button {{action toggledSelectedPost this}} class="select-post">{{view.selectPostText}}</button>
|
|
</div>
|
|
|
|
<div {{bind-attr class="showUserReplyTab:avoid-tab view.repliesShown::bottom-round :contents :regular view.extraClass"}}>
|
|
{{#unless controller.multiSelect}}
|
|
|
|
{{/unless}}
|
|
<div class='cooked'>{{{cooked}}}</div>
|
|
{{#if view.showExpandButton}}
|
|
{{#if controller.loadingExpanded}}
|
|
<button class="btn expand-post" disabled>{{i18n loading}}</button>
|
|
{{else}}
|
|
<button {{action expandFirstPost this}} class='btn expand-post'>{{i18n post.show_full}}</button>
|
|
{{/if}}
|
|
{{/if}}
|
|
{{view Discourse.PostMenuView postBinding="this" postViewBinding="view"}}
|
|
</div>
|
|
{{view Discourse.RepliesView content=replies postView=view}}
|
|
{{discourse-action-history post=this}}
|
|
{{view Discourse.TopicMapContainerView post=this topic=controller.model}}
|
|
</div>
|
|
|
|
{{post-gutter post=this
|
|
links=internalLinks
|
|
canReplyAsNewTopic=topic.details.can_reply_as_new_topic
|
|
newTopicAction="replyAsNewTopic"}}
|
|
</div>
|
|
|
|
</article>
|
|
|
|
{{post-gap post=this postStream=controller.postStream before="false"}}
|