Skip to content
Snippets Groups Projects

Sort groups alphabetically on dashboard page

Merged gitlab-qa-bot requested to merge github/fork/crystax/master into master

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

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
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)
  • Created by: dzaporozhets

    sort_by(&:human_name)

    By Administrator on 2013-02-19T07:13:56 (imported from GitLab project)

    By Administrator on 2013-02-19T07:13:56 (imported from GitLab)

  • gitlab-qa-bot
  • 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]} ]
    • Created by: dzaporozhets

      same here

      By Administrator on 2013-02-19T07:13:56 (imported from GitLab project)

      By Administrator on 2013-02-19T07:13:56 (imported from GitLab)

  • Created by: crystax

    Ok, no problem. Fixed as requested.

    By Administrator on 2013-02-19T07:14:44 (imported from GitLab project)

    By Administrator on 2013-02-19T07:14:44 (imported from GitLab)

  • Created by: dzaporozhets

    @crystax thank you :thumbsup:

    By Administrator on 2013-02-19T08:51:06 (imported from GitLab project)

    By Administrator on 2013-02-19T08:51:06 (imported from GitLab)

  • Please register or sign in to reply
    Loading