summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-12-08 16:43:20 +0000
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-12-08 16:43:20 +0000
commit038c9a65fbe814927e9c9fa12f1bda660249e8b0 (patch)
treebe87583c14bc960651ee489b7e86c6bcfbda2f47 /lib
parent033947de90163aeadf0b1ae2c0f5be1b8529088b (diff)
parent15925290eec4f5616e12ef3169794f85150e3270 (diff)
downloadgitlab-ce-038c9a65fbe814927e9c9fa12f1bda660249e8b0.tar.gz
Merge branch 'ui/dashboard-new-issue' into 'master'
UI: Add "New X" buttons to dashboard and group issue, MR and milestone indexes # To do - [x] Use searchable dropdown since dashboard/group can have a lot of projects. Use select2? ## Before ![Screen_Shot_2015-12-07_at_17.26.52](/uploads/22c6d6df10414f9e3e35d6cea3870486/Screen_Shot_2015-12-07_at_17.26.52.png) ## After ![Screen_Shot_2015-12-07_at_17.26.33](/uploads/02d082490ed6c83c66f052a5b601b5be/Screen_Shot_2015-12-07_at_17.26.33.png) As you can see, for milestones, groups are listed as well as we can now easily create group milestones. Fixes #3544 and https://dev.gitlab.org/gitlab/gitlabhq/issues/2581 See merge request !1968
Diffstat (limited to 'lib')
-rw-r--r--lib/api/groups.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/api/groups.rb b/lib/api/groups.rb
index 024aeec2e14..1a14d870a4a 100644
--- a/lib/api/groups.rb
+++ b/lib/api/groups.rb
@@ -65,6 +65,18 @@ module API
DestroyGroupService.new(group, current_user).execute
end
+ # Get a list of projects in this group
+ #
+ # Example Request:
+ # GET /groups/:id/projects
+ get ":id/projects" do
+ group = find_group(params[:id])
+ projects = group.projects
+ projects = filter_projects(projects)
+ projects = paginate projects
+ present projects, with: Entities::Project
+ end
+
# Transfer a project to the Group namespace
#
# Parameters: