<%= content_for(:header_tags) do %>
    <%= import_ke(enable_at: true, prettify: false) %>
    <%= javascript_include_tag 'blog' %>
<% end %>

<div class="resources mt10">
  <div id="new_course_topic">
    <div class="homepagePostBrief c_grey">
      <div>
        <input  type="text" value="<%= article.title%>" name="blog_comment[title]" id="message_subject" class="InputBox  w713" maxlength="255"  onkeyup="regexTopicSubject();" placeholder="发布文章，请先输入文章标题" />
        <p id="subjectmsg"></p>
      </div>
      <div id="topic_editor" style="display: block;">
        <%if User.current.id == user.id%>
            <div class="mt10">
              <%= f.check_box :sticky%>
              <%= label_tag 'message_sticky', l(:label_board_sticky) %>
              <%= f.check_box :locked%>
              <%= label_tag 'message_locked', l(:label_board_locked) %>
              <div class="cl"></div>
            </div>
        <% end %>
        <div class="mt10">
          <div id="message_quote" class="wiki" style="width: 92%;word-break: break-all;word-wrap: break-word;margin-left: 40px;"></div>
          <%= text_area :quote,:quote,:style => 'display:none' %>
          <%= hidden_field_tag :asset_id,params[:asset_id],:required => false,:style => 'display:none' %>

          <%= f.kindeditor :content,:editor_id => 'message_content_editor',
                           :owner_id => article.nil? ? 0: article.id,
                           :owner_type => OwnerTypeHelper::BLOGCOMMENT,
                           :width => '100%',
                           :height => 300,
                           :minHeight=>300,
                           :class => 'talk_text fl',
                           :input_html => { :id => 'message_content',
                                            :class => 'talk_text fl',
                                            :maxlength => 5000 },
                           act_id: article.id, act_type: article.class.to_s
          %>
          <div class="cl"></div>
          <p id="message_content_span"></p>
        </div>
        <div class="cl"></div>
        <div class="mt10">
          <div class="fl" id="topic_attachments">
            <%= render :partial => 'blog_comments/blog_attachments', :locals => {:container => article} %>
          </div>
        </div>
        <div class="cl"></div>
        <div class="mt5">
          <a href="javascript:void(0);" class="BlueCirBtnMini fr" onclick="submit_article();">确定</a>
          <span class="fr mr10 mt3">或</span>
          <a href="<%= user_blog_blog_comment_path(:user_id=>article.author.id,:blog_id=>article.blog_id,:id=>article.id)%>" class="fr mr10 mt3" >取消</a>
        </div>
        <div class="cl"></div>
      </div>
    </div>
  </div>
</div>