{{extend "forums_layout.html"}}

{{block sub_menu}}
{{sub_menu(menu_items, 'forum')}}
{{end}}

{{block forum_nav}}
    <ul class="breadcrumb">
      <li>
        <a href="{{=url_for('plugs.forums.views.ForumView.list')}}" class="home" title="首页">论坛首页</a> <span class="divider">/</span>
      </li>
      <li>
        <a href="/forum/{{=forum.id}}">{{=forum.name}}</a> <span class="divider">/</span>
      </li>
      <li class="active">
        <a href="/forum/{{=forum.id}}/{{=topic.id}}">{{=topic.subject}}</a>
      </li>
    </ul>
{{end}}

{{block content_main}}
<style>
    #field_subject {width:80%;}
</style>
{{use "xheditor"}}
<div class="content">
    <div class="box center">
        <h2 class="section">修改内容</h2>
        <div class="box-body">
            {{<< form}}
        </div>
    </div>
</div>
{{include "inc_xheditor_plugins.html"}}
<script type="text/javascript">
    $(function(){
        $('textarea').xheditor({
            tools:'Cut,Copy,Paste,Pastetext,|,Blocktag,Fontface,FontSize,Bold,Italic,Underline,Strikethrough,FontColor,BackColor,SelectAll,Removeformat,|,Align,List,Outdent,Indent,|,Link,Unlink,Anchor,Img,Flash,Hr,Emot,Table,Code,Quote,|,About',
            skin:'vista',
            upLinkUrl:"!/forum/upload_file?forum_id={{=forum.id}}&slug={{=topic.slug}}",
            upFlashUrl:"!/forum/upload_file?forum_id={{=forum.id}}&slug={{=topic.slug}}",
            upFlashExt:"swf",
            upImgUrl:"!/forum/upload_image?forum_id={{=forum.id}}&slug={{=topic.slug}}",
            plugins:plugins,
            localUrlTest:/^https?:\/\/[^\/]*?(xxx\.com)\//i,
            remoteImgSaveUrl:'/forum/paste_image?forum_id={{=forum.id}}&slug={{=topic.slug}}'
        });
        
    });
</script>
{{end}}
