mirror of
https://github.com/cnodejs/nodeclub.git
synced 2026-02-01 16:34:28 +00:00
75 lines
3.4 KiB
HTML
75 lines
3.4 KiB
HTML
<%- partial('../editor_sidebar') %>
|
|
|
|
<div id='content'>
|
|
<div class='panel'>
|
|
<div class='header'>
|
|
<ol class='breadcrumb'>
|
|
<li><a href='/'>主页</a><span class='divider'>/</span></li>
|
|
<% if(typeof(action) !== 'undefined' && action == 'edit'){ %>
|
|
<li class='active'>编辑话题</li>
|
|
<% }else{ %>
|
|
<li class='active'>发布话题</li>
|
|
<% } %>
|
|
</ol>
|
|
</div>
|
|
<div class='inner post'>
|
|
<% if(typeof(edit_error) !== 'undefined' && edit_error){ %>
|
|
<div class="alert alert-error">
|
|
<a class="close" data-dismiss="alert" href="#">×</a>
|
|
<strong><%= edit_error %></strong>
|
|
</div>
|
|
<% } %>
|
|
<% if(typeof(error) !== 'undefined' && error){ %>
|
|
<div class="alert alert-error">
|
|
<strong><%= error %></strong>
|
|
</div>
|
|
<% }else{ %>
|
|
<% if (typeof(action) !== 'undefined' && action === 'edit') { %>
|
|
<form id='create_topic_form' action='/topic/<%= topic_id %>/edit' method='post'>
|
|
<% } else { %>
|
|
<form id='create_topic_form' action='/topic/create' method='post'>
|
|
<% } %>
|
|
<fieldset>
|
|
<textarea autofocus class='span9' id='title' name='title' rows='1'
|
|
placeholder="标题字数 10 字以上"
|
|
><%= typeof(title) !== 'undefined' && title || '' %></textarea>
|
|
|
|
<div class='markdown_editor in_editor'>
|
|
<div class='markdown_in_editor'>
|
|
<textarea class='editor' name='t_content' rows='20'
|
|
placeholder='文章支持 Markdown 语法, 请注意标记代码'
|
|
><%= typeof(content) !== 'undefined' && content || '' %></textarea>
|
|
|
|
<div class='editor_buttons'>
|
|
<input class='span-common action_preview' type="button" value="预览">
|
|
<input type="submit" class='span-primary submit_btn' data-loading-text="提交中"
|
|
value="提交">
|
|
</div>
|
|
</div>
|
|
<div class='markdown_in_preview'>
|
|
<div class='preview'></div>
|
|
<div class='editor_buttons'>
|
|
<input class='span-common action_modify' type="button" value="修改">
|
|
<input type="submit" class='span-primary submit_btn' data-loading-text="提交中"
|
|
value="提交">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<input type='hidden' id='topic_tags' name='topic_tags' value=''>
|
|
<input type='hidden' name='_csrf' value='<%= csrf %>'>
|
|
</fieldset>
|
|
</form>
|
|
</div>
|
|
<% } %>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- markdown editor -->
|
|
<%- Loader('/public/topic_edit.min.js')
|
|
.js('/public/libs/marked.js')
|
|
.js('/public/javascripts/markdown_editor.js')
|
|
.done(assets, config.site_static_host, config.mini_assets)
|
|
%>
|
|
|