browse.html.php 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. <?php
  2. /**
  3. * The browse view file of workflowhook module of ZDOO.
  4. *
  5. * @copyright Copyright 2009-2016 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
  6. * @license 商业软件,非开源软件
  7. * @author Gang Liu <liugang@cnezsoft.com>
  8. * @package workflowhook
  9. * @version $Id$
  10. * @link http://www.zdoo.com
  11. */
  12. ?>
  13. <?php include '../../common/view/header.modal.html.php';?>
  14. <?php js::set('action', $action->id);?>
  15. <?php
  16. ob_start();
  17. extCommonModel::printLink('workflowhook', 'create', "action=$action->id", "<i class='icon-plus'> </i>" . $lang->workflowhook->create, "class='btn btn-primary loadInModal iframe'");
  18. $workflowhookCreate = ob_get_contents();
  19. ob_end_clean();
  20. $workflowhookCreate = str_replace("\n", "", $workflowhookCreate);
  21. js::set('workflowhookCreate', $workflowhookCreate);
  22. ?>
  23. <script>
  24. $(function()
  25. {
  26. $('.modal-header .modal-actions').prepend(workflowhookCreate);
  27. });
  28. </script>
  29. <div class='panel main-table'>
  30. <table class='table table-fixed' id='hookTable'>
  31. <thead>
  32. <tr>
  33. <th><?php echo $lang->workflowhook->common;?></th>
  34. <th><?php echo $lang->workflowhook->condition;?></th>
  35. <th class='w-180px'><?php echo $lang->comment;?></th>
  36. <th class='w-80px text-center'><?php echo $lang->actions;?></th>
  37. </tr>
  38. </thead>
  39. <tbody>
  40. <?php foreach($action->hooks as $key => $hook):?>
  41. <tr>
  42. <td title="<?php echo zget($hook, 'sql', '');?>"><?php echo zget($hook, 'sql', '');?></td>
  43. <?php $hookConditions = zget($hook, 'conditions', '');?>
  44. <?php $title = is_object($hookConditions) ? zget($hookConditions, 'sql', '') : '';?>
  45. <td title="<?php echo $title;?>">
  46. <?php
  47. if(is_object($hookConditions))
  48. {
  49. echo zget($hookConditions, 'sql', '');
  50. }
  51. elseif(is_array($hookConditions))
  52. {
  53. foreach($hookConditions as $k => $condition)
  54. {
  55. if($k > 0) echo ' ' . $lang->workflowhook->logicalOperatorList[$condition->logicalOperator] . ' ';
  56. echo zget($fields, $condition->field);
  57. echo zget($config->workflowhook->operatorList, $condition->operator);
  58. if(strpos($config->workflow->virtualParams, ",$condition->param,") !== false)
  59. {
  60. echo $lang->workflowhook->options[$condition->param];
  61. }
  62. else
  63. {
  64. echo $condition->param;
  65. }
  66. }
  67. }
  68. else
  69. {
  70. echo $hookConditions;
  71. }
  72. ?>
  73. </td>
  74. <td title='<?php echo zget($hook, 'comment', '');?>'><?php echo zget($hook, 'comment', '');?></td>
  75. <td class='actions'>
  76. <?php extCommonModel::printLink('workflowhook', 'edit', "action=$action->id&key=$key", $lang->edit, "class='edit loadInModal iframe'");?>
  77. <?php extCommonModel::printLink('workflowhook', 'delete', "action=$action->id&key=$key", $lang->delete, "class='deleter reloadModal'");?>
  78. </td>
  79. </tr>
  80. <?php endforeach;?>
  81. </tbody>
  82. </table>
  83. </div>
  84. <?php include '../../common/view/footer.modal.html.php';?>