Fixes incorrect i18n conflict resolutions.
This commit is contained in:
Leigh Johnson 2016-10-31 15:59:48 -04:00
parent f74a3c75de
commit d2ba01251f
5 changed files with 10 additions and 55 deletions

View File

@ -267,7 +267,7 @@ ProjectsList.$inject = ['$scope', '$rootScope', '$location', '$log', '$statePara
export function ProjectsAdd($scope, $rootScope, $compile, $location, $log,
$stateParams, GenerateForm, ProjectsForm, Rest, Alert, ProcessErrors,
GetBasePath, GetProjectPath, GetChoices, Wait, $state, CreateSelect2) {
GetBasePath, GetProjectPath, GetChoices, Wait, $state, CreateSelect2, i18n) {
var form = ProjectsForm(),
base = $location.path().replace(/^\//, '').split('/')[0],

View File

@ -51,7 +51,6 @@ export default
list: 'OrganizationList',
sourceModel: 'organization',
sourceField: 'name',
ngClick: 'lookUpOrganization()',
awPopOver: i18n._("<p>If no organization is given, the credential can only be used by the user that creates the credential. Organization admins and system administrators can assign an organization so that roles for the credential can be assigned to users and teams in that organization.</p>"),
dataTitle: i18n._('Organization') + ' ',
dataPlacement: 'bottom',

View File

@ -181,7 +181,7 @@ angular.module('ProjectFormDefinition', ['SchedulesListDefinition'])
}]
},
scm_update_cache_timeout: {
label: i18n._('Cache Timeout<span class=\"small-text\"> (seconds)</span>'),
label: i18n._(`Cache Timeout<span class="small-text"> (seconds)</span>`),
id: 'scm-cache-timeout',
type: 'number',
integer: true,

View File

@ -182,11 +182,13 @@ angular.module('inventory', [
edit: 'HostEditController'
},
resolve: {
host: ['$stateParams', 'HostManageService', function($stateParams, HostManageService) {
return HostManageService.get({ id: $stateParams.host_id }).then(function(res) {
return res.data.results[0];
});
}]
edit: {
host: ['$stateParams', 'HostManageService', function($stateParams, HostManageService) {
return HostManageService.get({ id: $stateParams.host_id }).then(function(res) {
return res.data.results[0];
});
}]
}
},
ncyBreadcrumb: {
label: "{{host.name}}",

View File

@ -10,50 +10,4 @@ import HostsEditController from './hosts-edit.controller';
export default
angular.module('manageHosts', [])
.controller('HostsAddController', HostsAddController)
.controller('HostEditController', HostsEditController)
.config(['$stateProvider', 'stateDefinitionsProvider',
function($stateProvider, stateDefinitionsProvider) {
let addHost, editHost,
stateDefinitions = stateDefinitionsProvider.$get();
addHost = {
name: 'inventoryManage.addHost',
url: '/add-host',
lazyLoad: () => stateDefinitions.generateTree({
url: '/add-host',
name: 'inventoryManage.addHost',
modes: ['add'],
form: 'HostForm',
controllers: {
add: 'HostsAddController'
}
})
};
editHost = {
name: 'inventoryManage.editHost',
url: '/edit-host/:host_id',
ncyBreadcrumb: {
label: '{{host.name}}',
},
lazyLoad: () => stateDefinitions.generateTree({
url: '/edit-host/:host_id',
name: 'inventoryManage.editHost',
modes: ['edit'],
form: 'HostForm',
controllers: {
edit: 'HostEditController'
},
resolve: {
host: ['$stateParams', 'HostManageService', function($stateParams, HostManageService) {
return HostManageService.get({ id: $stateParams.host_id }).then(function(res) {
return res.data.results[0];
});
}]
}
})
};
$stateProvider.state(addHost);
$stateProvider.state(editHost);
}
]);
.controller('HostEditController', HostsEditController);