diff --git a/contribs/gmf/apps/desktop/index.html.ejs b/contribs/gmf/apps/desktop/index.html.ejs index d22946b91274..82fdb4412126 100644 --- a/contribs/gmf/apps/desktop/index.html.ejs +++ b/contribs/gmf/apps/desktop/index.html.ejs @@ -61,7 +61,7 @@ data-toggle="tooltip" data-placement="left" data-original-title="{{'Draw and Measure'|translate}}"> - diff --git a/contribs/gmf/src/controllers/AbstractAppController.js b/contribs/gmf/src/controllers/AbstractAppController.js index 325d1050b61d..a94cf848d70e 100644 --- a/contribs/gmf/src/controllers/AbstractAppController.js +++ b/contribs/gmf/src/controllers/AbstractAppController.js @@ -164,10 +164,18 @@ const exports = function(config, $scope, $injector) { const user = evt.detail.user; const roleId = (user.username !== null) ? user.role_id : undefined; + const functionalities = this.gmfUser.functionalities; + + // Enable filter tool in toolbar + if (functionalities && + 'filterable_layers' in functionalities && + functionalities['filterable_layers'].length > 0) { + this.filterSelectorEnabled = true; + } + // Open filter panel if 'open_panel' is set in functionalities and // has 'layer_filter' as first value this.gmfThemes_.getThemesObject().then((themes) => { - const functionalities = this.gmfUser.functionalities; if (functionalities && functionalities.open_panel && functionalities.open_panel[0] === 'layer_filter') { @@ -276,6 +284,12 @@ const exports = function(config, $scope, $injector) { stroke: queryStroke }); + /** + * @type {boolean} + * @export + */ + this.filterSelectorEnabled = false; + /** * @type {boolean} * @export