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

34 lines
1.3 KiB
Plaintext

<script type="text/javascript">
$(function(){
$("#RSide").removeAttr("id");
$("#Container").css("width","1000px");
});
function reset_news(){
$("#news_title").val("");
$("#title_notice_span").text("");
$("#description_notice_span").text("");
document.getElementById("news_sticky").checked=false;
$("#news_attachments").html("<%= escape_javascript(render :partial => 'attachments/new_form', :locals => {:container => News.new})%>");
news_description_editor.html("");
$("#news_editor").toggle();
}
<% if @is_new%>
$(function(){
$("#news_title").focus();
});
<%end%>
</script>
<div class="homepageRight mt0 ml10">
<div class="homepageRightBanner">
<div class="NewsBannerName">
竞赛通知
</div>
</div>
<% if contest && User.current.admin_of_contest?(@contest) %>
<%= labelled_form_for @news, :url => {:controller => 'news', :action => 'new', :contest_id => @contest.id},
:html => {:id => 'news-form', :nhname => 'form', :multipart => true} do |f| %>
<%= render :partial => 'contest_news_new', :locals => {:f => f, :news => @news, :edit_mode => false, :contest => @contest} %>
<% end %>
<% end %>
<%= render :partial=> 'contest_news_detail', :locals =>{:newss => @newss, :page => 0} %>
</div>