From 69eba88532a349111e38f5c17038de3f2953dd5b Mon Sep 17 00:00:00 2001 From: Bob Van Landuyt Date: Fri, 20 Oct 2017 16:39:15 +0300 Subject: Make sure we render events for projects within a group --- app/controllers/groups_controller.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'app/controllers/groups_controller.rb') 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 -- cgit v1.2.3