Add a dropdown to filter and sort projects in the dashboard projects & group pages
Addresses #3968 (closed), #3245 (closed), #3799 (closed). This MR is bigger than I expected but I don't think this could be split into smaller MRs.
/cc @creamzy @dzaporozhets @JobV @balameb @dblessing @haynes
Notes:
- I replaced "Last updated" by "Recently active" since the underlying field used with this sorting method is
last_activity_at
which is the time of the most recent project's event. I thought it was not very useful to sort byupdated_at
(which is updated when the project settings itself is updated) because from a user perspective the goal is to see the most recently active projects, not the most recently updated. - I used the
Project
'spersonal
scope for the "Owned by me" filter. - I did not show the "Owned by" filters in the group page since it doesn't make sense: group's projects are owned by the group.
- The group page has been split in two real pages (instead of loading
the activity feed and the project lists on one page) since sorting reloads the page, it was cleaner to do it like that. The two pages are
/groups/:group
-> group's activity (same as before) and/groups/:group/projects
-> group's projects. The former/groups/:group/projects
route has been changed to/groups/:group/projects/edit
which is more appropriate IMO.