table.php 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. <?php
  2. global $app, $lang;
  3. $app->loadLang('release');
  4. $app->loadModuleConfig('release');
  5. $isEn = $app->getClientLang() == 'en';
  6. $config->projectrelease->actionList = array();
  7. $config->projectrelease->actionList['linkStory']['icon'] = 'link';
  8. $config->projectrelease->actionList['linkStory']['hint'] = $lang->release->linkStory;
  9. $config->projectrelease->actionList['linkStory']['url'] = array('module' => 'projectrelease', 'method' => 'view', 'params' => 'releaseID={id}&type=story&link=true');
  10. $config->projectrelease->actionList['linkBug']['icon'] = 'bug';
  11. $config->projectrelease->actionList['linkBug']['hint'] = $lang->release->linkBug;
  12. $config->projectrelease->actionList['linkBug']['url'] = array('module' => 'projectrelease', 'method' => 'view', 'params' => 'releaseID={id}&type=bug&link=true');
  13. $config->projectrelease->actionList['publish']['icon'] = 'publish';
  14. $config->projectrelease->actionList['publish']['text '] = $this->lang->release->changeStatusList['wait'];
  15. $config->projectrelease->actionList['publish']['hint'] = $this->lang->release->changeStatusList['wait'];
  16. $config->projectrelease->actionList['publish']['url'] = array('module' => $app->tab == 'project' ? 'projectrelease' : 'release', 'method' => 'publish', 'params' => 'releaseID={id}');
  17. $config->projectrelease->actionList['publish']['notLoadModel'] = true;
  18. $config->projectrelease->actionList['publish']['data-toggle'] = 'modal';
  19. $config->projectrelease->actionList['play']['icon'] = 'play';
  20. $config->projectrelease->actionList['play']['hint'] = $lang->release->changeStatusList['normal'];
  21. $config->projectrelease->actionList['play']['url'] = array('module' => 'projectrelease', 'method' => 'changeStatus', 'params' => 'releaseID={id}&action=active');
  22. $config->projectrelease->actionList['play']['notLoadModel'] = true;
  23. $config->projectrelease->actionList['play']['className'] = 'ajax-submit';
  24. $config->projectrelease->actionList['play']['data-confirm'] = array('message' => $lang->release->confirmActivate, 'icon' => 'icon-exclamation-sign', 'iconClass' => 'warning-pale rounded-full icon-2x');
  25. $config->projectrelease->actionList['pause']['icon'] = 'pause';
  26. $config->projectrelease->actionList['pause']['text'] = $lang->release->changeStatusList['terminate'];
  27. $config->projectrelease->actionList['pause']['hint'] = $lang->release->changeStatusList['terminate'];
  28. $config->projectrelease->actionList['pause']['url'] = array('module' => 'projectrelease', 'method' => 'changeStatus', 'params' => 'releaseID={id}&action=pause');
  29. $config->projectrelease->actionList['pause']['notLoadModel'] = true;
  30. $config->projectrelease->actionList['pause']['className'] = 'ajax-submit';
  31. $config->projectrelease->actionList['pause']['data-confirm'] = array('message' => $lang->release->confirmTerminate, 'icon' => 'icon-exclamation-sign', 'iconClass' => 'warning-pale rounded-full icon-2x');
  32. $config->projectrelease->actionList['edit']['icon'] = 'edit';
  33. $config->projectrelease->actionList['edit']['hint'] = $lang->release->edit;
  34. $config->projectrelease->actionList['edit']['url'] = helper::createLink('projectrelease', 'edit', 'releaseID={id}');
  35. $config->projectrelease->actionList['notify']['icon'] = 'bullhorn';
  36. $config->projectrelease->actionList['notify']['hint'] = $lang->release->notify;
  37. $config->projectrelease->actionList['notify']['url'] = helper::createLink('projectrelease', 'notify', 'releaseID={id}', '', true);
  38. $config->projectrelease->actionList['notify']['data-toggle'] = 'modal';
  39. $config->projectrelease->actionList['delete']['icon'] = 'trash';
  40. $config->projectrelease->actionList['delete']['hint'] = $lang->release->delete;
  41. $config->projectrelease->actionList['delete']['url'] = helper::createLink('projectrelease', 'delete', 'releaseID={id}');
  42. $config->projectrelease->actionList['delete']['className'] = 'ajax-submit';
  43. $config->projectrelease->actionList['delete']['data-confirm'] = array('message' => $lang->release->confirmDelete, 'icon' => 'icon-exclamation-sign', 'iconClass' => 'warning-pale rounded-full icon-2x');
  44. $config->projectrelease->dtable = new stdclass();
  45. $config->projectrelease->dtable->fieldList['id']['name'] = 'id';
  46. $config->projectrelease->dtable->fieldList['id']['title'] = $lang->idAB;
  47. $config->projectrelease->dtable->fieldList['id']['type'] = 'id';
  48. $config->projectrelease->dtable->fieldList['id']['fixed'] = 'left';
  49. $config->projectrelease->dtable->fieldList['system']['name'] = 'system';
  50. $config->projectrelease->dtable->fieldList['system']['title'] = $lang->release->system;
  51. $config->projectrelease->dtable->fieldList['system']['type'] = 'shortNestedTitle';
  52. $config->projectrelease->dtable->fieldList['system']['fixed'] = 'left';
  53. $config->projectrelease->dtable->fieldList['system']['show'] = true;
  54. $config->projectrelease->dtable->fieldList['system']['nestedToggle'] = true;
  55. $config->projectrelease->dtable->fieldList['system']['required'] = true;
  56. $config->projectrelease->dtable->fieldList['name']['name'] = 'name';
  57. $config->projectrelease->dtable->fieldList['name']['title'] = $lang->release->name;
  58. $config->projectrelease->dtable->fieldList['name']['type'] = 'category';
  59. $config->projectrelease->dtable->fieldList['name']['fixed'] = 'left';
  60. $config->projectrelease->dtable->fieldList['name']['link'] = array('module' => 'projectrelease', 'method' => 'view', 'params' => 'releaseID={id}');
  61. $config->projectrelease->dtable->fieldList['name']['show'] = true;
  62. $config->projectrelease->dtable->fieldList['name']['required'] = true;
  63. if($isEn) $config->projectrelease->dtable->fieldList['name']['width'] = 130;
  64. $config->projectrelease->dtable->fieldList['product']['name'] = 'product';
  65. $config->projectrelease->dtable->fieldList['product']['title'] = $lang->projectrelease->product;
  66. $config->projectrelease->dtable->fieldList['product']['type'] = 'category';
  67. $config->projectrelease->dtable->fieldList['product']['group'] = '1';
  68. $config->projectrelease->dtable->fieldList['product']['show'] = true;
  69. $config->projectrelease->dtable->fieldList['branch']['title'] = $lang->release->branch;
  70. $config->projectrelease->dtable->fieldList['branch']['name'] = 'branch';
  71. $config->projectrelease->dtable->fieldList['branch']['type'] = 'category';
  72. $config->projectrelease->dtable->fieldList['branch']['group'] = '1';
  73. $config->projectrelease->dtable->fieldList['branch']['show'] = true;
  74. $config->projectrelease->dtable->fieldList['build']['name'] = 'build';
  75. $config->projectrelease->dtable->fieldList['build']['title'] = $lang->release->includedBuild;
  76. $config->projectrelease->dtable->fieldList['build']['type'] = 'category';
  77. $config->projectrelease->dtable->fieldList['build']['group'] = '1';
  78. $config->projectrelease->dtable->fieldList['build']['show'] = true;
  79. if($isEn) $config->projectrelease->dtable->fieldList['build']['width'] = 120;
  80. $config->projectrelease->dtable->fieldList['status']['title'] = $lang->release->status;
  81. $config->projectrelease->dtable->fieldList['status']['name'] = 'status';
  82. $config->projectrelease->dtable->fieldList['status']['type'] = 'status';
  83. $config->projectrelease->dtable->fieldList['status']['statusMap'] = $lang->release->statusList;
  84. $config->projectrelease->dtable->fieldList['status']['group'] = '2';
  85. $config->projectrelease->dtable->fieldList['status']['width'] = 120;
  86. $config->projectrelease->dtable->fieldList['status']['show'] = true;
  87. $config->projectrelease->dtable->fieldList['date']['title'] = $lang->release->date;
  88. $config->projectrelease->dtable->fieldList['date']['name'] = 'date';
  89. $config->projectrelease->dtable->fieldList['date']['type'] = 'date';
  90. $config->projectrelease->dtable->fieldList['date']['minWidth'] = '100';
  91. $config->projectrelease->dtable->fieldList['date']['group'] = '3';
  92. $config->projectrelease->dtable->fieldList['date']['show'] = true;
  93. if($isEn) $config->projectrelease->dtable->fieldList['date']['width'] = 160;
  94. $config->projectrelease->dtable->fieldList['releasedDate']['title'] = $lang->release->releasedDate;
  95. $config->projectrelease->dtable->fieldList['releasedDate']['name'] = 'releasedDate';
  96. $config->projectrelease->dtable->fieldList['releasedDate']['type'] = 'date';
  97. $config->projectrelease->dtable->fieldList['releasedDate']['minWidth'] = '100';
  98. $config->projectrelease->dtable->fieldList['releasedDate']['show'] = true;
  99. if($isEn) $config->projectrelease->dtable->fieldList['releasedDate']['width'] = 160;
  100. $config->projectrelease->dtable->fieldList['desc']['title'] = $lang->release->desc;
  101. $config->projectrelease->dtable->fieldList['desc']['name'] = 'desc';
  102. $config->projectrelease->dtable->fieldList['desc']['type'] = 'desc';
  103. $config->projectrelease->dtable->fieldList['desc']['width'] = '160';
  104. $config->projectrelease->dtable->fieldList['desc']['sortType'] = false;
  105. $config->projectrelease->dtable->fieldList['desc']['hint'] = true;
  106. $config->projectrelease->dtable->fieldList['desc']['show'] = true;
  107. $config->projectrelease->dtable->fieldList['actions']['title'] = $lang->actions;
  108. $config->projectrelease->dtable->fieldList['actions']['name'] = 'actions';
  109. $config->projectrelease->dtable->fieldList['actions']['type'] = 'actions';
  110. $config->projectrelease->dtable->fieldList['actions']['width'] = 'auto';
  111. $config->projectrelease->dtable->fieldList['actions']['list'] = $config->projectrelease->actionList;
  112. $config->projectrelease->dtable->fieldList['actions']['menu'] = array('linkStory', 'linkBug', 'publish|play|pause', 'edit', 'notify', 'delete');