{style} {literal} .ow_forum_attachment_icon { display: inline-block; background-repeat: no-repeat; cursor: pointer; width: 14px; height: 17px; } .forum_attachments_label { margin: 15px 0 5px; padding-left: 5px; font-weight: bold; } .forum_add_post .jhtmlarea { margin: 0px auto; } .post_content img { max-width: 100%; } .post_content { overflow: hidden; } {/literal} {/style} {script} {literal} $('#toggle_attach_link').click(function(){ $('#attach_file_inputs').toggle(); }); $('#toggle_attach_edit_link').click(function(){ $('#attach_edit_file_inputs').toggle(); }); $(".ow_forum_attachment").hover( function(){ $(this).find("a.forum_delete_attachment").show(); }, function(){ $(this).find("a.forum_delete_attachment").hide(); } ); $("a.forum_delete_attachment").each(function(){ var container_handler = $(this).parent(); $(this).click(function(){ if ( confirm(OW.getLanguageText('forum', 'confirm_delete_attachment')) ) { var attachment_id = $(this).attr("rel"); var params = {}; var url = '{/literal}{url_for_route for='forum_delete_attachment'}{literal}'; params['attachmentId'] = attachment_id; $.ajaxSetup({dataType: 'json'}); $.post(url, params, function(data){ if ( data.result == true ) { OW.info(data.msg); container_handler.remove(); } else if (data.error != undefined) { OW.warning(data.error); } }); } else { return false; } }); }); {/literal} {/script} {if $isHidden}
{$componentForumCaption}
{/if} {$breadcrumb}
{$paging}
{$search}
{foreach from=$postList item=post name=postList} {capture assign='tpl'} {capture name='info_string'} {$avatars[$post.userId].title} {$post.createStamp} {/capture} {capture name='content'}
{$post.text}
{if $post.edited}
{text key='forum+post_edited'} {$avatars[$post.edited.userId].title} {$post.edited.editStamp}
{/if} {if $enableAttachments && isset($attachments[$post.id])}
{text key='forum+attachments'}:
{foreach from=$attachments[$post.id] item='attm'}   {if $attm.downloadUrl != ''}{$attm.fileName}{else}{$attm.fileName}{/if} ({$attm.fileSize}Kb) {if $isModerator || ($userId == $post.userId && !$topicInfo.locked)} delete {/if}
{/foreach}
{/if} {/capture} {decorator name='ipc' avatar=$avatars[$post.userId] content=$smarty.capture.content infoString=$smarty.capture.info_string toolbar=$toolbars[$post.id] } {/capture} {if $page==1 && $smarty.foreach.postList.first} {block_decorator name='box' addClass=' ow_stdmargin clearfix' capEnabled=false}
{$tpl}
{/block_decorator} {add_content key='socialsharing.get_sharing_buttons'} {add_content key='forum.topic.content.after_first_post'} {else}
{$tpl}
{/if} {/foreach}
{$paging}
{if $topicInfo.sticky} {block_decorator name='box' type='empty' addClass='ow_smallmargin ow_center'}
{text key='forum+topic_is_sticky'}
{/block_decorator} {/if}
{if $topicInfo.locked} {block_decorator name='box' type='empty' addClass='ow_smallmargin ow_center'}
{text key='forum+topic_is_locked'}
{/block_decorator} {elseif ( !$isHidden && ($canPost || $isModerator) ) || ( $isHidden && $canPost ) } {if $pvtforum && (!isModerator || !isOwner || !$pvtadmin)} Not Authorized To Post Replies {else} {form name='add-post-form'} {block_decorator name='box' iconClass='ow_ic_write' langLabel='forum+add_post_title' addClass='ow_stdmargin'} {input name='text' class="ow_smallmargin"} {error name='text'}
{if $enableAttachments}   {text key='forum+attach_files'}

{input name='attachments'}
{/if}
{submit name='submit' class='ow_positive'}
{/block_decorator} {/form} {/if} {/if} {if $isHidden && !$canPost} {block_decorator name='box' type='empty' addClass='ow_smallmargin ow_center'}
{$postReplyPermissionErrorText}
{/block_decorator} {/if}
{if $canEdit && $isOwner || $isModerator || $canSubscribe || $isSubscribed || $canLock}
{block_decorator name='box' iconClass='ow_ic_info' langLabel='forum+this_topic' addClass='ow_stdmargin'} {if $canSubscribe || $isSubscribed} {/if} {/block_decorator}
{/if}
{if !$isHidden || $canMoveToHidden} {*Move topic form*} {/if}