{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%; } {/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; } }); }); document.flag = function(type, id, title, url, langKey){ if(typeof(document.addRoleStorage) === 'undefined'){ document.storage = []; } $.post( '{/literal}{url_for for="BASE_CTRL_Flag:form"}{literal}', {type: type, id: id, title: title, url: url, langKey: langKey}, function(json){ if( typeof(json.isFlagged) != 'undefined' ){ OW.warning("{/literal}{text key="base+flag_already_flagged"}{literal}"); return; } document.storage['flag-panel'] = { fb: new OW_FloatBox({$title: '{/literal}{text key='base+flag_as'}{literal}', $contents: json['markup'], width: '315px'}) } OW.addCss(json.css); OW.addScriptFiles(json['include_js'], function(){ OW.addScript(json['js']); }); }, 'json'); } {/literal} {/script} {if $isHidden}
{$componentForumCaption}
{/if} {$breadcrumb}
{$paging}
{$search}
{foreach from=$postList item=post name=postList}
{capture name='info_string'}
{$avatars[$post.userId].title} {$post.createStamp}
{text key='forum+permalink_label' permalink=$post.permalink number=$post.number}
{/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] }
{/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 $canPost || $isModerator} {form name='add-post-form'} {block_decorator name='box_cap' iconClass='ow_ic_write' langLabel='forum+add_post_title'}{/block_decorator} {block_decorator name='box' addClass='ow_stdmargin ow_center'} {input name='text' class="ow_smallmargin"} {error name='text'}
{if $enableAttachments}   {text key='forum+attach_files'}

{input name='attachments'}
{/if} {submit name='submit'} {/block_decorator} {/form} {/if}
{if $canEdit && $isOwner || $isModerator || $canSubscribe || $isSubscribed}
{block_decorator name='box_cap' iconClass='ow_ic_info' langLabel='forum+this_topic'}{/block_decorator} {block_decorator name='box' addClass='ow_stdmargin'} {if $canSubscribe || $isSubscribed} {/if} {/block_decorator}
{/if}
{if !$isHidden || $canMoveToHidden} {*Move topic form*} {/if}