summaryrefslogtreecommitdiff
path: root/app/controllers/groups_controller.rb
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-05-29 21:30:20 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-05-29 21:30:20 +0300
commit5b26b45dcbba8ee11177eef348502bd2ea3b037f (patch)
treeab0c6cedba56b701080dd7062ce4fffefff75664 /app/controllers/groups_controller.rb
parente6f1eef47858e21dad9526a45586c609f8dea5e8 (diff)
downloadgitlab-ce-5b26b45dcbba8ee11177eef348502bd2ea3b037f.tar.gz
Improve group settings UI
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/controllers/groups_controller.rb')
-rw-r--r--app/controllers/groups_controller.rb10
1 files changed, 7 insertions, 3 deletions
diff --git a/app/controllers/groups_controller.rb b/app/controllers/groups_controller.rb
index ddaae6f0e8c..c8e13879b1d 100644
--- a/app/controllers/groups_controller.rb
+++ b/app/controllers/groups_controller.rb
@@ -9,7 +9,7 @@ class GroupsController < ApplicationController
before_filter :authorize_create_group!, only: [:new, :create]
# Load group projects
- before_filter :projects, except: [:new, :create]
+ before_filter :load_projects, except: [:new, :create, :projects, :edit, :update]
before_filter :default_filter, only: [:issues, :merge_requests]
@@ -79,9 +79,13 @@ class GroupsController < ApplicationController
def edit
end
+ def projects
+ @projects = @group.projects.page(params[:page])
+ end
+
def update
if @group.update_attributes(params[:group])
- redirect_to @group, notice: 'Group was successfully updated.'
+ redirect_to edit_group_path(@group), notice: 'Group was successfully updated.'
else
render action: "edit"
end
@@ -99,7 +103,7 @@ class GroupsController < ApplicationController
@group ||= Group.find_by(path: params[:id])
end
- def projects
+ def load_projects
@projects ||= ProjectsFinder.new.execute(current_user, group: group).sorted_by_activity.non_archived
end