48 lines
2.4 KiB
Plaintext
48 lines
2.4 KiB
Plaintext
<%= content_for(:header_tags) do %>
|
||
<%= import_ke(enable_at: false, prettify: false, init_activity: false) %>
|
||
<% end %>
|
||
|
||
<li>
|
||
<label><span class="c_red">*</span> <%= l(:field_title) %> :</label>
|
||
<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 %>">
|
||
<p id="title_notice_span" class="ml55"></p>
|
||
</li>
|
||
<li style="margin-left: 45px;">
|
||
<%= f.check_box :sticky, :value => is_new ? 0 : @news.sticky %>
|
||
<%= label_tag 'news_sticky', l(:label_board_sticky) %>
|
||
</li>
|
||
<li class="mb10">
|
||
<% 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>
|
||
<div class="fl" style="width: 91%">
|
||
<%= f.kindeditor :description,:editor_id=>'news_description_editor' %>
|
||
</div>
|
||
<p id="description_notice_span" class="ml55"></p>
|
||
<% else %>
|
||
<label class="fl" ><span class="c_red">*</span> <%= l(:field_description) %> :</label>
|
||
<div class="fl" style="width: 91%">
|
||
<%= f.kindeditor :description,:editor_id=>'news_description_editor',:owner_id => @news.id,:owner_type => OwnerTypeHelper::NEWS %>
|
||
</div>
|
||
<p id="description_notice_span" class="ml55"></p>
|
||
<% end %>
|
||
|
||
</li>
|
||
<div class="cl"></div>
|
||
<li>
|
||
<label class="fl mt5"> <%= l(:label_attachment_plural) %> :</label>
|
||
<%= render :partial => 'attachments/new_form', :locals => {:container => @news} %>
|
||
<div class="cl"></div>
|
||
</li>
|
||
<li class="ml40" >
|
||
<% if is_new %>
|
||
<%= link_to l(:button_create), "javascript:void(0)", :onclick => 'submitNews();', :onmouseover => 'submitFocus(this);', :class => 'blue_btn fl c_white' %>
|
||
<%= link_to l(:button_cancel), course_news_index_path(@course), :onclick => '$("#add-news").hide()', :class => 'grey_btn fl c_white ml10' %>
|
||
<% else %>
|
||
<%= link_to l(:button_save), "javascript:void(0)", :onclick => "submitNews();",:onmouseover => 'this.focus()',:class => 'blue_btn fl c_white' %>
|
||
<%= link_to l(:button_cancel), news_path(@news), :class => 'grey_btn fl c_white ml10' %>
|
||
<% end %>
|
||
<div class="cl"></div>
|
||
</li>
|
||
<!-- <#%= wikitoolbar_for 'news_description'%>-->
|