You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
pgfqe6ch8/app/views/news/new.html.erb

43 lines
1.4 KiB

6 years ago
<!-- <h3><%#=l(:label_news_new)%></h3> -->
<%
btn_tips = l(:label_news_notice)
label_tips = l(:label_course_news)
%>
<% if @project %>
<div class="project_r_h">
<h2 class="project_h2"><%= l(:label_news) %></h2>
</div>
<div class="hwork_new">
<%= error_messages_for @news %>
<p class="talk_top pl15" >
<%= l(:label_news_new)%>
</p>
<ul>
<%= labelled_form_for @news, :url => project_news_index_path(@project),
:html => {:id => 'news-form', :multipart => true} do |f| %>
<%= render :partial => 'news/project_form', :locals => {:f => f, :is_new => true} %>
<% end if @project %>
</ul>
<div id="preview" class="wiki"></div>
</div>
<% elsif @course %>
<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>
<% end %>
<div id="preview" class="wiki"></div>