socialforge/app/views/news/_project_news_new.html.erb

60 lines
2.8 KiB
Plaintext
Raw Normal View History

2016-01-21 10:33:53 +08:00
<%= content_for(:header_tags) do %>
<%= import_ke(enable_at: true, prettify: false) %>
<% end %>
<div class="resources mt10">
<div id="new_course_news">
<div class="homepagePostBrief c_grey">
<div>
2016-01-21 16:57:13 +08:00
<input type="text" name="news[title]" id="news_title" class="InputBox w713" maxlength="60" onfocus="$('#news_editor').show()" onkeyup="regexTitle();" placeholder="发布新闻,请先输入新闻标题" value="<%= news.title%>" >
2016-01-21 10:33:53 +08:00
<p id="title_notice_span"></p>
</div>
<div id="news_editor" style="display: none;">
<div class="mt10">
<%= f.check_box :sticky, :value => edit_mode ? news.sticky : 0 %>
<%= label_tag 'news_sticky', l(:label_board_sticky) %>
<div class="cl"></div>
</div>
<div class="mt10">
<div id="news_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 :description, :editor_id => 'project_news_description_editor',
:owner_id => news.nil? ? 0: news.id,
:owner_type => OwnerTypeHelper::NEWS,
:width => '100%',
:height => 300,
:minHeight=>300,
:class => 'talk_text fl',
:input_html => { :id => 'news_content',
:class => 'talk_text fl',
:maxlength => 5000 },
at_id: news.id, at_type: news.class.to_s
%>
<div class="cl"></div>
<p id="description_notice_span"></p>
</div>
<div class="cl"></div>
<div class="mt10">
<div class="fl" id="news_attachments">
<%= render :partial => 'attachments/form_course', :locals => {:container => news, :isReply => false} %>
</div>
</div>
<div class="cl"></div>
<div class="mt5">
<%if !edit_mode %>
<a href="javascript:void(0);" class="BlueCirBtnMini fr" onclick="submitNews();">确定</a>
<span class="fr mr10 mt3">或</span>
<a href="javascript:void(0);" class="fr mr10 mt3" onclick="reset_news();">取消</a>
<% else %>
<a href="javascript:void(0);" class="BlueCirBtnMini fr" onclick="submitNews();">确定</a>
<span class="fr mr10 mt3">或</span>
<%= link_to "取消",news_path(news), :class => "fr mr10 mt3"%>
<% end %>
</div>
<div class="cl"></div>
</div>
</div>
</div>
</div>