This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/assets/javascripts/discourse/templates/post.js.handlebars
2014-08-06 17:14:01 -04:00

94 lines
3.8 KiB
Handlebars

{{post-gap post=this postStream=controller.postStream before="true"}}
<div class='row'>
{{view 'reply-history' content=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>&nbsp;
{{avatar reply_to_user imageSize="tiny"}}
{{reply_to_user.username}}
{{/if}}
</a>
{{/if}}
<div class='topic-avatar'>
{{#unless userDeleted}}
<div {{bind-attr class=":contents byTopicCreator:topic-creator"}}>
{{poster-avatar action="expandPostUser" post=this classNames="main-avatar"}}
</div>
{{else}}
<div class="contents">
<i class="fa fa-trash-o deleted-user-avatar"></i>
</div>
{{/unless}}
{{#if wiki}}
<div {{action editPost this}} class="wiki" title="{{i18n post.wiki.about}}"><i class="fa fa-pencil-square-o fa-3x"></i></div>
{{/if}}
</div>
<div class='topic-body'>
<div class='topic-meta-data'>
{{poster-name post=this expandAction="expandPostUser"}}
<div class='post-info'>
<a class='post-date' {{bind-attr href="shareUrl" data-share-url="shareUrl" data-post-number="post_number"}}>{{age-with-tooltip 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}} {{raw-date updated_at}}">
{{editCount}}
<i class='fa fa-pencil'></i>
</a>
{{else}}
<span class="{{unbound historyHeat}}" title="{{i18n post.last_edited_on}} {{raw-date updated_at}}">
{{editCount}}
<i class='fa fa-pencil'></i>
</span>
{{/if}}
</div>
{{/if}}
<div {{bind-attr class=":read-state read"}} title="{{i18n post.unread}}"><i class='fa fa-circle'></i></div>
</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"}}>
<div class='cooked'>
{{{cooked}}}
</div>
{{#if cooked_hidden}}
<a href {{action expandHidden this}}>{{i18n post.show_hidden}}</a>
{{/if}}
{{#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}}&hellip;</button>
{{/if}}
{{/if}}
{{view 'post-menu' post=this adminMenu=view.adminMenu}}
</div>
{{view 'replies' content=replies}}
{{discourse-action-history post=this}}
{{view 'topic-map-container' 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"}}