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
Kazuhiko Shiozaki
gitlab-ce
Commits
af541515
Commit
af541515
authored
Dec 02, 2015
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove "none" username for "Unassigned" and "Any User" select options
parent
f385988d
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
26 additions
and
20 deletions
+26
-20
app/assets/javascripts/users_select.js.coffee
app/assets/javascripts/users_select.js.coffee
+5
-8
app/assets/stylesheets/framework/selects.scss
app/assets/stylesheets/framework/selects.scss
+7
-1
app/helpers/issues_helper.rb
app/helpers/issues_helper.rb
+4
-3
app/helpers/selects_helper.rb
app/helpers/selects_helper.rb
+8
-6
app/views/shared/issuable/_filter.html.haml
app/views/shared/issuable/_filter.html.haml
+2
-2
No files found.
app/assets/javascripts/users_select.js.coffee
View file @
af541515
...
...
@@ -32,17 +32,15 @@ class @UsersSelect
if
showNullUser
nullUser
=
{
name
:
'Unassigned'
,
avatar
:
null
,
username
:
'none'
,
id
:
0
}
data
.
results
.
unshift
(
nullUser
)
if
showAnyUser
name
=
showAnyUser
name
=
'Any User'
if
name
==
true
anyUser
=
{
name
:
'Any'
,
avatar
:
null
,
username
:
'none'
,
name
:
name
,
id
:
null
}
data
.
results
.
unshift
(
anyUser
)
...
...
@@ -50,7 +48,6 @@ class @UsersSelect
if
showEmailUser
&&
data
.
results
.
length
==
0
&&
query
.
term
.
match
(
/^[^@]+@[^@]+$/
)
emailUser
=
{
name
:
"Invite
\"
#{
query
.
term
}
\"
"
,
avatar
:
null
,
username
:
query
.
term
,
id
:
query
.
term
}
...
...
@@ -82,10 +79,10 @@ class @UsersSelect
else
avatar
=
gon
.
default_avatar_url
"<div class='user-result'>
"<div class='user-result
#{
'no-username'
unless
user
.
username
}
'>
<div class='user-image'><img class='avatar s24' src='
#{
avatar
}
'></div>
<div class='user-name'>
#{
user
.
name
}
</div>
<div class='user-username'>
#{
user
.
username
}
</div>
<div class='user-username'>
#{
user
.
username
||
""
}
</div>
</div>"
formatSelection
:
(
user
)
->
...
...
app/assets/stylesheets/framework/selects.scss
View file @
af541515
...
...
@@ -123,10 +123,16 @@
}
.user-result
{
min-height
:
24px
;
.user-image
{
float
:
left
;
}
.user-name
{
&
.no-username
{
.user-name
{
line-height
:
24px
;
}
}
}
...
...
app/helpers/issues_helper.rb
View file @
af541515
...
...
@@ -44,9 +44,10 @@ module IssuesHelper
end
def
bulk_update_milestone_options
options_for_select
([[
'None (backlog)'
,
-
1
]])
+
options_from_collection_for_select
(
project_active_milestones
,
'id'
,
'title'
,
params
[
:milestone_id
])
milestones
=
project_active_milestones
.
to_a
milestones
.
unshift
(
Milestone
::
None
)
options_from_collection_for_select
(
milestones
,
'id'
,
'title'
,
params
[
:milestone_id
])
end
def
milestone_options
(
object
)
...
...
app/helpers/selects_helper.rb
View file @
af541515
...
...
@@ -15,12 +15,14 @@ module SelectsHelper
html
=
{
class:
css_class
,
'data-placeholder'
=>
placeholder
,
'data-null-user'
=>
null_user
,
'data-any-user'
=>
any_user
,
'data-email-user'
=>
email_user
,
'data-first-user'
=>
first_user
,
'data-current-user'
=>
current_user
data:
{
placeholder:
placeholder
,
null_user:
null_user
,
any_user:
any_user
,
email_user:
email_user
,
first_user:
first_user
,
current_user:
current_user
}
}
unless
opts
[
:scope
]
==
:all
...
...
app/views/shared/issuable/_filter.html.haml
View file @
af541515
...
...
@@ -31,11 +31,11 @@
.issues-other-filters
.filter-item.inline
=
users_select_tag
(
:assignee_id
,
selected:
params
[
:assignee_id
],
placeholder:
'Assignee'
,
class:
'trigger-submit'
,
any_user:
true
,
null_user:
true
,
first_user:
true
,
current_user:
true
)
placeholder:
'Assignee'
,
class:
'trigger-submit'
,
any_user:
"Any Assignee"
,
null_user:
true
,
first_user:
true
,
current_user:
true
)
.filter-item.inline
=
users_select_tag
(
:author_id
,
selected:
params
[
:author_id
],
placeholder:
'Author'
,
class:
'trigger-submit'
,
any_user:
true
,
first_user:
true
,
current_user:
true
)
placeholder:
'Author'
,
class:
'trigger-submit'
,
any_user:
"Any Author"
,
first_user:
true
,
current_user:
true
)
.filter-item.inline.milestone-filter
=
select_tag
(
'milestone_title'
,
projects_milestones_options
,
...
...
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