|
|
|
@ -1,3 +1,4 @@
|
|
|
|
|
#coding=utf-8
|
|
|
|
|
# Redmine - project management software
|
|
|
|
|
# Copyright (C) 2006-2013 Jean-Philippe Lang
|
|
|
|
|
#
|
|
|
|
@ -180,8 +181,20 @@ module Redmine
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def render_single_menu_node(item, caption, url, selected)
|
|
|
|
|
|
|
|
|
|
link_to(h(caption), url, item.html_options(:selected => selected))
|
|
|
|
|
title = h(caption)
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|