mirror of
https://github.com/ansible/awx.git
synced 2026-03-26 13:25:02 -02:30
Move about modal to top navigation bar
This commit is contained in:
@@ -14,6 +14,11 @@
|
|||||||
<span>{{ $parent.layoutVm.currentUsername }}</span>
|
<span>{{ $parent.layoutVm.currentUsername }}</span>
|
||||||
</a>
|
</a>
|
||||||
</at-top-nav-item>
|
</at-top-nav-item>
|
||||||
|
<at-top-nav-item>
|
||||||
|
<a ui-sref="about">
|
||||||
|
<i class="fa fa-info" alt="{{ vm.getString('FOOTER_ABOUT') }}"></i>
|
||||||
|
</a>
|
||||||
|
</at-top-nav-item>
|
||||||
<at-top-nav-item>
|
<at-top-nav-item>
|
||||||
<a href="http://docs.ansible.com/ansible-tower/" target="_blank">
|
<a href="http://docs.ansible.com/ansible-tower/" target="_blank">
|
||||||
<i class="fa fa-book" alt="{{ $parent.layoutVm.getString('VIEW_DOCS') }}"></i>
|
<i class="fa fa-book" alt="{{ $parent.layoutVm.getString('VIEW_DOCS') }}"></i>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
export default ['$rootScope', '$scope', '$state', 'ConfigService',
|
export default ['$rootScope', '$scope', '$location', 'ConfigService', 'lastPath',
|
||||||
($rootScope, $scope, $state, ConfigService) => {
|
($rootScope, $scope, $location, ConfigService, lastPath) => {
|
||||||
|
|
||||||
ConfigService.getConfig()
|
ConfigService.getConfig()
|
||||||
.then(function(config){
|
.then(function(config){
|
||||||
@@ -10,7 +10,7 @@ export default ['$rootScope', '$scope', '$state', 'ConfigService',
|
|||||||
$('#about-modal').modal('show');
|
$('#about-modal').modal('show');
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#about-modal').on('hidden.bs.modal', () => $state.go('dashboard'));
|
$('#about-modal').on('hidden.bs.modal', () => $location.url(lastPath));
|
||||||
|
|
||||||
function createSpeechBubble (brand, version) {
|
function createSpeechBubble (brand, version) {
|
||||||
let text = `${brand} ${version}`;
|
let text = `${brand} ${version}`;
|
||||||
|
|||||||
@@ -9,6 +9,11 @@ export default {
|
|||||||
ncyBreadcrumb: {
|
ncyBreadcrumb: {
|
||||||
label: N_("ABOUT")
|
label: N_("ABOUT")
|
||||||
},
|
},
|
||||||
|
resolve: {
|
||||||
|
lastPath: function($location) {
|
||||||
|
return $location.url();
|
||||||
|
}
|
||||||
|
},
|
||||||
onExit: function(){
|
onExit: function(){
|
||||||
// hacky way to handle user browsing away via URL bar
|
// hacky way to handle user browsing away via URL bar
|
||||||
$('.modal-backdrop').remove();
|
$('.modal-backdrop').remove();
|
||||||
|
|||||||
Reference in New Issue
Block a user