BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
5cca2d3b
Commit
5cca2d3b
authored
May 23, 2016
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated Ruby based on feedback
parent
fac08c3b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
20 deletions
+11
-20
issuable.js.coffee
app/assets/javascripts/issuable.js.coffee
+2
-2
application_helper.rb
app/helpers/application_helper.rb
+4
-13
filter_issues_spec.rb
spec/features/issues/filter_issues_spec.rb
+5
-5
No files found.
app/assets/javascripts/issuable.js.coffee
View file @
5cca2d3b
issuable_created
=
false
@
Issuable
=
init
:
->
if
not
issuable_created
unless
issuable_created
issuable_created
=
true
Issuable
.
initTemplates
()
Issuable
.
initSearch
()
...
...
@@ -28,7 +28,7 @@ issuable_created = false
$input
=
$
(
"input[name='
#{
$search
.
attr
(
'name'
)
}
']"
,
$form
)
if
$input
.
length
is
0
$form
.
append
"<input type='hidden' name='
#{
$search
.
attr
(
'name'
)
}
' value='
#{
$search
.
val
(
)
}
'/>"
$form
.
append
"<input type='hidden' name='
#{
$search
.
attr
(
'name'
)
}
' value='
#{
_
.
escape
(
$search
.
val
()
)
}
'/>"
else
$input
.
val
$search
.
val
()
...
...
app/helpers/application_helper.rb
View file @
5cca2d3b
...
...
@@ -263,7 +263,8 @@ module ApplicationHelper
assignee_id:
params
[
:assignee_id
],
author_id:
params
[
:author_id
],
sort:
params
[
:sort
],
issue_search:
params
[
:issue_search
]
issue_search:
params
[
:issue_search
],
label_name:
params
[
:label_name
]
}
options
=
exist_opts
.
merge
(
options
)
...
...
@@ -276,19 +277,9 @@ module ApplicationHelper
params
=
options
.
compact
pa
th
=
request
.
path
pa
rams
.
delete
(
:label_name
)
unless
add_label
if
!
params
.
nil?
path
<<
"?
#{
params
.
to_param
}
"
if
add_label
if
params
[
:label_name
].
present?
and
params
[
:label_name
].
respond_to?
(
'any?'
)
params
[
:label_name
].
each
do
|
label
|
path
<<
"&label_name[]=
#{
label
}
"
end
end
end
end
path
"
#{
request
.
path
}
?
#{
params
.
to_param
}
"
end
def
outdated_browser?
...
...
spec/features/issues/filter_issues_spec.rb
View file @
5cca2d3b
...
...
@@ -159,7 +159,7 @@ describe 'Filter issues', feature: true do
before
do
create
(
:issue
,
title:
"Bug"
,
project:
project
)
create
(
:label
,
project:
project
,
title:
'bug'
)
bug_label
=
create
(
:label
,
project:
project
,
title:
'bug'
)
milestone
=
create
(
:milestone
,
title:
"8"
,
project:
project
)
issue
=
create
(
:issue
,
...
...
@@ -168,7 +168,7 @@ describe 'Filter issues', feature: true do
milestone:
milestone
,
author:
user
,
assignee:
user
)
issue
.
labels
<<
project
.
labels
.
find_by
(
title:
'bug'
)
issue
.
labels
<<
bug_label
visit
namespace_project_issues_path
(
project
.
namespace
,
project
)
end
...
...
@@ -264,12 +264,12 @@ describe 'Filter issues', feature: true do
describe
'filter issues and sort'
,
js:
true
do
before
do
create
(
:label
,
project:
project
,
title:
'bug'
)
bug_label
=
create
(
:label
,
project:
project
,
title:
'bug'
)
bug_one
=
create
(
:issue
,
title:
"Frontend"
,
project:
project
)
bug_two
=
create
(
:issue
,
title:
"Bug 2"
,
project:
project
)
bug_one
.
labels
<<
project
.
labels
.
find_by
(
title:
'bug'
)
bug_two
.
labels
<<
project
.
labels
.
find_by
(
title:
'bug'
)
bug_one
.
labels
<<
bug_label
bug_two
.
labels
<<
bug_label
visit
namespace_project_issues_path
(
project
.
namespace
,
project
)
end
...
...
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