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

37 lines
1.4 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})%>");
project_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 @project && User.current.allowed_to?(:manage_news, @project) %>
<%= labelled_form_for @news, :url =>{:controller=>'news',:action => 'new', :project_id => @project.id},
:html => {:nhname=>'form',:multipart => true, :id => 'news-form'} do |f| %>
<%= render :partial => 'project_news_new', :locals => {:f => f, :news => @news, :edit_mode => false} %>
<% end %>
<% end %>
<%= render :partial=> 'project_news_detail',:locals =>{:all_news => @newss, :page => 0} %>
</div>