/** 收回重办按钮 */


var angular = require('angular');
require('../modules');
require('../../flow/services/WorkflowTransfer');
var module = angular.module('flowmodulebutton.directives');

/**
  <sino-flow-recycle-button
     flow-type=""
     record-id=""
     show="" 展示权限 默认false
     name="" 名称
   ></sino-flow-recycle-button>
 */
module.directive('sinoFlowRecycleButton', function(WorkflowTransfer) {

  return {
    restrict: 'E',
    require: '^sinoFlowButtonBar',
    template: '<sino-flow-base-flow-button tag="收回重办" button-id="recycle" on-click="recycle(flowType, recordId)" subflag-value="1"></sino-flow-base-flow-button>',
    replace: true,
    link: function(scope) {
      scope.recycle = WorkflowTransfer.recycle;
    }
  };
});
