2014-06-11 16:46:13 +08:00
|
|
|
<%
|
|
|
|
btn_tips = l(:label_news_notice)
|
|
|
|
label_tips = l(:label_course_news)
|
|
|
|
%>
|
2015-07-22 10:22:50 +08:00
|
|
|
<script>
|
|
|
|
function remote_search(){
|
|
|
|
$("#news_query_form").submit();
|
|
|
|
}
|
|
|
|
</script>
|
2015-03-23 16:53:04 +08:00
|
|
|
<div class="project_r_h">
|
|
|
|
<h2 class="project_h2"><%= label_tips %></h2>
|
|
|
|
</div>
|
|
|
|
<div class="talk_top">
|
2015-07-22 10:22:50 +08:00
|
|
|
<div class="fl">
|
|
|
|
<p class="fl">
|
|
|
|
<%= l(:label_total_news) %>
|
|
|
|
<span><%= @news_count %></span>
|
|
|
|
<%= l(:label_course_news_count) %>
|
2014-06-11 16:46:13 +08:00
|
|
|
</p>
|
2015-07-22 10:22:50 +08:00
|
|
|
<% if @course && User.current.allowed_to?(:manage_news, @course) %>
|
|
|
|
<%= link_to(btn_tips,new_course_news_path(@course),:class => 'problem_new_btn fl c_dorange')%>
|
|
|
|
<div class="cl"></div>
|
2015-03-23 16:53:04 +08:00
|
|
|
|
2014-06-11 16:46:13 +08:00
|
|
|
<% end %>
|
2015-07-22 10:22:50 +08:00
|
|
|
</div>
|
|
|
|
<div class="problem_search fr" >
|
2015-07-24 11:50:50 +08:00
|
|
|
<%= form_tag({:controller => 'news', :action => 'index', :course_id => @course }, :method => :get,:id=>"news_query_form", :class => 'query_form') do %>
|
|
|
|
<input class="problem_search_input fl" id="v_subject" placeholder="通知主题" type="text" name="subject" value="<%= @q%>" onkeypress="" onkeydown="">
|
2015-07-22 10:22:50 +08:00
|
|
|
<a href="javascript:void(0)" class="problem_search_btn fl" onclick="remote_search();" >搜索</a>
|
|
|
|
<% end %>
|
|
|
|
</div><!--problem_search end-->
|
|
|
|
<div class="cl"></div>
|
2014-06-11 16:46:13 +08:00
|
|
|
</div>
|
2015-03-23 16:53:04 +08:00
|
|
|
|
2015-07-22 10:22:50 +08:00
|
|
|
<div id="news_list">
|
|
|
|
<%= render :partial => 'course_news_list', :locals=>{ :newss=>@newss,:obj_pages=>@obj_pages, :obj_count=>@obj_count} %>
|
2015-07-24 11:50:50 +08:00
|
|
|
</div>
|
2015-04-08 15:01:41 +08:00
|
|
|
<% content_for :header_tags do %>
|
|
|
|
<%= auto_discovery_link_tag(:atom, params.merge({:format => 'atom', :page => nil, :key => User.current.rss_key})) %>
|
|
|
|
<%= stylesheet_link_tag 'scm' %>
|
|
|
|
<% end %>
|
|
|
|
<% html_title(l(:label_course_news)) -%>
|