管理员界面增加项目、组织、课程、用户、作业个数的显示
This commit is contained in:
parent
a04f136e9f
commit
184e0ee689
|
@ -29,6 +29,7 @@ class AdminController < ApplicationController
|
||||||
|
|
||||||
def index
|
def index
|
||||||
@no_configuration_data = Redmine::DefaultData::Loader::no_data?
|
@no_configuration_data = Redmine::DefaultData::Loader::no_data?
|
||||||
|
@lastest_login_user_count = User.all.count
|
||||||
end
|
end
|
||||||
|
|
||||||
def projects
|
def projects
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
#coding=utf-8
|
||||||
# Redmine - project management software
|
# Redmine - project management software
|
||||||
# Copyright (C) 2006-2013 Jean-Philippe Lang
|
# Copyright (C) 2006-2013 Jean-Philippe Lang
|
||||||
#
|
#
|
||||||
|
@ -180,8 +181,20 @@ module Redmine
|
||||||
end
|
end
|
||||||
|
|
||||||
def render_single_menu_node(item, caption, url, selected)
|
def render_single_menu_node(item, caption, url, selected)
|
||||||
|
title = h(caption)
|
||||||
link_to(h(caption), url, item.html_options(:selected => selected))
|
case title
|
||||||
|
when '作业'
|
||||||
|
title = h(caption) + "(#{HomeworkCommon.all.count})"
|
||||||
|
when '组织列表'
|
||||||
|
title = h(caption) + "(#{Organization.all.count})"
|
||||||
|
when '项目列表'
|
||||||
|
title = h(caption) + "(#{Project.all.count})"
|
||||||
|
when '课程列表'
|
||||||
|
title = h(caption) + "(#{Course.all.count})"
|
||||||
|
when '用户列表'
|
||||||
|
title = h(caption) + "(#{User.all.count})"
|
||||||
|
end
|
||||||
|
link_to(title, url, item.html_options(:selected => selected))
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue