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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
15ad1d88
Commit
15ad1d88
authored
Jan 26, 2017
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use full group name/path in UI dropdowns
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
4468104f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
7 deletions
+8
-7
app/assets/javascripts/groups_select.js
app/assets/javascripts/groups_select.js
+2
-2
app/assets/javascripts/search.js
app/assets/javascripts/search.js
+4
-4
app/helpers/search_helper.rb
app/helpers/search_helper.rb
+1
-1
lib/api/entities.rb
lib/api/entities.rb
+1
-0
No files found.
app/assets/javascripts/groups_select.js
View file @
15ad1d88
...
...
@@ -59,11 +59,11 @@
}
else
{
avatar
=
gon
.
default_avatar_url
;
}
return
"
<div class='group-result'> <div class='group-name'>
"
+
group
.
name
+
"
</div> <div class='group-path'>
"
+
group
.
path
+
"
</div> </div>
"
;
return
"
<div class='group-result'> <div class='group-name'>
"
+
group
.
full_name
+
"
</div> <div class='group-path'>
"
+
group
.
full_
path
+
"
</div> </div>
"
;
};
GroupsSelect
.
prototype
.
formatSelection
=
function
(
group
)
{
return
group
.
name
;
return
group
.
full_
name
;
};
return
GroupsSelect
;
...
...
app/assets/javascripts/search.js
View file @
15ad1d88
...
...
@@ -13,12 +13,12 @@
filterable
:
true
,
fieldName
:
'
group_id
'
,
search
:
{
fields
:
[
'
name
'
]
fields
:
[
'
full_
name
'
]
},
data
:
function
(
term
,
callback
)
{
return
Api
.
groups
(
term
,
{},
function
(
data
)
{
data
.
unshift
({
name
:
'
Any
'
full_
name
:
'
Any
'
});
data
.
splice
(
1
,
0
,
'
divider
'
);
return
callback
(
data
);
...
...
@@ -28,10 +28,10 @@
return
obj
.
id
;
},
text
:
function
(
obj
)
{
return
obj
.
name
;
return
obj
.
full_
name
;
},
toggleLabel
:
function
(
obj
)
{
return
(
$groupDropdown
.
data
(
'
default-label
'
))
+
"
"
+
obj
.
name
;
return
(
$groupDropdown
.
data
(
'
default-label
'
))
+
"
"
+
obj
.
full_
name
;
},
clicked
:
(
function
(
_this
)
{
return
function
()
{
...
...
app/helpers/search_helper.rb
View file @
15ad1d88
...
...
@@ -89,7 +89,7 @@ module SearchHelper
{
category:
"Groups"
,
id:
group
.
id
,
label:
"
#{
search_result_sanitize
(
group
.
name
)
}
"
,
label:
"
#{
search_result_sanitize
(
group
.
full_
name
)
}
"
,
url:
group_path
(
group
)
}
end
...
...
lib/api/entities.rb
View file @
15ad1d88
...
...
@@ -137,6 +137,7 @@ module API
expose
:avatar_url
expose
:web_url
expose
:request_access_enabled
expose
:full_name
,
:full_path
expose
:statistics
,
if: :statistics
do
with_options
format_with:
->
(
value
)
{
value
.
to_i
}
do
...
...
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