diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-08-11 21:10:24 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-08-11 21:10:24 +0000 |
commit | 41d44c5285a78e3b8fe174ba88ff895ff03a1f69 (patch) | |
tree | 0c5a5ed03dfc973453c84db2b7a458308ad05175 /app/helpers/users_helper.rb | |
parent | d47400aa8d0a4a2b2f9aadb27694d7fc18fb9ac0 (diff) | |
download | redmine-41d44c5285a78e3b8fe174ba88ff895ff03a1f69.tar.gz redmine-41d44c5285a78e3b8fe174ba88ff895ff03a1f69.zip |
Adds user count in status drop down on admin user list.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1735 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/helpers/users_helper.rb')
-rw-r--r-- | app/helpers/users_helper.rb | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/app/helpers/users_helper.rb b/app/helpers/users_helper.rb index 32b29526a..5b113e880 100644 --- a/app/helpers/users_helper.rb +++ b/app/helpers/users_helper.rb @@ -16,11 +16,12 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. module UsersHelper - def status_options_for_select(selected) + def users_status_options_for_select(selected) + user_count_by_status = User.count(:group => 'status').to_hash options_for_select([[l(:label_all), ''], - [l(:status_active), 1], - [l(:status_registered), 2], - [l(:status_locked), 3]], selected) + ["#{l(:status_active)} (#{user_count_by_status[1].to_i})", 1], + ["#{l(:status_registered)} (#{user_count_by_status[2].to_i})", 2], + ["#{l(:status_locked)} (#{user_count_by_status[3].to_i})", 3]], selected) end # Options for the new membership projects combo-box |