diff options
author | Bob Van Landuyt <bob@vanlanduyt.co> | 2017-10-20 16:39:15 +0300 |
---|---|---|
committer | Bob Van Landuyt <bob@vanlanduyt.co> | 2017-10-20 17:02:02 +0300 |
commit | 69eba88532a349111e38f5c17038de3f2953dd5b (patch) | |
tree | fa8a856ba810daf90bc54f7061b376dd5c97d469 /app/controllers/groups_controller.rb | |
parent | 490cce630f5984d063283537ac42a6f9fbad86e6 (diff) |
Make sure we render events for projects within a group
Diffstat (limited to 'app/controllers/groups_controller.rb')
-rw-r--r-- | app/controllers/groups_controller.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/app/controllers/groups_controller.rb b/app/controllers/groups_controller.rb index e23a82d01be..bc3e95f1aed 100644 --- a/app/controllers/groups_controller.rb +++ b/app/controllers/groups_controller.rb @@ -141,6 +141,17 @@ class GroupsController < Groups::ApplicationController end def load_events + params[:sort] ||= 'latest_activity_desc' + + options = {} + options[:only_owned] = true if params[:shared] == '0' + options[:only_shared] = true if params[:shared] == '1' + + @projects = GroupProjectsFinder.new(params: params, group: group, options: options, current_user: current_user) + .execute + .includes(:namespace) + .page(params[:page]) + @events = EventCollection .new(@projects, offset: params[:offset].to_i, filter: event_filter) .to_a |