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
Léo-Paul Géneau
gitlab-ce
Commits
0eecc214
Commit
0eecc214
authored
8 years ago
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated controller with before_action
Fixed other issues based on feedback
parent
d847db79
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
8 additions
and
10 deletions
+8
-10
app/controllers/dashboard_controller.rb
app/controllers/dashboard_controller.rb
+1
-3
app/controllers/projects/milestones_controller.rb
app/controllers/projects/milestones_controller.rb
+4
-4
app/helpers/dropdowns_helper.rb
app/helpers/dropdowns_helper.rb
+1
-1
app/views/shared/issuable/_label_dropdown.html.haml
app/views/shared/issuable/_label_dropdown.html.haml
+1
-1
app/views/shared/issuable/_milestone_dropdown.html.haml
app/views/shared/issuable/_milestone_dropdown.html.haml
+1
-1
No files found.
app/controllers/dashboard_controller.rb
View file @
0eecc214
...
...
@@ -3,7 +3,7 @@ class DashboardController < Dashboard::ApplicationController
include
MergeRequestsAction
before_action
:event_filter
,
only: :activity
before_action
:projects
,
only:
[
:issues
,
:merge_requests
]
before_action
:projects
,
only:
[
:issues
,
:merge_requests
,
:labels
,
:milestones
]
respond_to
:html
...
...
@@ -23,7 +23,6 @@ class DashboardController < Dashboard::ApplicationController
def
labels
respond_to
do
|
format
|
format
.
json
do
projects
render
json:
view_context
.
projects_labels_options
end
end
...
...
@@ -32,7 +31,6 @@ class DashboardController < Dashboard::ApplicationController
def
milestones
respond_to
do
|
format
|
format
.
json
do
projects
render
json:
view_context
.
projects_milestones_options
end
end
...
...
This diff is collapsed.
Click to expand it.
app/controllers/projects/milestones_controller.rb
View file @
0eecc214
...
...
@@ -19,13 +19,13 @@ class Projects::MilestonesController < Projects::ApplicationController
end
@milestones
=
@milestones
.
includes
(
:project
)
@milestones_all
=
@milestones
@milestones
=
@milestones
.
page
(
params
[
:page
]).
per
(
PER_PAGE
)
respond_to
do
|
format
|
format
.
html
format
.
html
do
@milestones
=
@milestones
.
page
(
params
[
:page
]).
per
(
PER_PAGE
)
end
format
.
json
do
render
json:
@milestones_all
.
to_json
render
json:
@milestones_all
end
end
end
...
...
This diff is collapsed.
Click to expand it.
app/helpers/dropdowns_helper.rb
View file @
0eecc214
...
...
@@ -24,7 +24,7 @@ module DropdownsHelper
capture
(
&
block
)
if
block
&&
!
options
.
has_key?
(
:footer_content
)
end
if
block
&&
options
.
has_key?
(
:footer_content
)
if
block
&&
options
[
:footer_content
]
output
<<
content_tag
(
:div
,
class:
"dropdown-footer"
)
do
capture
(
&
block
)
end
...
...
This diff is collapsed.
Click to expand it.
app/views/shared/issuable/_label_dropdown.html.haml
View file @
0eecc214
-
if
params
[
:label_name
]
=
hidden_field_tag
(
:label_name
,
params
[
:label_name
])
.dropdown
%button
.dropdown-menu-toggle.js-label-select.js-filter-submit
{
type:
"button"
,
data:
{
toggle:
"dropdown"
,
field_name:
"label_name"
,
show_no:
"true"
,
show_any:
"true"
,
selected:
params
[
:label_name
],
project_id:
(
@project
.
id
if
@project
),
labels:
labels_filter_path
}}
%button
.dropdown-menu-toggle.js-label-select.js-filter-submit
{
type:
"button"
,
data:
{
toggle:
"dropdown"
,
field_name:
"label_name"
,
show_no:
"true"
,
show_any:
"true"
,
selected:
params
[
:label_name
],
project_id:
@project
.
try
(
:id
),
labels:
labels_filter_path
}}
%span
.dropdown-toggle-text
=
h
(
params
[
:label_name
]
||
"Label"
)
=
icon
(
'chevron-down'
)
...
...
This diff is collapsed.
Click to expand it.
app/views/shared/issuable/_milestone_dropdown.html.haml
View file @
0eecc214
-
if
params
[
:milestone_title
]
=
hidden_field_tag
(
:milestone_title
,
params
[
:milestone_title
])
=
dropdown_tag
(
h
(
params
[
:milestone_name
]
||
"Milestone"
),
options:
{
title:
"Filter by milestone"
,
toggle_class:
'js-milestone-select js-filter-submit'
,
filter:
true
,
dropdown_class:
"dropdown-menu-selectable"
,
placeholder:
"Search milestones"
,
footer_content:
true
,
data:
{
show_no:
true
,
show_any:
true
,
field_name:
"milestone_title"
,
selected:
params
[
:milestone_title
],
project_id:
(
@project
.
id
if
@project
),
milestones:
milestones_filter_dropdown_path
}
})
do
placeholder:
"Search milestones"
,
footer_content:
@project
.
present?
,
data:
{
show_no:
true
,
show_any:
true
,
field_name:
"milestone_title"
,
selected:
params
[
:milestone_title
],
project_id:
@project
.
try
(
:id
),
milestones:
milestones_filter_dropdown_path
}
})
do
-
if
@project
%ul
.dropdown-footer-list
-
if
can?
current_user
,
:admin_milestone
,
@project
...
...
This diff is collapsed.
Click to expand it.
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