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

28 lines
1.1 KiB
Plaintext

<%= content_for(:header_tags) do %>
<%= import_ke(enable_at: false, prettify: false, init_activity: false) %>
<% end %>
<script type="text/javascript">
$(function(){
$("#RSide").removeAttr("id");
$("#Container").css("width","1000px");
$("#news_title").focus();
});
</script>
<div class="homepageRight mt0 ml10">
<div class="homepageRightBanner">
<div class="NewsBannerName">
编辑<%= @news.project_id != -1 ? '新闻':'通知' %>
</div>
</div>
<%= labelled_form_for :news, @news, :url => news_path(@news),
:html => { :id => 'news-form', :multipart => true, :method => :put } do |f| %>
<% if @org_subfield %>
<%= render :partial => 'edit_for_org_subfield', :locals => {:f => f, :news => @news} %>
<% elsif @course %>
<%= render :partial => 'course_news_new', :locals => {:f => f, :news => @news, :edit_mode => true, :course => @course} %>
<% elsif @project %>
<%= render :partial => 'project_news_new', :locals => {:f => f, :news => @news, :edit_mode => true} %>
<% end %>
<% end %>
</div>