Skip to content

Commit

Permalink
[Maps][6.7] fix breadcrumbs in Maps application (#34270)
Browse files Browse the repository at this point in the history
  • Loading branch information
nreese authored Apr 4, 2019
1 parent f6b8f91 commit 8afef73
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
7 changes: 6 additions & 1 deletion x-pack/plugins/maps/public/angular/map.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,12 @@
aria-level="1"
ng-if="showPluginBreadcrumbs">
<div class="kuiLocalBreadcrumb">
<a class="kuiLocalBreadcrumb__link" href="#">Map</a>
<a
class="kuiLocalBreadcrumb__link"
href="#"
i18n-id="xpack.maps.mapController.mapsBreadcrumbLabel"
i18n-default-message="Maps"
></a>
</div>
<div class="kuiLocalBreadcrumb">
{{ getMapTitle() }}
Expand Down
5 changes: 5 additions & 0 deletions x-pack/plugins/maps/public/angular/map_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,13 +201,18 @@ app.controller('GisMapController', ($scope, $route, config, kbnUrl, localStorage
}
});

$scope.getMapTitle = function () {
return $scope.map.title;
};
// k7design breadcrumbs
// TODO subscribe to store change and change when store updates title
chrome.breadcrumbs.set([
{ text: i18n.translate('xpack.maps.mapController.mapsBreadcrumbLabel', {
defaultMessage: 'Maps'
}), href: '#' },
{ text: $scope.map.title }
]);
config.watch('k7design', (val) => $scope.showPluginBreadcrumbs = !val);

async function doSave(saveOptions) {
const store = getStore();
Expand Down

0 comments on commit 8afef73

Please sign in to comment.