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
Tatuya Kamada
gitlab-ce
Commits
438d614b
Commit
438d614b
authored
Mar 16, 2016
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed label/milestone helper methods
parent
2e07ee7f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
20 deletions
+10
-20
app/helpers/issuables_helper.rb
app/helpers/issuables_helper.rb
+8
-18
app/views/shared/issuable/_filter.html.haml
app/views/shared/issuable/_filter.html.haml
+2
-2
No files found.
app/helpers/issuables_helper.rb
View file @
438d614b
...
...
@@ -23,8 +23,14 @@ module IssuablesHelper
def
user_dropdown_label
(
user_id
,
default_label
)
return
"Unassigned"
if
user_id
==
"0"
user
=
@project
.
team
.
users
.
find_by
(
id:
user_id
)
if
@project
user
=
User
.
find_by_id
(
user_id
)
if
!
@project
if
@project
member
=
@project
.
team
.
find_member
(
user_id
)
if
member
user
=
member
.
user
end
else
user
=
User
.
find
(
user_id
)
end
if
user
user
.
name
...
...
@@ -33,22 +39,6 @@ module IssuablesHelper
end
end
def
labels_dropdown_label
(
label_name
)
if
!
label_name
"Label"
else
label_name
end
end
def
milestone_dropdown_label
(
milestone_name
)
if
!
milestone_name
"Milestone"
else
milestone_name
end
end
private
def
sidebar_gutter_collapsed?
...
...
app/views/shared/issuable/_filter.html.haml
View file @
438d614b
...
...
@@ -21,7 +21,7 @@
.filter-item.inline.milestone-filter
-
if
params
[
:milestone_title
]
=
hidden_field_tag
(
:milestone_title
,
params
[
:milestone_title
])
=
dropdown_tag
(
milestone_dropdown_label
(
params
[
:milestone_title
]
),
options:
{
title:
"Filter by milestone"
,
toggle_class:
'js-milestone-select js-filter-submit'
,
filter:
true
,
dropdown_class:
"dropdown-menu-selectable"
,
=
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:
(
namespace_project_milestones_path
(
@project
.
namespace
,
@project
,
:js
)
if
@project
)
}
})
do
-
if
@project
%ul
.dropdown-footer-list
...
...
@@ -42,7 +42,7 @@
.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:
(
namespace_project_labels_path
(
@project
.
namespace
,
@project
,
:js
)
if
@project
)}}
%span
.dropdown-toggle-text
=
labels_dropdown_label
(
params
[
:label_name
]
)
=
h
(
params
[
:label_name
]
||
"Label"
)
=
icon
(
'chevron-down'
)
.dropdown-menu.dropdown-select.dropdown-menu-paging.dropdown-menu-labels.dropdown-menu-selectable
.dropdown-page-one
...
...
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