2014-10-23 11:30:34 +08:00
|
|
|
<!-- <h3><%#=l(:label_news_new)%></h3> -->
|
2015-03-24 17:12:51 +08:00
|
|
|
<%
|
|
|
|
btn_tips = l(:label_news_notice)
|
|
|
|
label_tips = l(:label_course_news)
|
|
|
|
%>
|
2014-10-23 11:30:34 +08:00
|
|
|
<% if @project %>
|
|
|
|
<%= labelled_form_for @news, :url => project_news_index_path(@project),
|
|
|
|
:html => {:id => 'news-form', :multipart => true} do |f| %>
|
|
|
|
<%= render :partial => 'news/form', :locals => {:f => f} %>
|
|
|
|
<%= submit_tag l(:button_create), :class => "whiteButton m3p10 h30" %>
|
|
|
|
<%#= preview_link preview_news_path(:project_id => @project), 'news-form', target='preview', {:class => 'whiteButton m3p10'} %>
|
|
|
|
<% end %>
|
|
|
|
<% elsif @course %>
|
2015-03-24 17:12:51 +08:00
|
|
|
<div class="project_r_h">
|
|
|
|
<h2 class="project_h2"><%= label_tips %></h2>
|
|
|
|
</div>
|
|
|
|
<div class="hwork_new">
|
|
|
|
<%= error_messages_for @news %>
|
|
|
|
<p class="talk_top pl15" >
|
|
|
|
<%= l(:bale_news_notice)%>
|
|
|
|
</p>
|
|
|
|
<ul>
|
|
|
|
<%= labelled_form_for @news, :url => course_news_index_path(@course),
|
|
|
|
:html => {:id => 'news-form', :multipart => true} do |f| %>
|
|
|
|
<%= render :partial => 'news/course_form', :locals => {:f => f, :is_new => true} %>
|
|
|
|
|
|
|
|
<% end if @course %>
|
|
|
|
</ul>
|
|
|
|
<div id="preview" class="wiki"></div>
|
|
|
|
</div>
|
2014-10-23 11:30:34 +08:00
|
|
|
<% end %>
|
|
|
|
<div id="preview" class="wiki"></div>
|