manageview.flow.html.hook.php 826 B

123456789101112131415161718192021
  1. <?php
  2. $primaryFlows = $this->dao->select('module,name')->from(TABLE_WORKFLOW)->where('navigator')->eq('primary')->andWhere('buildin')->eq('0')->fetchAll();
  3. foreach($primaryFlows as $primaryFlow):
  4. if(!common::hasPriv($primaryFlow->module, 'browse')):
  5. ?>
  6. <?php $className = (isset($group->acl['views'][$primaryFlow->module]) or empty($group->acl['views'])) ? "checked" : '';?>
  7. <?php
  8. $html = <<<EOD
  9. <div class='group-item'>
  10. <div class='checkbox-primary'>
  11. <input type='checkbox' id='{$primaryFlow->module}' name='actions[views][{$primaryFlow->module}]' value='{$primaryFlow->module}' $className>
  12. <label class='priv' for='{$primaryFlow->module}'>{$primaryFlow->name} </label>
  13. </div>
  14. </div>
  15. EOD;
  16. ?>
  17. <script>
  18. $('.group-item:last').before(<?php echo json_encode($html)?>);
  19. </script>
  20. <?php endif;?>
  21. <?php endforeach;?>