diff --git a/guacamole/src/main/webapp/app/manage/directives/identifierSetEditor.js b/guacamole/src/main/webapp/app/manage/directives/identifierSetEditor.js index 82f110915..4240901b9 100644 --- a/guacamole/src/main/webapp/app/manage/directives/identifierSetEditor.js +++ b/guacamole/src/main/webapp/app/manage/directives/identifierSetEditor.js @@ -260,6 +260,20 @@ angular.module('manage').directive('identifierSetEditor', ['$injector', $scope.expanded = false; }; + /** + * Returns whether there are absolutely no identifiers that can be + * managed using this editor. If true, the editor is effectively + * useless, as there is nothing whatsoever to display. + * + * @returns {Boolean} + * true if there are no identifiers that can be managed using this + * editor, false otherwise. + */ + $scope.isEmpty = function isEmpty() { + return _.isEmpty($scope.identifiers) + && _.isEmpty($scope.identifiersAvailable); + }; + }]; return directive; diff --git a/guacamole/src/main/webapp/app/manage/templates/identifierSetEditor.html b/guacamole/src/main/webapp/app/manage/templates/identifierSetEditor.html index 838decf03..7f660883d 100644 --- a/guacamole/src/main/webapp/app/manage/templates/identifierSetEditor.html +++ b/guacamole/src/main/webapp/app/manage/templates/identifierSetEditor.html @@ -1,4 +1,4 @@ -