1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-01 08:21:15 +03:00

Hide the team role column and team tab from the add permissions modal on the Teams page

This commit is contained in:
Akita Noek 2016-06-21 11:39:01 -04:00
parent e72f371a1e
commit f580b9f7d8
4 changed files with 14 additions and 10 deletions

View File

@ -16,6 +16,8 @@ export default
controller: addPermissionsController,
templateUrl: templateUrl('access/addPermissions/addPermissions'),
link: function(scope, element, attrs, ctrl) {
console.info(attrs);
scope.withoutTeamPermissions = attrs.withoutTeamPermissions;
scope.toggleFormTabs('users');
$("body").addClass("is-modalOpen");
@ -24,6 +26,7 @@ export default
Wait('start');
scope.$broadcast("linkLists");
setTimeout(function() {

View File

@ -23,10 +23,15 @@
<span class="AddPermissions-directionNumber">
1
</span>
Please select Users / Teams from the lists below.
<div ng-hide='withoutTeamPermissions'>
Please select Users / Teams from the lists below.
</div>
<div ng-show='withoutTeamPermissions'>
Please select Users from the list below.
</div>
</div>
<div class="Form-tabHolder">
<div class="Form-tabHolder" ng-hide='withoutTeamPermissions'>
<div id="users_tab" class="Form-tab"
ng-click="toggleFormTabs('users')"
ng-class="{'is-selected': usersSelected }">

View File

@ -530,6 +530,9 @@ var tower = angular.module('Tower', [
$rootScope.addPermission = function (scope) {
$compile("<add-permissions class='AddPermissions'></add-permissions>")(scope);
};
$rootScope.addPermissionWithoutTeamTab = function (scope) {
$compile("<add-permissions class='AddPermissions' without-team-permissions='true'></add-permissions>")(scope);
};
$rootScope.deletePermission = function (user, accessListEntry) {
let entry = accessListEntry;

View File

@ -71,7 +71,7 @@ export default
searchType: 'select',
actions: {
add: {
ngClick: "addPermission",
ngClick: "addPermissionWithoutTeamTab",
label: 'Add',
awToolTip: 'Add a permission',
actionClass: 'btn List-buttonSubmit',
@ -92,13 +92,6 @@ export default
noSort: true,
class: 'col-lg-4 col-md-4 col-sm-4 col-xs-4',
searchable: false
},
team_roles: {
label: 'Team Roles',
type: 'team_roles',
noSort: true,
class: 'col-lg-5 col-md-5 col-sm-5 col-xs-4',
searchable: false
}
}
},