#include("./common/header.html", {site_title:"发布新帖子"})
<link rel="stylesheet" href="${base}/assets/lib/highlight/styles/default.css" />
<link rel="stylesheet" href="${base}/assets/lib/highlight/styles/github.css" />
<script src="${base}/assets/lib/highlight/highlight.pack.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
<div class="container">
    <div class="row">
        <div class="col-md-9">
            <div class="panel panel-default">
                <div class="panel-heading">
                    <h3 class="panel-title">发布新帖子</h3>
                </div>
                <div class="panel-body">
                	<form id="topic-add" role="form" method="post">
                        <div class="form-group">
                            <label for="title">标题</label>
                            <input type="text" class="form-control" id="title" name="title" placeholder="请输入帖子标题" 
                            	required="required" />
                        </div>
                        <div class="form-group">
                            <label for="nid">节点</label>
                            <select class="form-control" id="nid"  name="nid">
                                <option value ="">请选择节点</option>
                                #for(node : nodes)
			                    	#if(node.pid == 0)
			                    		#if(null != node.items)
				                    		<optgroup label="${node.node_name}">
					                     	#for(item : node.items)
					                     	<option #if(null != pid && pid == item.nid)selected="selected"#end value="${item.nid}">${item.node_name}</option>
					                     	#end
				                     	#else
				                     		<option value="${node.nid}">${node.node_name}</option>
			                    		#end
			                    	#end
			                    #end
                            </select>
                        </div>
                        
                        <div class="form-group">
                            <label for="nid">帖子内容</label>
	                        <div class="form-group">
	                            <textarea data-emojiable="true" id="content" class="form-control" 
	                            	placeholder="撸下你要发射的内容!!!" name="content" rows="8" required="required"></textarea>
	                        </div>
                        </div>
                        <div>
                        	<button type="button" class="btn btn-default btn-small preview">预览帖子</button>
							<button type="submit" class="btn btn-primary btn-small ladda-button" data-style="zoom-out">
								<span class="ladda-label">发布帖子</span>
							</button>                        	
                        </div>
                    </form>
                </div>
                <div id="markdown_preview" class="panel-footer hide"></div>
            </div>
        </div><!-- /.col-md-8 -->
        #include("./common/sidebar.html")
    </div>
</div>
<script>var comment_members = [];</script>
#include("./common/emoji.html")
#include("./common/footer.html")
</body>
</html>