dtable.php 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  1. <?php
  2. global $lang, $app;
  3. $app->loadLang('story');
  4. $app->loadLang('bug');
  5. $app->loadLang('build');
  6. $isEn = $app->getClientLang() == 'en';
  7. $config->release->dtable = new stdclass();
  8. $config->release->dtable->story = new stdclass();
  9. $config->release->dtable->bug = new stdclass();
  10. $config->release->dtable->leftBug = new stdclass();
  11. $config->release->dtable->defaultFields['linkStory'] = array('id', 'title', 'pri', 'status', 'linkedBuild', 'estimate', 'stage');
  12. $config->release->dtable->defaultFields['linkBug']['bug'] = array('id', 'title', 'pri', 'status', 'openedBy', 'resolvedBy');
  13. $config->release->dtable->defaultFields['linkBug']['leftBug'] = array('id', 'title', 'severity', 'pri', 'status','openedBy', 'resolvedBy');
  14. $config->release->dtable->fieldList['id']['title'] = $lang->idAB;
  15. $config->release->dtable->fieldList['id']['name'] = 'id';
  16. $config->release->dtable->fieldList['id']['type'] = 'id';
  17. $config->release->dtable->fieldList['system']['name'] = 'system';
  18. $config->release->dtable->fieldList['system']['title'] = $lang->release->system;
  19. $config->release->dtable->fieldList['system']['type'] = 'shortNestedTitle';
  20. $config->release->dtable->fieldList['system']['fixed'] = 'left';
  21. $config->release->dtable->fieldList['system']['show'] = true;
  22. $config->release->dtable->fieldList['system']['required'] = true;
  23. $config->release->dtable->fieldList['system']['nestedToggle'] = true;
  24. $config->release->dtable->fieldList['name']['title'] = $lang->release->name;
  25. $config->release->dtable->fieldList['name']['name'] = 'name';
  26. $config->release->dtable->fieldList['name']['link'] = array('module' => 'release', 'method' => 'view', 'params' => 'releaseID={id}');
  27. $config->release->dtable->fieldList['name']['type'] = 'category';
  28. $config->release->dtable->fieldList['name']['fixed'] = 'left';
  29. $config->release->dtable->fieldList['name']['width'] = 150;
  30. $config->release->dtable->fieldList['name']['show'] = true;
  31. $config->release->dtable->fieldList['name']['required'] = true;
  32. $config->release->dtable->fieldList['branch']['title'] = $lang->release->branch;
  33. $config->release->dtable->fieldList['branch']['name'] = 'branchName';
  34. $config->release->dtable->fieldList['branch']['type'] = 'category';
  35. $config->release->dtable->fieldList['branch']['sortType'] = true;
  36. $config->release->dtable->fieldList['branch']['show'] = true;
  37. $config->release->dtable->fieldList['project']['title'] = $lang->release->project;
  38. $config->release->dtable->fieldList['project']['name'] = 'project';
  39. $config->release->dtable->fieldList['project']['type'] = 'category';
  40. $config->release->dtable->fieldList['project']['group'] = 1;
  41. $config->release->dtable->fieldList['project']['show'] = true;
  42. $config->release->dtable->fieldList['build']['title'] = $lang->release->includedBuild;
  43. $config->release->dtable->fieldList['build']['name'] = 'build';
  44. $config->release->dtable->fieldList['build']['type'] = 'category';
  45. $config->release->dtable->fieldList['build']['group'] = 1;
  46. $config->release->dtable->fieldList['build']['show'] = true;
  47. $config->release->dtable->fieldList['status']['title'] = $lang->release->status;
  48. $config->release->dtable->fieldList['status']['name'] = 'status';
  49. $config->release->dtable->fieldList['status']['type'] = 'status';
  50. $config->release->dtable->fieldList['status']['statusMap'] = $lang->release->statusList;
  51. $config->release->dtable->fieldList['status']['width'] = 120;
  52. $config->release->dtable->fieldList['status']['show'] = true;
  53. $config->release->dtable->fieldList['date']['title'] = $lang->release->date;
  54. $config->release->dtable->fieldList['date']['name'] = 'date';
  55. $config->release->dtable->fieldList['date']['type'] = 'date';
  56. $config->release->dtable->fieldList['date']['minWidth'] = $isEn ? '150' : '100';
  57. $config->release->dtable->fieldList['date']['show'] = true;
  58. $config->release->dtable->fieldList['releasedDate']['title'] = $lang->release->releasedDate;
  59. $config->release->dtable->fieldList['releasedDate']['name'] = 'releasedDate';
  60. $config->release->dtable->fieldList['releasedDate']['type'] = 'date';
  61. $config->release->dtable->fieldList['releasedDate']['minWidth'] = $isEn ? '150' : '100';
  62. $config->release->dtable->fieldList['releasedDate']['show'] = true;
  63. $config->release->dtable->fieldList['desc']['title'] = $lang->release->desc;
  64. $config->release->dtable->fieldList['desc']['name'] = 'desc';
  65. $config->release->dtable->fieldList['desc']['type'] = 'desc';
  66. $config->release->dtable->fieldList['desc']['width'] = '160';
  67. $config->release->dtable->fieldList['desc']['sortType'] = false;
  68. $config->release->dtable->fieldList['desc']['hint'] = true;
  69. $config->release->dtable->fieldList['desc']['show'] = true;
  70. $config->release->dtable->fieldList['actions']['title'] = $lang->actions;
  71. $config->release->dtable->fieldList['actions']['name'] = 'actions';
  72. $config->release->dtable->fieldList['actions']['type'] = 'actions';
  73. $config->release->dtable->fieldList['actions']['width'] = 'auto';
  74. $config->release->dtable->fieldList['actions']['list'] = $config->release->actionList;
  75. $config->release->dtable->fieldList['actions']['menu'] = array('linkStory', 'linkBug', 'publish|play|pause', 'edit', 'notify', 'delete');
  76. $config->release->dtable->story->fieldList['id']['title'] = $lang->idAB;
  77. $config->release->dtable->story->fieldList['id']['name'] = 'id';
  78. $config->release->dtable->story->fieldList['id']['type'] = 'checkID';
  79. $config->release->dtable->story->fieldList['id']['sortType'] = 'desc';
  80. $config->release->dtable->story->fieldList['id']['checkbox'] = true;
  81. $config->release->dtable->story->fieldList['title']['title'] = $lang->story->title;
  82. $config->release->dtable->story->fieldList['title']['name'] = 'title';
  83. $config->release->dtable->story->fieldList['title']['type'] = 'title';
  84. $config->release->dtable->story->fieldList['title']['link'] = helper::createLink('story', 'view', 'storyID={id}');
  85. $config->release->dtable->story->fieldList['title']['data-toggle'] = 'modal';
  86. $config->release->dtable->story->fieldList['title']['data-size'] = 'lg';
  87. $config->release->dtable->story->fieldList['title']['data-app'] = $app->tab;
  88. $config->release->dtable->story->fieldList['pri']['title'] = $lang->priAB;
  89. $config->release->dtable->story->fieldList['pri']['name'] = 'pri';
  90. $config->release->dtable->story->fieldList['pri']['type'] = 'pri';
  91. $config->release->dtable->story->fieldList['pri']['priList'] = $lang->story->priList;
  92. $config->release->dtable->story->fieldList['status']['title'] = $lang->statusAB;
  93. $config->release->dtable->story->fieldList['status']['name'] = 'status';
  94. $config->release->dtable->story->fieldList['status']['type'] = 'status';
  95. $config->release->dtable->story->fieldList['status']['statusMap'] = $lang->story->statusList;
  96. $config->release->dtable->story->fieldList['linkedBuild']['title'] = $lang->build->linkedBuild;
  97. $config->release->dtable->story->fieldList['linkedBuild']['name'] = 'buildName';
  98. $config->release->dtable->story->fieldList['linkedBuild']['type'] = 'text';
  99. $config->release->dtable->story->fieldList['openedBy']['title'] = $lang->openedByAB;
  100. $config->release->dtable->story->fieldList['openedBy']['name'] = 'openedBy';
  101. $config->release->dtable->story->fieldList['openedBy']['type'] = 'user';
  102. $config->release->dtable->story->fieldList['estimate']['title'] = $lang->story->estimateAB;
  103. $config->release->dtable->story->fieldList['estimate']['name'] = 'estimate';
  104. $config->release->dtable->story->fieldList['estimate']['type'] = 'number';
  105. if($isEn) $config->release->dtable->story->fieldList['estimate']['width'] = 100;
  106. $config->release->dtable->story->fieldList['stage']['title'] = $lang->story->stageAB;
  107. $config->release->dtable->story->fieldList['stage']['name'] = 'stage';
  108. $config->release->dtable->story->fieldList['stage']['type'] = 'category';
  109. $config->release->dtable->story->fieldList['stage']['map'] = $lang->story->stageList;
  110. if($isEn) $config->release->dtable->story->fieldList['stage']['width'] = 100;
  111. $config->release->dtable->story->fieldList['actions']['title'] = $lang->actions;
  112. $config->release->dtable->story->fieldList['actions']['name'] = 'actions';
  113. $config->release->dtable->story->fieldList['actions']['type'] = 'actions';
  114. $config->release->dtable->story->fieldList['actions']['minWidth'] = 60;
  115. $config->release->dtable->story->fieldList['actions']['menu'] = array('unlinkStory');
  116. $config->release->dtable->story->fieldList['actions']['list'] = $config->release->actionList;
  117. if($isEn) $config->release->dtable->story->fieldList['actions']['width'] = 80;
  118. $config->release->dtable->bug->fieldList['id']['title'] = $lang->idAB;
  119. $config->release->dtable->bug->fieldList['id']['name'] = 'id';
  120. $config->release->dtable->bug->fieldList['id']['type'] = 'checkID';
  121. $config->release->dtable->bug->fieldList['id']['sortType'] = 'desc';
  122. $config->release->dtable->bug->fieldList['title']['title'] = $lang->bug->title;
  123. $config->release->dtable->bug->fieldList['title']['name'] = 'title';
  124. $config->release->dtable->bug->fieldList['title']['type'] = 'title';
  125. $config->release->dtable->bug->fieldList['title']['link'] = array('module' => 'bug', 'method' => 'view', 'params' => 'bugID={id}');
  126. $config->release->dtable->bug->fieldList['title']['data-toggle'] = 'modal';
  127. $config->release->dtable->bug->fieldList['title']['data-size'] = 'lg';
  128. $config->release->dtable->bug->fieldList['title']['data-app'] = $app->tab;
  129. $config->release->dtable->bug->fieldList['severity']['title'] = $lang->bug->severity;
  130. $config->release->dtable->bug->fieldList['severity']['name'] = 'severity';
  131. $config->release->dtable->bug->fieldList['severity']['type'] = 'severity';
  132. $config->release->dtable->bug->fieldList['severity']['severityList'] = $lang->bug->severityList;
  133. $config->release->dtable->bug->fieldList['pri']['title'] = $lang->priAB;
  134. $config->release->dtable->bug->fieldList['pri']['name'] = 'pri';
  135. $config->release->dtable->bug->fieldList['pri']['type'] = 'pri';
  136. $config->release->dtable->bug->fieldList['pri']['priList'] = $lang->bug->priList;
  137. $config->release->dtable->bug->fieldList['status']['title'] = $lang->statusAB;
  138. $config->release->dtable->bug->fieldList['status']['name'] = 'status';
  139. $config->release->dtable->bug->fieldList['status']['type'] = 'status';
  140. $config->release->dtable->bug->fieldList['status']['statusMap'] = $lang->bug->statusList;
  141. $config->release->dtable->bug->fieldList['resolvedBuild']['title'] = $lang->bug->resolvedBuild;
  142. $config->release->dtable->bug->fieldList['resolvedBuild']['name'] = 'resolvedBuild';
  143. $config->release->dtable->bug->fieldList['resolvedBuild']['type'] = 'text';
  144. $config->release->dtable->bug->fieldList['openedBy']['title'] = $lang->openedByAB;
  145. $config->release->dtable->bug->fieldList['openedBy']['name'] = 'openedBy';
  146. $config->release->dtable->bug->fieldList['openedBy']['type'] = 'user';
  147. $config->release->dtable->bug->fieldList['openedDate']['title'] = $lang->bug->abbr->openedDate;
  148. $config->release->dtable->bug->fieldList['openedDate']['name'] = 'openedDate';
  149. $config->release->dtable->bug->fieldList['openedDate']['type'] = 'date';
  150. $config->release->dtable->bug->fieldList['resolvedBy']['title'] = $lang->bug->resolvedBy;
  151. $config->release->dtable->bug->fieldList['resolvedBy']['name'] = 'resolvedBy';
  152. $config->release->dtable->bug->fieldList['resolvedBy']['type'] = 'user';
  153. if($isEn) $config->release->dtable->bug->fieldList['resolvedBy']['width'] = 120;
  154. $config->release->dtable->bug->fieldList['resolvedDate']['title'] = $lang->bug->abbr->resolvedDate;
  155. $config->release->dtable->bug->fieldList['resolvedDate']['name'] = 'resolvedDate';
  156. $config->release->dtable->bug->fieldList['resolvedDate']['type'] = 'date';
  157. $config->release->dtable->bug->fieldList['actions']['title'] = $lang->actions;
  158. $config->release->dtable->bug->fieldList['actions']['name'] = 'actions';
  159. $config->release->dtable->bug->fieldList['actions']['type'] = 'actions';
  160. $config->release->dtable->bug->fieldList['actions']['minWidth'] = 60;
  161. $config->release->dtable->bug->fieldList['actions']['menu'] = array('unlinkBug');
  162. $config->release->dtable->bug->fieldList['actions']['list'] = $config->release->actionList;
  163. if($isEn) $config->release->dtable->bug->fieldList['actions']['width'] = 80;
  164. $config->release->dtable->leftBug = clone $config->release->dtable->bug;
  165. $config->release->dtable->leftBug->fieldList['openedBuild']['title'] = $lang->bug->openedBuild;
  166. $config->release->dtable->leftBug->fieldList['openedBuild']['name'] = 'openedBuild';
  167. $config->release->dtable->leftBug->fieldList['openedBuild']['type'] = 'text';
  168. $config->release->dtable->leftBug->fieldList['openedBuild']['sortType'] = true;
  169. $config->release->dtable->leftBug->fieldList['severity']['name'] = 'severityOrder';
  170. $config->release->dtable->leftBug->fieldList['actions']['menu'] = array('unlinkLeftBug');
  171. unset($config->release->dtable->leftBug->fieldList['resolvedBuild']);
  172. unset($config->release->dtable->leftBug->fieldList['resolvedBy']);
  173. unset($config->release->dtable->leftBug->fieldList['resolvedDate']);