<%
   btn_tips = l(:label_news_notice)
   label_tips = l(:label_course_news)
%>
<script>
  function remote_search(){
    $("#news_query_form").submit();
  }
</script>
<div class="project_r_h">
  <h2 class="project_h2"><%= label_tips %></h2>
</div>
<div class="talk_top">
  <div class="fl">
      <p class="fl">
        <%= l(:label_total_news) %>
        <span><%= @news_count %></span>
        <%= l(:label_course_news_count) %>
      </p>
      <% 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>

      <% end %>
  </div>
  <div class="problem_search fr" >
    <%= 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="">
    <a href="javascript:void(0)" class="problem_search_btn fl" onclick="remote_search();" >搜索</a>
    <% end %>
  </div><!--problem_search end-->
  <div class="cl"></div>
</div>

<div id="news_list">
  <%= render :partial => 'course_news_list', :locals=>{ :newss=>@newss,:obj_pages=>@obj_pages, :obj_count=>@obj_count} %>
</div>
<% 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)) -%>
