{script} {literal} $("a.blog_delete_attachment").each(function(){ $(this).click(function(){ if ( confirm(OW.getLanguageText('blog', 'confirm_delete_attachment')) ) { var attachment_id = $(this).data("aid"); var attachmentDeleteCode = $(this).attr("code"); var params = {}; var url = '{/literal}{url_for_route for='blog_delete_attachment'}{literal}'; params['attachmentId'] = attachment_id; if(attachmentDeleteCode!=null && attachmentDeleteCode!=undefined) { params['attachmentDeleteCode'] = attachmentDeleteCode; } $.ajaxSetup({dataType: 'json'}); $.post(url, params, function(data){ if ( data.result == true ) { OW.info(data.msg); window.location = window.location; } else if (data.error != undefined) { OW.warning(data.error); } }); } else { return false; } }); }); {/literal} {/script}
{block_decorator name='box' type='empty' toolbar=$tb addClass="ow_stdmargin"}
{$info.dto->post}

{$paging}
{/block_decorator} {add_content key='socialsharing.get_sharing_buttons' title=$info.dto->title description=$info.dto->post entityType='blogs' entityId=$info.dto->id} {add_content key='blogs.blog_view.content.after_blog_post'} {if $adjasentUrl} {block_decorator name="box" addClass="ow_stdmargin"}
{if $adjasentUrl.prev|count_characters > 0} {text key="blogs+prev_post"}        {/if}
{if $adjasentUrl.next|count_characters > 0}        {text key="blogs+next_post"} {/if}
     {text key="blogs+blog_index"}
{/block_decorator} {/if} {$comments}
{block_decorator name="box" addClass="ow_stdmargin" langLabel="blogs+post_title" iconClass="ow_ic_picture"} {if $isAuthorExists} {/if}
{text key="blogs+by"} {user_link name=$displayname username=$username}
{text key="blogs+added"} {format_date timestamp=$info.dto->timestamp}
{$my_bolgs_url}
{/block_decorator}
{if isset($attachments)}
{block_decorator name="box" addClass="ow_stdmargin" langLabel="base+attch_attachment_label" iconClass="ow_ic_picture"} {foreach from=$attachments item='attm'}
{$attm.fileName} ({$attm.fileSize}Kb)
{if isset($canEdit) && $canEdit==true}
{if isset($attachmentDeleteCode)} {else} {/if}
{/if}
{/foreach} {/block_decorator}
{/if}
{$tagCloud}
{$rate}
{if isset($archive) && isset($dateParsed)}
{if $isAuthorExists} {block_decorator name="box" langLabel="blogs+blog_archive_lbl_archives" iconClass="ow_ic_clock"} {assign var="uname" value=$author->getUsername() } {/block_decorator} {/if}
{/if}