(function () { 'use strict'; var app = angular.module('items'); var templatePath = modulesSharedResourcesUrl + 'Modules/MyShowcases/Views/'; // A directive for users to view their items and edit their showcases app.directive('myShowcases', function () { return { restrict: 'E', controller: 'myShowcasesController', templateUrl: templatePath + 'myshowcases.html' } }); // A directive for users to control how their items are viewed app.directive('myShowcasesToolbar', ['$rootScope', function ($rootScope) { return { restrict: 'E', templateUrl: templatePath + 'myshowcases-toolbar.html', scope: { options: '=', search: '=', changeDirection: '=', createShowcase: '=' }, link: link }; function link($scope) { $scope.canManageShowcases = function () { if ($rootScope.currentRole) { return $rootScope.currentRole.functions.find(item => item === 'myshowcases_manage'); } } } }]); })();