管理员界面项目列表可以按状态进行搜索功能;游客身份,班级留言右侧“+"隐藏
This commit is contained in:
parent
39031c73d4
commit
c26af37456
|
@ -43,7 +43,12 @@ class AdminController < ApplicationController
|
|||
# 搜索功能
|
||||
@name = params[:name] || ""
|
||||
condition = "#{@name.strip}".gsub(" ","")
|
||||
@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
|
||||
@page = (params['page'] || 1).to_i - 1
|
||||
|
|
|
@ -29,7 +29,9 @@
|
|||
<% if show_nav?(course_feedback_count) %>
|
||||
<li>
|
||||
<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)}"%>
|
||||
<% end %>
|
||||
</li>
|
||||
<% end %>
|
||||
<% if show_nav?(course_poll_count) %>
|
||||
|
|
Loading…
Reference in New Issue