{style}{literal} {/literal}{/style} {assign var="canQuote" value=!$topicInfo.locked && $canPost}

{text key='forum+sort_on'}

{foreach from=$postList item=post key=key} {if ($showClosingPostInInfoBoxConfig && $topicHasConclusionPost && $key == 2) || (!$showClosingPostInInfoBoxConfig && key == 1)|| ($showClosingPostInInfoBoxConfig && !$topicHasConclusionPost && $key == 1)}

{text key='forum+answers'}:

{/if}
{add_content key="forum.before_post_add_content" postId=$post.id userId=$post.userId text=$post.text}
{decorator name="avatar_item" url=$avatars[$post.userId].url src=$avatars[$post.userId].src imageInfo=$avatars[$post.userId].imageInfo label=$avatars[$post.userId].label labelColor=$avatars[$post.userId].labelColor}
{$avatars[$post.userId].title} {if $post.isFirstPost} {text key='forum+first_topic_post'} {elseif $post.isClosingPost && $showClosingPostInInfoBoxConfig && {$key} == 1} {text key='forum+last_topic_post_badge'} {/if} {$post.createStamp} {if ($isModerator || ($userId == $post.userId && !$topicInfo.locked)) && $post.id != $firstTopic->id}
{component class="FORUM_MCMP_ForumPostContextMenu" topicId=$post.topicId postId=$post.id }
{/if}
{$post.text|more:400} {if $enableAttachments && isset($attachments[$post.id])}
{foreach from=$attachments[$post.id] item='attm'} {/foreach}
{/if} {if !empty($post.edited) } {/if}
{add_content key="forum.after_post_add_content" postId=$post.id userId=$post.userId text=$post.text} {if $firstTopic->id == $post.id} {add_content key='forum.topic.content.after_first_post'} {/if} {if $commentsEnabled and {!$post.isFirstPost}}
{$comments{$post.id}}
{/if}
{/foreach} {script} $(document).ready(function() { // flag post $(".owm_card_toolbar_flag").bind("click", function(e) { e.preventDefault(); OWM.flagContent($(this).parent().attr( "data-type"), $(this).parent().attr("data-id")); }); {if $canQuote } // quote post $(".owm_card_toolbar_quote").bind("click", function(e) { e.preventDefault(); // show the post form OWM.ajaxFloatBox("FORUM_MCMP_ForumAddPost", [{ "topicId" : {$topicInfo.id}, "postId" : $(this).parent().attr("data-id") }], { "title" : "{text key='forum+add_post_title'}" }); }); {/if} {if ($isModerator || ($userId == $post.userId && !$topicInfo.locked))} // delete post $(".forum_delete_post").bind("click", function(e) { e.preventDefault(); var self = $(this); var jc = $.confirm("{text key='forum+delete_post_confirm'}"); jc.buttons.ok.action = function () { $.post($(self).attr("href"), function(data) { var data = jQuery.parseJSON(data); if (data.result === true && data.url) { location.href = data.url; } }); } }); // edit post $(".forum_edit_post").bind("click", function(e) { e.preventDefault(); OWM.ajaxFloatBox("FORUM_MCMP_ForumEditPost", [{ "topicId" : "{$topicInfo.id}", "postId" : $(this).attr("data-id") }], { "title" : "{text key='forum+edit_post_title'}" }); }); {/if} }); {/script}