增减《查询显示人数以及显示全部人数》功能
Signed-off-by: alan <547533434@qq.com>
This commit is contained in:
parent
078639b35a
commit
020242a8c9
|
@ -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
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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? %>
|
||||
|
|
|
@ -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: 跟踪标签
|
||||
|
|
Loading…
Reference in New Issue