'use strict';

angular.module('mean.icu.ui.bulkoperations', [])
    .directive('multipleSelect', function () {
        function controller($scope, $state, context, MultipleSelectService) {

            $scope.bulkUpdate = function(type){
                MultipleSelectService.haveBulkPerms($scope.selectedItems, type);
            };

            $scope.entityType = context.main;

            $scope.showForCurrentEntity = function(operation){
                return MultipleSelectService.showButton(operation, $scope.entityType);
            };
        }
        return {
            templateUrl: '/icu/components/bulk-operations/bulk-operations.html',
            restrict: 'E',
            scope: {
                selectedItems: '=',
                cornerState: '=',
                cursorEnterMultiple: '='
            },
            controller: controller
        };
    });

'use strict';

angular.module('mean.icu.ui.bulkoperations', [])
    .directive('multipleSelect', function () {
        function controller($scope, $state, context, MultipleSelectService) {

            $scope.bulkUpdate = function(type){
                MultipleSelectService.haveBulkPerms($scope.selectedItems, type);
            };

            $scope.entityType = context.main;

            $scope.showForCurrentEntity = function(operation) {
                if($state.params.recycled && operation === 'delete') return false;
                return MultipleSelectService.showButton(operation, $scope.entityType);
            };
        }
        return {
            templateUrl: '/icu/components/bulk-operations/bulk-operations.html',
            restrict: 'E',
            scope: {
                selectedItems: '=',
                cornerState: '=',
                cursorEnterMultiple: '='
            },
            controller: controller
        };
    });

Hide delete button for deleted items - #1610