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
2013-07-12 16:38:21 -04:00

77 lines
3.1 KiB
Handlebars

<div class='row'>
<section class='embedded-posts top parent-post span14 offset2' style='display:none'>
{{#if view.parentPost}}
{{view Discourse.ParentView contentBinding="view.parentPost" postViewBinding="view"}}
{{/if}}
</section>
</div>
<article class='boxed' {{bindAttr id="postElementId"}} {{bindAttr data-post-id="id"}} data-user-id="{{unbound user_id}}">
<div class='row'>
{{#if showUserReplyTab}}
<a href='#' {{action toggleParent target="view"}} class='reply-to-tab'>
{{#if loadingParent}}
{{i18n loading}}
{{else}}
{{i18n post.in_reply_to}}
{{avatar reply_to_user imageSize="tiny"}}
{{reply_to_user.username}}
{{/if}}
</a>
{{/if}}
<div class='topic-meta-data span2'>
<div {{bindAttr class=":contents byTopicCreator:topic-creator"}}>
<a href='{{unbound usernameUrl}}'>{{avatar this imageSize="large"}}</a>
<h3 {{bindAttr class="staff new_user"}}><a href='{{unbound usernameUrl}}'>{{breakUp username}}</a></h3>
{{#if user_title}}<div class="user-title">{{user_title}}</div>{{/if}}
</div>
</div>
<div class='topic-body span14'>
{{#if controller.multiSelect}}
<button class='post-select' {{action selectPost this}}>{{view.selectText}}</button>
{{/if}}
<div {{bindAttr class="showUserReplyTab:avoid-tab view.repliesHidden:bottom-round :contents :regular view.extraClass"}}>
{{view Discourse.PrependPostView postBinding="this"}}
{{#unless controller.multiSelect}}
<div class='topic-meta-data-inside'>
{{#if hasHistory}}
<div class='post-info edits'>
<a href='#' class="{{unbound historyHeat}}" {{action showHistory this}} title="{{unboundDate updated_at}}">
{{editCount}}
<i class='icon-pencil'></i>
</a>
</div>
{{/if}}
<div class='post-info'>
<a href='#' class='post-date' {{bindAttr data-share-url="shareUrl"}}>{{unboundAgeWithTooltip created_at}}</a>
</div>
</div>
{{/unless}}
{{view Discourse.RawDivView class="cooked" contentBinding="cooked"}}
{{view Discourse.PostMenuView postBinding="this" postViewBinding="view"}}
</div>
{{view Discourse.RepliesView contentBinding="replies" postViewBinding="view"}}
{{view Discourse.ActionsHistoryView contentBinding="actionsHistory"}}
{{#if deleted}}
<div class='post-actions'>
{{i18n post.deleted_by}} {{avatar postDeletedBy imageSize="tiny"}} {{unboundAge postDeletedAt}}
</div>
{{/if}}
{{view Discourse.TopicSummaryView postBinding="this"}}
</div>
<div class='span5 gutter'>
{{collection contentBinding="internalLinks" itemViewClass="Discourse.PostLinkView" tagName="ul" classNames="post-links"}}
{{#if topic.details.can_reply_as_new_topic}}
<a href='#' class='reply-new' {{action replyAsNewTopic this}}><i class='icon icon-plus'></i>{{i18n post.reply_as_new_topic}}</a>
{{/if}}
</div>
</div>
</article>