增减《查询显示人数以及显示全部人数》功能

Signed-off-by: alan <547533434@qq.com>
This commit is contained in:
alan 2014-12-05 11:27:51 +08:00
parent 078639b35a
commit 020242a8c9
4 changed files with 9 additions and 2 deletions

View File

@ -205,6 +205,7 @@ class CoursesController < ApplicationController
q = "#{params[:name].strip}"
#(redirect_to stores_url, :notice => l(:label_sumbit_empty);return) if params[:name].blank?
@results = searchStudent_by_name(@course, q)
@result_count = @results.count
@results = paginateHelper @results
end

View File

@ -6,11 +6,12 @@
<li style=" color:#8b8b8b;">分班:</li>
<li class="classbox">
<% course_member_count = l(:label_all) + "(" + @course.members.count.to_s + "人)" %>
<%= form_tag( searchgroupmembers_course_path(@course, :group_id => 0), method: 'get',:remote=>true) do %>
<%= hidden_field_tag "all", params[:group_id], name: 'all' %>
<%= submit_tag l(:label_all), :style => "background: #f8df8c; border:0px; color: black" %>
<%= submit_tag course_member_count, :style => "background: #f8df8c; border:0px; color: black" %>
<% end %>
</li>

View File

@ -9,6 +9,9 @@
</div>
<% if members.any? %>
<% if @result_count %>
<p style="font-size: 18px;"><%= l(:label_search_member_count) %><%= @result_count %><%= l(:label_member_people) %></p>
<% end %>
<% members.each do |member| %>
<div class="well">
<% next if member.new_record? %>

View File

@ -569,7 +569,9 @@ zh:
label_role_plural: 角色
label_role_new: 新建角色
label_role_and_permissions: 角色和权限
label_member: 成员
label_member:
label_search_member_count: 共搜索到
label_member_people:
label_member_new: 添加成员
label_member_plural: 成员
label_tracker: 跟踪标签