2014-01-08 20:18:32 +08:00
|
|
|
<!-- <h3><%=l(:label_news_new)%></h3> -->
|
2014-06-27 15:58:41 +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 %>
|
|
|
|
<%= labelled_form_for @news, :url => course_news_index_path(@course),
|
|
|
|
: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(:course_id => @course), 'news-form', target='preview', {:class => 'whiteButton m3p10'} %>
|
|
|
|
<% end %>
|
2013-08-01 10:33:49 +08:00
|
|
|
<% end %>
|
|
|
|
<div id="preview" class="wiki"></div>
|