diff options
author | Marin Jankovski <marin@gitlab.com> | 2014-06-25 11:15:27 +0200 |
---|---|---|
committer | Marin Jankovski <marin@gitlab.com> | 2014-06-30 09:42:28 +0200 |
commit | ca6fd8841e3bf1d6db9370fd7aa7934b320550e4 (patch) | |
tree | 58c0dbf996e9108097a3676ecaa0cda8aaa98692 | |
parent | 76e36dd253229d580f2c6336a77e5fc403fe90c3 (diff) | |
download | gitlab-ce-ca6fd8841e3bf1d6db9370fd7aa7934b320550e4.tar.gz |
Add group milestones routes and controller.
-rw-r--r-- | app/controllers/groups/milestones_controller.rb | 7 | ||||
-rw-r--r-- | app/views/groups/milestones/index.html.haml | 0 | ||||
-rw-r--r-- | app/views/layouts/nav/_group.html.haml | 5 | ||||
-rw-r--r-- | config/routes.rb | 2 |
4 files changed, 14 insertions, 0 deletions
diff --git a/app/controllers/groups/milestones_controller.rb b/app/controllers/groups/milestones_controller.rb new file mode 100644 index 00000000000..fc538105125 --- /dev/null +++ b/app/controllers/groups/milestones_controller.rb @@ -0,0 +1,7 @@ +class Groups::MilestonesController < ApplicationController + layout 'group' + + def index + @group = Group.find_by(path: params[:group_id]) + end +end diff --git a/app/views/groups/milestones/index.html.haml b/app/views/groups/milestones/index.html.haml new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/app/views/groups/milestones/index.html.haml diff --git a/app/views/layouts/nav/_group.html.haml b/app/views/layouts/nav/_group.html.haml index d306e1eeb54..5fa14bd0d9b 100644 --- a/app/views/layouts/nav/_group.html.haml +++ b/app/views/layouts/nav/_group.html.haml @@ -12,6 +12,11 @@ Merge Requests - if current_user %span.count= current_user.cared_merge_requests.opened.of_group(@group).count + = nav_link(path: 'groups#milestones') do + = link_to merge_requests_group_path(@group) do + Milestones + - if current_user + %span.count= current_user.cared_merge_requests.opened.of_group(@group).count = nav_link(path: 'groups#members') do = link_to "Members", members_group_path(@group) diff --git a/config/routes.rb b/config/routes.rb index 14ff52f387a..244cb339898 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -151,8 +151,10 @@ Gitlab::Application.routes.draw do end resources :users_groups, only: [:create, :update, :destroy] + scope module: :groups do resource :avatar, only: [:destroy] + resources :milestones end end |