Commit 15ad1d88 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Use full group name/path in UI dropdowns

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 4468104f
......@@ -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;
......
......@@ -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() {
......
......@@ -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
......
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment