Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
074fafe9
Commit
074fafe9
authored
Oct 16, 2018
by
Eagllus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update code according comment recommendations
parent
43f32c6b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
7 deletions
+7
-7
app/controllers/dashboard/application_controller.rb
app/controllers/dashboard/application_controller.rb
+0
-4
app/controllers/dashboard/milestones_controller.rb
app/controllers/dashboard/milestones_controller.rb
+6
-2
app/controllers/groups/milestones_controller.rb
app/controllers/groups/milestones_controller.rb
+1
-1
No files found.
app/controllers/dashboard/application_controller.rb
View file @
074fafe9
...
...
@@ -12,8 +12,4 @@ class Dashboard::ApplicationController < ApplicationController
def
projects
@projects
||=
current_user
.
authorized_projects
.
sorted_by_activity
.
non_archived
end
def
groups
@groups
||=
GroupsFinder
.
new
(
current_user
,
state_all:
true
).
execute
end
end
app/controllers/dashboard/milestones_controller.rb
View file @
074fafe9
...
...
@@ -4,13 +4,13 @@ class Dashboard::MilestonesController < Dashboard::ApplicationController
include
MilestoneActions
before_action
:projects
before_action
:groups
before_action
:groups
,
only: :index
before_action
:milestone
,
only:
[
:show
,
:merge_requests
,
:participants
,
:labels
]
def
index
respond_to
do
|
format
|
format
.
html
do
@milestone_states
=
Global
Milestone
.
states_count
(
@projects
,
@groups
)
@milestone_states
=
Milestone
.
states_count
(
@projects
,
@groups
)
@milestones
=
Kaminari
.
paginate_array
(
milestones
).
page
(
params
[
:page
])
end
format
.
json
do
...
...
@@ -43,4 +43,8 @@ class Dashboard::MilestonesController < Dashboard::ApplicationController
@milestone
=
DashboardMilestone
.
build
(
@projects
,
params
[
:title
])
render_404
unless
@milestone
end
def
groups
@groups
||=
GroupsFinder
.
new
(
current_user
,
state_all:
true
).
execute
end
end
app/controllers/groups/milestones_controller.rb
View file @
074fafe9
...
...
@@ -10,7 +10,7 @@ class Groups::MilestonesController < Groups::ApplicationController
def
index
respond_to
do
|
format
|
format
.
html
do
@milestone_states
=
GlobalMilestone
.
states_count
(
group_projects
,
group
)
@milestone_states
=
Milestone
.
states_count
(
group_projects
,
[
group
]
)
@milestones
=
Kaminari
.
paginate_array
(
milestones
).
page
(
params
[
:page
])
end
format
.
json
do
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment