Sort groups alphabetically on dashboard page
Created by: crystax
This fix enables alphabetic sort of groups shown on the dashboard page and 'new project' combobox. I suppose it's very helpful for those having many groups. I don't touch anything except groups/namespaces sorting; I see many reasons not to sort projects/issues/whatever else alphabetically, but I believe there is just no reason to not sort groups.
Merge request reports
Activity
5 5 before_filter :event_filter, only: :show 6 6 7 7 def show 8 @groups = current_user.authorized_groups 8 @groups = current_user.authorized_groups.sort_by(&:human_name) 10 10 11 11 12 12 global_opts = ["Global", [['/', Namespace.global_id]] ] 13 group_opts = ["Groups", groups.map {|g| [g.human_name, g.id]} ] 14 users_opts = [ "Users", users.map {|u| [u.human_name, u.id]} ] 13 group_opts = ["Groups", groups.sort_by(&:human_name).map {|g| [g.human_name, g.id]} ]
Please register or sign in to reply