browsedb.html.php 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. <?php
  2. /**
  3. * The browse view file of workflow 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 workflow
  9. * @version $Id$
  10. * @link http://www.zdoo.com
  11. */
  12. ?>
  13. <?php include '../view/header.html.php';?>
  14. <?php include $app->getModuleRoot() . 'common/view/sortable.html.php';?>
  15. <?php js::set('defaultConfirmDelete', $lang->confirmDelete);?>
  16. <?php js::set('confirmDeleteHasQuote', $lang->workflow->tips->confirmDeleteHasQuote);?>
  17. <?php js::set('confirmDeleteInQuote', $lang->workflow->tips->confirmDeleteInQuote);?>
  18. <div class='space space-sm'></div>
  19. <div class='row'>
  20. <?php if(strpos($subTableTipsReaders, ",{$this->app->user->account},") === false):?>
  21. <div class='alert alert-warning'>
  22. <p><i class='icon-alert icon-md'></i> <?php echo $lang->workflow->tips->subTable;?></p>
  23. </div>
  24. <?php endif;?>
  25. <div class='col-md-7'>
  26. <div class='panel'>
  27. <div class='panel-heading'>
  28. <strong><?php echo $currentTable ? $currentTable->name : $lang->workflow->subTable . '&nbsp;' . $lang->workflow->field;?></strong>
  29. <div class='panel-actions pull-right'>
  30. </div>
  31. </div>
  32. <div class='panel-body'>
  33. <table class='table table-form'>
  34. <?php foreach($fields as $field):?>
  35. <tr>
  36. <th class='w-100px'><?php echo $field->name;?> </th>
  37. <td>
  38. <?php
  39. if($field->field == 'id' or $field->field == 'parent')
  40. {
  41. echo html::input($field->field, $lang->workflowfield->placeholder->auto, "class='form-control' disabled='disabled'");
  42. }
  43. else
  44. {
  45. echo $this->loadModel('flow')->buildControl($field, '', "preview_{$field->field}", '', true, true);
  46. }
  47. ?>
  48. </td>
  49. <td class='w-160px'></td>
  50. </tr>
  51. <?php endforeach;?>
  52. </table>
  53. </div>
  54. </div>
  55. </div>
  56. <div class='col-md-5'>
  57. <div class='panel'>
  58. <div class='panel-heading'>
  59. <strong><?php echo $lang->workflow->subTableSettings;?></strong>
  60. <div class='panel-actions pull-right'>
  61. <?php if(in_array($flow->belong, array('product', 'project', 'exectuion'))) extCommonModel::printLink('workflow', 'quoteDB', "module={$flow->module}&groupID={$this->session->workflowGroupID}", $lang->workflow->quoteDB, "class='btn btn-secondary iframe'");?>
  62. <?php common::printLink('workflow', 'create', "type=table&parent={$flow->module}", '<i class="icon-plus"> </i> ' . $lang->workflowtable->create, '', "class='btn btn-primary iframe' data-toggle='modal' data-size='sm'");?>
  63. </div>
  64. </div>
  65. <div class='panel-body main-table no-padding'>
  66. <table class='table'>
  67. <thead>
  68. <tr>
  69. <th class='w-90px'><?php echo $lang->workflowtable->name;?></th>
  70. <th class='w-90px'><?php echo $lang->workflowtable->module;?></th>
  71. <th class='w-100px'><?php echo $lang->workflowfield->group;?></th>
  72. <th><?php echo $lang->workflow->desc;?></th>
  73. <th class='w-100px text-center'><?php echo $lang->actions;?></th>
  74. </tr>
  75. </thead>
  76. <tbody>
  77. <?php foreach($tables as $table):?>
  78. <tr <?php echo $table->module == $currentTable->module ? "class='checked row-check-begin row-check-end'" : '';?> data-id='<?php echo $table->id;?>'>
  79. <td title='<?php echo $table->name;?>'><?php echo $table->name;?></td>
  80. <td title='<?php echo $table->module?>'><?php echo $table->module;?></td>
  81. <td title='<?php echo $table->groupName?>'><?php echo $table->groupName;?></td>
  82. <td title='<?php echo $table->desc;?>'><?php echo $table->desc;?></td>
  83. <td class='actions'>
  84. <?php
  85. $hasQuote = 0;
  86. if($table->role == 'custom') array_map(function($quoteTable) use(&$hasQuote, $table){if($quoteTable->module == $table->module) $hasQuote = 1;}, $quoteTables);
  87. common::printIcon('workflowfield', 'browse', "module=$table->module&order=order&groupID={$this->session->workflowGroupID}", $table, 'list', 'fields', '', '', false, '', $lang->workflow->field);
  88. common::printIcon('workflow', 'edit', "id=$table->id", $table, 'list', 'edit', '', ($table->role == 'quote' ? ' disabled' : 'iframe'), false, $table->role == 'quote' ? '' : "data-toggle='modal' data-size='sm'", $table->role == 'quote' ? $lang->workflow->tips->notEditTable : $lang->edit);
  89. $deleteTitle = $table->role == 'quote' ? $lang->workflow->title->remove : $lang->delete;
  90. $deleteIcon = $table->role == 'quote' ? 'unlink' : 'trash';
  91. common::printIcon('workflow', 'delete', "id=$table->id", $table, 'list', $deleteIcon, '', 'confirmer', false, "data-hasquote='{$hasQuote}' data-role='{$table->role}'", $deleteTitle);
  92. ?>
  93. </td>
  94. </tr>
  95. <?php endforeach;?>
  96. </tbody>
  97. </table>
  98. </div>
  99. </div>
  100. </div>
  101. </div>
  102. <?php include $app->getModuleRoot() . 'common/view/footer.html.php';?>