dtable.php 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. <?php
  2. global $lang, $app;
  3. $app->loadLang('bug');
  4. $app->loadLang('story');
  5. $config->build->dtable = new stdclass();
  6. $config->build->dtable->fieldList['id']['title'] = $lang->idAB;
  7. $config->build->dtable->fieldList['id']['name'] = 'id';
  8. $config->build->dtable->fieldList['id']['type'] = 'id';
  9. $config->build->dtable->fieldList['name']['title'] = $lang->build->nameAB;
  10. $config->build->dtable->fieldList['name']['name'] = 'name';
  11. $config->build->dtable->fieldList['name']['link'] = array('module' => 'build', 'method' => 'view', 'params' => 'buildID={id}');
  12. $config->build->dtable->fieldList['name']['type'] = 'title';
  13. $config->build->dtable->fieldList['name']['width'] = '300';
  14. $config->build->dtable->fieldList['name']['sortType'] = false;
  15. $config->build->dtable->fieldList['name']['show'] = 1;
  16. $config->build->dtable->fieldList['productName']['title'] = $lang->build->product;
  17. $config->build->dtable->fieldList['productName']['name'] = 'productName';
  18. $config->build->dtable->fieldList['productName']['type'] = 'desc';
  19. $config->build->dtable->fieldList['productName']['group'] = 1;
  20. $config->build->dtable->fieldList['productName']['show'] = 1;
  21. $config->build->dtable->fieldList['system']['title'] = $lang->build->system;
  22. $config->build->dtable->fieldList['system']['name'] = 'system';
  23. $config->build->dtable->fieldList['system']['type'] = 'desc';
  24. $config->build->dtable->fieldList['system']['group'] = 1;
  25. $config->build->dtable->fieldList['system']['show'] = 1;
  26. $config->build->dtable->fieldList['branch']['title'] = $lang->build->branch;
  27. $config->build->dtable->fieldList['branch']['name'] = 'branchName';
  28. $config->build->dtable->fieldList['branch']['type'] = 'desc';
  29. $config->build->dtable->fieldList['branch']['group'] = 1;
  30. $config->build->dtable->fieldList['branch']['show'] = 1;
  31. $config->build->dtable->fieldList['executionName']['title'] = $lang->build->execution;
  32. $config->build->dtable->fieldList['executionName']['name'] = 'executionName';
  33. $config->build->dtable->fieldList['executionName']['type'] = 'desc';
  34. $config->build->dtable->fieldList['executionName']['group'] = 1;
  35. $config->build->dtable->fieldList['executionName']['show'] = 1;
  36. $config->build->dtable->fieldList['path']['title'] = $lang->build->url;
  37. $config->build->dtable->fieldList['path']['name'] = 'path';
  38. $config->build->dtable->fieldList['path']['type'] = 'desc';
  39. $config->build->dtable->fieldList['path']['show'] = 1;
  40. $config->build->dtable->fieldList['builder']['title'] = $lang->build->builder;
  41. $config->build->dtable->fieldList['builder']['name'] = 'builder';
  42. $config->build->dtable->fieldList['builder']['type'] = 'user';
  43. $config->build->dtable->fieldList['builder']['sortType'] = false;
  44. $config->build->dtable->fieldList['builder']['show'] = 1;
  45. $config->build->dtable->fieldList['date']['title'] = $lang->build->date;
  46. $config->build->dtable->fieldList['date']['name'] = 'date';
  47. $config->build->dtable->fieldList['date']['type'] = 'date';
  48. $config->build->dtable->fieldList['date']['sortType'] = true;
  49. $config->build->dtable->fieldList['actions']['title'] = $lang->actions;
  50. $config->build->dtable->fieldList['actions']['name'] = 'actions';
  51. $config->build->dtable->fieldList['actions']['type'] = 'actions';
  52. $config->build->dtable->fieldList['actions']['width'] = '120px';
  53. $config->build->dtable->fieldList['actions']['list'] = $config->build->actionList;
  54. $config->build->dtable->fieldList['actions']['menu'] = array('linkStory', 'createTest', 'viewBug', 'edit', 'delete');
  55. $config->build->story = new stdclass();
  56. $config->build->bug = new stdclass();
  57. $config->build->generatedBug = new stdclass();
  58. $config->build->story->dtable = new stdclass();
  59. $config->build->bug->dtable = new stdclass();
  60. $config->build->generatedBug->dtable = new stdclass();
  61. $config->build->story->dtable->fieldList['id']['title'] = $lang->idAB;
  62. $config->build->story->dtable->fieldList['id']['name'] = 'id';
  63. $config->build->story->dtable->fieldList['id']['type'] = 'checkID';
  64. $config->build->story->dtable->fieldList['id']['sortType'] = 'desc';
  65. $config->build->story->dtable->fieldList['id']['checkbox'] = true;
  66. $config->build->story->dtable->fieldList['title']['title'] = $lang->story->title;
  67. $config->build->story->dtable->fieldList['title']['name'] = 'title';
  68. $config->build->story->dtable->fieldList['title']['type'] = 'title';
  69. $config->build->story->dtable->fieldList['title']['link'] = array('module' => 'story', 'method' => 'view', 'params' => 'storyID={id}');
  70. $config->build->story->dtable->fieldList['title']['data-toggle'] = 'modal';
  71. $config->build->story->dtable->fieldList['title']['data-size'] = 'lg';
  72. $config->build->story->dtable->fieldList['title']['data-app'] = $app->tab;
  73. $config->build->story->dtable->fieldList['pri']['title'] = $lang->priAB;
  74. $config->build->story->dtable->fieldList['pri']['name'] = 'pri';
  75. $config->build->story->dtable->fieldList['pri']['type'] = 'pri';
  76. $config->build->story->dtable->fieldList['pri']['priList'] = $lang->story->priList;
  77. $config->build->story->dtable->fieldList['status']['title'] = $lang->statusAB;
  78. $config->build->story->dtable->fieldList['status']['name'] = 'status';
  79. $config->build->story->dtable->fieldList['status']['type'] = 'status';
  80. $config->build->story->dtable->fieldList['status']['statusMap'] = $lang->story->statusList;
  81. $config->build->story->dtable->fieldList['openedBy']['title'] = $lang->openedByAB;
  82. $config->build->story->dtable->fieldList['openedBy']['name'] = 'openedBy';
  83. $config->build->story->dtable->fieldList['openedBy']['type'] = 'user';
  84. $config->build->story->dtable->fieldList['estimate']['title'] = $lang->story->estimateAB;
  85. $config->build->story->dtable->fieldList['estimate']['name'] = 'estimate';
  86. $config->build->story->dtable->fieldList['estimate']['type'] = 'number';
  87. $config->build->story->dtable->fieldList['stage']['title'] = $lang->story->stageAB;
  88. $config->build->story->dtable->fieldList['stage']['name'] = 'stage';
  89. $config->build->story->dtable->fieldList['stage']['type'] = 'category';
  90. $config->build->story->dtable->fieldList['stage']['map'] = $lang->story->stageList;
  91. $config->build->story->dtable->fieldList['stage']['sortType'] = true;
  92. $config->build->story->dtable->fieldList['actions']['title'] = $lang->actions;
  93. $config->build->story->dtable->fieldList['actions']['name'] = 'actions';
  94. $config->build->story->dtable->fieldList['actions']['type'] = 'actions';
  95. $config->build->story->dtable->fieldList['actions']['menu'] = array('unlinkStory');
  96. $config->build->story->dtable->fieldList['actions']['list'] = $config->build->actionList;
  97. $config->build->story->dtable->fieldList['actions']['minWidth'] = '60';
  98. $config->build->bug->dtable->fieldList['id']['title'] = $lang->idAB;
  99. $config->build->bug->dtable->fieldList['id']['name'] = 'id';
  100. $config->build->bug->dtable->fieldList['id']['type'] = 'checkID';
  101. $config->build->bug->dtable->fieldList['id']['sortType'] = 'desc';
  102. $config->build->bug->dtable->fieldList['title']['title'] = $lang->bug->title;
  103. $config->build->bug->dtable->fieldList['title']['name'] = 'title';
  104. $config->build->bug->dtable->fieldList['title']['type'] = 'title';
  105. $config->build->bug->dtable->fieldList['title']['width'] = '300';
  106. $config->build->bug->dtable->fieldList['title']['link'] = array('module' => 'bug', 'method' => 'view', 'params' => 'bugID={id}');
  107. $config->build->bug->dtable->fieldList['title']['data-toggle'] = 'modal';
  108. $config->build->bug->dtable->fieldList['title']['data-size'] = 'lg';
  109. $config->build->bug->dtable->fieldList['title']['data-app'] = $app->tab;
  110. $config->build->bug->dtable->fieldList['severity']['title'] = $lang->bug->severity;
  111. $config->build->bug->dtable->fieldList['severity']['name'] = 'severity';
  112. $config->build->bug->dtable->fieldList['severity']['type'] = 'severity';
  113. $config->build->bug->dtable->fieldList['severity']['severityList'] = $lang->bug->severityList;
  114. $config->build->bug->dtable->fieldList['pri']['title'] = $lang->priAB;
  115. $config->build->bug->dtable->fieldList['pri']['name'] = 'pri';
  116. $config->build->bug->dtable->fieldList['pri']['type'] = 'pri';
  117. $config->build->bug->dtable->fieldList['pri']['priList'] = $lang->bug->priList;
  118. $config->build->bug->dtable->fieldList['status']['title'] = $lang->statusAB;
  119. $config->build->bug->dtable->fieldList['status']['name'] = 'status';
  120. $config->build->bug->dtable->fieldList['status']['type'] = 'status';
  121. $config->build->bug->dtable->fieldList['status']['statusMap'] = $lang->bug->statusList;
  122. $config->build->bug->dtable->fieldList['openedBy']['title'] = $lang->openedByAB;
  123. $config->build->bug->dtable->fieldList['openedBy']['name'] = 'openedBy';
  124. $config->build->bug->dtable->fieldList['openedBy']['type'] = 'user';
  125. $config->build->bug->dtable->fieldList['openedDate']['title'] = $lang->bug->abbr->openedDate;
  126. $config->build->bug->dtable->fieldList['openedDate']['name'] = 'openedDate';
  127. $config->build->bug->dtable->fieldList['openedDate']['type'] = 'date';
  128. $config->build->bug->dtable->fieldList['resolvedBy']['title'] = $lang->bug->resolvedBy;
  129. $config->build->bug->dtable->fieldList['resolvedBy']['name'] = 'resolvedBy';
  130. $config->build->bug->dtable->fieldList['resolvedBy']['type'] = 'user';
  131. $config->build->bug->dtable->fieldList['resolvedDate']['title'] = $lang->bug->abbr->resolvedDate;
  132. $config->build->bug->dtable->fieldList['resolvedDate']['name'] = 'resolvedDate';
  133. $config->build->bug->dtable->fieldList['resolvedDate']['type'] = 'date';
  134. $config->build->bug->dtable->fieldList['actions']['title'] = $lang->actions;
  135. $config->build->bug->dtable->fieldList['actions']['name'] = 'actions';
  136. $config->build->bug->dtable->fieldList['actions']['type'] = 'actions';
  137. $config->build->bug->dtable->fieldList['actions']['menu'] = array('unlinkBug');
  138. $config->build->bug->dtable->fieldList['actions']['list'] = $config->build->actionList;
  139. $config->build->bug->dtable->fieldList['actions']['minWidth'] = '60';
  140. $config->build->generatedBug->dtable = clone $config->build->bug->dtable;
  141. array_splice($config->build->generatedBug->dtable->fieldList, 5, 0, array('openedBuild' => array('title' => $lang->bug->openedBuild, 'name' => 'openedBuild', 'type' => 'html', 'width' => '200px', 'hint' => true)));
  142. $config->build->generatedBug->dtable->fieldList['id']['checkbox'] = false;
  143. unset($config->build->generatedBug->dtable->fieldList['actions']);
  144. $config->build->defaultFields['linkStory'] = array('id', 'pri', 'title', 'openedBy', 'assignedTo', 'estimate', 'status', 'stage');
  145. $config->build->defaultFields['linkBug'] = array('id', 'pri', 'title', 'openedBy', 'resolvedBy', 'status');