2015-12-06 15:03:36 +08:00
|
|
|
|
<%= content_for(:header_tags) do %>
|
|
|
|
|
<%= import_ke(enable_at: false, prettify: false, init_activity: false) %>
|
|
|
|
|
<% end %>
|
|
|
|
|
|
2015-04-28 10:31:55 +08:00
|
|
|
|
<li>
|
2015-03-24 09:51:42 +08:00
|
|
|
|
<label><span class="c_red">*</span> <%= l(:field_title) %> :</label>
|
2015-03-26 11:02:18 +08:00
|
|
|
|
<input type="text" name="news[title]" class="hwork_input" id="news_title" size="60" onkeyup="regexTitle();" maxlength="60" placeholder="60个字符以内" value="<%= is_new ? '' : @news.title %>">
|
2015-03-27 16:55:23 +08:00
|
|
|
|
<p id="title_notice_span" class="ml55"></p>
|
2015-03-24 09:51:42 +08:00
|
|
|
|
</li>
|
2015-11-12 16:52:42 +08:00
|
|
|
|
<li style="margin-left: 45px;">
|
|
|
|
|
<%= f.check_box :sticky, :value => is_new ? 0 : @news.sticky %>
|
|
|
|
|
<%= label_tag 'news_sticky', l(:label_board_sticky) %>
|
|
|
|
|
</li>
|
2015-04-28 10:31:55 +08:00
|
|
|
|
<li class="mb10">
|
2015-04-03 11:19:15 +08:00
|
|
|
|
<% if is_new %>
|
|
|
|
|
<%= hidden_field_tag :asset_id,params[:asset_id],:required => false,:style => 'display:none' %>
|
|
|
|
|
<label class="fl" ><span class="c_red">*</span> <%= l(:field_description) %> :</label>
|
2015-06-12 16:26:24 +08:00
|
|
|
|
<div class="fl" style="width: 91%">
|
|
|
|
|
<%= f.kindeditor :description,:editor_id=>'news_description_editor' %>
|
|
|
|
|
</div>
|
2015-04-03 11:19:15 +08:00
|
|
|
|
<p id="description_notice_span" class="ml55"></p>
|
|
|
|
|
<% else %>
|
|
|
|
|
<label class="fl" ><span class="c_red">*</span> <%= l(:field_description) %> :</label>
|
2015-06-12 16:26:24 +08:00
|
|
|
|
<div class="fl" style="width: 91%">
|
|
|
|
|
<%= f.kindeditor :description,:editor_id=>'news_description_editor',:owner_id => @news.id,:owner_type => OwnerTypeHelper::NEWS %>
|
|
|
|
|
</div>
|
2015-04-03 11:19:15 +08:00
|
|
|
|
<p id="description_notice_span" class="ml55"></p>
|
|
|
|
|
<% end %>
|
|
|
|
|
|
2015-03-24 09:51:42 +08:00
|
|
|
|
</li>
|
|
|
|
|
<div class="cl"></div>
|
2015-04-28 10:31:55 +08:00
|
|
|
|
<li>
|
|
|
|
|
<label class="fl mt5"> <%= l(:label_attachment_plural) %> :</label>
|
2015-03-27 15:41:28 +08:00
|
|
|
|
<%= render :partial => 'attachments/new_form', :locals => {:container => @news} %>
|
|
|
|
|
<div class="cl"></div>
|
2015-03-24 17:12:51 +08:00
|
|
|
|
</li>
|
2015-08-29 17:50:15 +08:00
|
|
|
|
<li class="ml40" >
|
2015-03-26 11:02:18 +08:00
|
|
|
|
<% if is_new %>
|
2015-05-11 16:06:40 +08:00
|
|
|
|
<%= link_to l(:button_create), "javascript:void(0)", :onclick => 'submitNews();', :onmouseover => 'submitFocus(this);', :class => 'blue_btn fl c_white' %>
|
2016-07-07 15:08:34 +08:00
|
|
|
|
<%= link_to l(:button_cancel), course_news_index_path(@course), :onclick => '$("#add-news").hide()', :class => 'grey_btn fl c_white ml10' %>
|
2015-03-26 11:02:18 +08:00
|
|
|
|
<% else %>
|
2015-05-11 16:06:40 +08:00
|
|
|
|
<%= link_to l(:button_save), "javascript:void(0)", :onclick => "submitNews();",:onmouseover => 'this.focus()',:class => 'blue_btn fl c_white' %>
|
2016-07-07 15:08:34 +08:00
|
|
|
|
<%= link_to l(:button_cancel), news_path(@news), :class => 'grey_btn fl c_white ml10' %>
|
2015-03-26 11:02:18 +08:00
|
|
|
|
<% end %>
|
2015-03-24 17:12:51 +08:00
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
</li>
|
2015-06-17 17:01:03 +08:00
|
|
|
|
<!-- <#%= wikitoolbar_for 'news_description'%>-->
|