This commit is contained in:
Toks
2013-04-28 14:11:21 -04:00
parent 43a2525099
commit 636ac9c727
2 changed files with 9 additions and 0 deletions

View File

@@ -583,6 +583,10 @@ class User < ActiveRecord::Base
q = q.where("level >= ?", params[:min_level].to_i)
end
if params[:max_level].present?
q = q.where("level <= ?", params[:max_level].to_i)
end
if params[:level].present?
q = q.where("level = ?", params[:level].to_i)
end

View File

@@ -13,6 +13,11 @@
<%= select("search", "min_level", [""] + User.level_hash.to_a) %>
</div>
<div class="input">
<label for="search_max_level">Max Level</label>
<%= select("search", "max_level", [""] + User.level_hash.to_a) %>
</div>
<div class="input">
<label for="search_order">Order</label>
<%= select("search", "order", [["Join date", "date"], ["Name", "name"], ["Upload count", "post_upload_count"], ["Note count", "note_count"], ["Post update count", "post_update_count"]]) %>