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
02ce5fba
Commit
02ce5fba
authored
Jul 17, 2016
by
Alfredo Sumaran
Committed by
Phil Hughes
Jul 20, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes preselected label
parent
ee2cfded
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
8 deletions
+12
-8
app/views/shared/issuable/_filter.html.haml
app/views/shared/issuable/_filter.html.haml
+1
-1
app/views/shared/issuable/_label_dropdown.html.haml
app/views/shared/issuable/_label_dropdown.html.haml
+11
-7
No files found.
app/views/shared/issuable/_filter.html.haml
View file @
02ce5fba
...
...
@@ -24,7 +24,7 @@
=
render
"shared/issuable/milestone_dropdown"
,
selected:
params
[
:milestone_title
],
name: :milestone_title
,
show_any:
true
,
show_upcoming:
true
.filter-item.inline.labels-filter
=
render
"shared/issuable/label_dropdown"
,
selected:
params
[
:label_name
],
data_options:
{
field_name:
"label_name[]"
}
=
render
"shared/issuable/label_dropdown"
,
selected
_toggle
:
params
[
:label_name
],
data_options:
{
field_name:
"label_name[]"
}
.pull-right
=
render
'shared/sort_dropdown'
...
...
app/views/shared/issuable/_label_dropdown.html.haml
View file @
02ce5fba
...
...
@@ -13,16 +13,20 @@
-
classes
<<
'js-filter-submit'
if
filter_submit
-
if
selected
.
present?
-
if
selected
.
respond_to?
(
'any?'
)
-
selected
=
project
.
labels
.
where
(
id:
selected
)
||
selected
-
labelQuery
=
{
id:
selected
}
-
useId
=
true
-
if
selected_toggle
.
present?
-
labelQuery
=
{
title:
selected_toggle
}
-
if
labelQuery
-
selected
=
project
.
labels
.
where
(
labelQuery
)
-
selected
.
each
do
|
label
|
-
id
=
label
.
try
(
:id
)
||
label
-
title
=
label
.
try
(
:title
)
||
label
=
hidden_field_tag
data_options
[
:field_name
],
id
,
id:
nil
,
data:
{
title:
title
}
=
hidden_field_tag
data_options
[
:field_name
],
useId
?
id
:
title
,
id:
nil
,
data:
{
title:
title
}
.dropdown
%button
.dropdown-menu-toggle.js-label-select.js-multiselect
{
class:
classes
.
join
(
' '
),
type:
"button"
,
data:
dropdown_data
}
%span
.dropdown-toggle-text
{
class:
(
"is-default"
if
selected
.
nil?
)
}
=
h
(
multi_label_name
(
selected
_toggle
||
selected
,
"Label"
))
=
h
(
multi_label_name
(
selected
.
to_a
,
"Label"
))
=
icon
(
'chevron-down'
)
.dropdown-menu.dropdown-select.dropdown-menu-paging.dropdown-menu-labels.dropdown-menu-selectable
=
render
partial:
"shared/issuable/label_page_default"
,
locals:
{
title:
"Filter by label"
,
show_footer:
show_footer
,
show_create:
show_create
}
...
...
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