Merge branch 'dev_shcool' into develop

This commit is contained in:
daiao 2016-10-14 16:03:57 +08:00
commit 7d8091e455
2 changed files with 8 additions and 1 deletions

View File

@ -43,7 +43,12 @@ class AdminController < ApplicationController
# 搜索功能 # 搜索功能
@name = params[:name] || "" @name = params[:name] || ""
condition = "#{@name.strip}".gsub(" ","") condition = "#{@name.strip}".gsub(" ","")
@projects = Project.like(condition).order('created_on desc') @status = params[:status] || ""
unless @status.empty?
@projects = Project.where(:status=>@status).like(condition).order('created_on desc')
else
@projects = Project.like(condition).order('created_on desc')
end
# 分页 # 分页
@projects = paginateHelper @projects,30 @projects = paginateHelper @projects,30
@page = (params['page'] || 1).to_i - 1 @page = (params['page'] || 1).to_i - 1

View File

@ -29,7 +29,9 @@
<% if show_nav?(course_feedback_count) %> <% if show_nav?(course_feedback_count) %>
<li> <li>
<a href="<%=course_feedback_path(@course) %>">留言</a> <a href="<%=course_feedback_path(@course) %>">留言</a>
<% if is_teacher || (@course.publish_resource == 1 && User.current.member_of_course?(@course)) %>
<%= link_to "", course_feedback_path(@course), :class => 'sy_class_add', :title =>"#{l(:label_course_feedback)}"%> <%= link_to "", course_feedback_path(@course), :class => 'sy_class_add', :title =>"#{l(:label_course_feedback)}"%>
<% end %>
</li> </li>
<% end %> <% end %>
<% if show_nav?(course_poll_count) %> <% if show_nav?(course_poll_count) %>