table.php 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. <?php
  2. global $lang, $app;
  3. $isEn = $app->getClientLang() == 'en';
  4. $app->loadLang('story');
  5. $config->charter->dtable = new stdclass();
  6. $config->charter->dtable->fieldList = array();
  7. $config->charter->dtable->fieldList['id']['name'] = 'id';
  8. $config->charter->dtable->fieldList['id']['title'] = $lang->charter->idAB;
  9. $config->charter->dtable->fieldList['id']['type'] = 'id';
  10. $config->charter->dtable->fieldList['name']['name'] = 'name';
  11. $config->charter->dtable->fieldList['name']['fixed'] = 'left';
  12. $config->charter->dtable->fieldList['name']['type'] = 'title';
  13. $config->charter->dtable->fieldList['name']['link'] = array('module' => 'charter', 'method' => 'view', 'params' => "charterID={id}");
  14. $config->charter->dtable->fieldList['level']['name'] = 'level';
  15. $config->charter->dtable->fieldList['level']['title'] = $lang->charter->level;
  16. $config->charter->dtable->fieldList['level']['type'] = 'pri';
  17. $config->charter->dtable->fieldList['level']['show'] = true;
  18. $config->charter->dtable->fieldList['status']['name'] = 'status';
  19. $config->charter->dtable->fieldList['status']['type'] = 'status';
  20. $config->charter->dtable->fieldList['status']['statusMap'] = $lang->charter->statusList;
  21. $config->charter->dtable->fieldList['status']['show'] = true;
  22. $config->charter->dtable->fieldList['category']['name'] = 'category';
  23. $config->charter->dtable->fieldList['category']['type'] = 'category';
  24. $config->charter->dtable->fieldList['category']['map'] = $lang->charter->categoryList;
  25. $config->charter->dtable->fieldList['category']['show'] = true;
  26. $config->charter->dtable->fieldList['market']['name'] = 'market';
  27. $config->charter->dtable->fieldList['market']['type'] = 'category';
  28. $config->charter->dtable->fieldList['market']['map'] = $lang->charter->marketList;
  29. $config->charter->dtable->fieldList['market']['show'] = true;
  30. $config->charter->dtable->fieldList['budget']['name'] = 'budget';
  31. $config->charter->dtable->fieldList['budget']['type'] = 'money';
  32. $config->charter->dtable->fieldList['budget']['show'] = true;
  33. $config->charter->dtable->fieldList['reviewStatusAB']['name'] = 'reviewStatusAB';
  34. $config->charter->dtable->fieldList['reviewStatusAB']['title'] = 'reviewStatus';
  35. $config->charter->dtable->fieldList['reviewStatusAB']['type'] = 'category';
  36. $config->charter->dtable->fieldList['reviewStatusAB']['map'] = $lang->charter->reviewStatusList;
  37. $config->charter->dtable->fieldList['reviewStatusAB']['link'] = array('module' => 'charter', 'method' => 'approvalProgress', 'params' => 'approvalID={approval}');
  38. $config->charter->dtable->fieldList['reviewStatusAB']['data-toggle'] = 'modal';
  39. $config->charter->dtable->fieldList['reviewStatusAB']['show'] = true;
  40. if($isEn) $config->charter->dtable->fieldList['reviewStatusAB']['width'] = 120;
  41. $config->charter->dtable->fieldList['appliedBy']['name'] = 'appliedBy';
  42. $config->charter->dtable->fieldList['appliedBy']['title'] = $lang->charter->abbr->appliedBy;
  43. $config->charter->dtable->fieldList['appliedBy']['type'] = 'user';
  44. $config->charter->dtable->fieldList['appliedBy']['show'] = true;
  45. if($isEn) $config->charter->dtable->fieldList['appliedBy']['width'] = 120;
  46. $config->charter->dtable->fieldList['appliedDate']['name'] = 'appliedDate';
  47. $config->charter->dtable->fieldList['appliedDate']['title'] = $lang->charter->abbr->appliedDate;
  48. $config->charter->dtable->fieldList['appliedDate']['type'] = 'date';
  49. $config->charter->dtable->fieldList['appliedDate']['show'] = true;
  50. if($isEn) $config->charter->dtable->fieldList['appliedDate']['width'] = 120;
  51. $config->charter->dtable->fieldList['actions']['name'] = 'actions';
  52. $config->charter->dtable->fieldList['actions']['title'] = $lang->actions;
  53. $config->charter->dtable->fieldList['actions']['type'] = 'actions';
  54. $config->charter->dtable->fieldList['actions']['sortType'] = false;
  55. $config->charter->dtable->fieldList['actions']['width'] = '';
  56. $config->charter->dtable->fieldList['actions']['list'] = $config->charter->actionList;
  57. $config->charter->dtable->fieldList['actions']['menu'] = array('projectApproval|completionApproval|activateProjectApproval', 'approvalCancel', 'review', 'close', 'edit');
  58. $config->charter->roadmapStory = new stdclass();
  59. $config->charter->roadmapStory->fieldList = array();
  60. $config->charter->roadmapStory->fieldList['id']['name'] = 'id';
  61. $config->charter->roadmapStory->fieldList['id']['type'] = 'id';
  62. $config->charter->roadmapStory->fieldList['id']['sortType'] = false;
  63. $config->charter->roadmapStory->fieldList['pri']['name'] = 'pri';
  64. $config->charter->roadmapStory->fieldList['pri']['type'] = 'pri';
  65. $config->charter->roadmapStory->fieldList['pri']['sortType'] = false;
  66. $config->charter->roadmapStory->fieldList['title']['name'] = 'title';
  67. $config->charter->roadmapStory->fieldList['title']['title'] = $lang->story->name;
  68. $config->charter->roadmapStory->fieldList['title']['type'] = 'title';
  69. $config->charter->roadmapStory->fieldList['title']['nestedToggle'] = true;
  70. $config->charter->roadmapStory->fieldList['title']['link'] = array('module' => 'story', 'method' => 'storyView', 'params' => "storyID={id}&version={version}&param=0&storyType={type}");
  71. $config->charter->roadmapStory->fieldList['title']['sortType'] = false;
  72. $config->charter->roadmapStory->fieldList['roadmap']['name'] = 'roadmap';
  73. $config->charter->roadmapStory->fieldList['roadmap']['title'] = $lang->story->roadmap;
  74. $config->charter->roadmapStory->fieldList['roadmap']['type'] = 'category';
  75. $config->charter->roadmapStory->fieldList['module']['name'] = 'module';
  76. $config->charter->roadmapStory->fieldList['module']['title'] = $lang->story->module;
  77. $config->charter->roadmapStory->fieldList['module']['type'] = 'category';
  78. $config->charter->roadmapStory->fieldList['status']['name'] = 'status';
  79. $config->charter->roadmapStory->fieldList['status']['title'] = $lang->story->status;
  80. $config->charter->roadmapStory->fieldList['status']['type'] = 'status';
  81. $config->charter->roadmapStory->fieldList['status']['sortType'] = false;
  82. $config->charter->roadmapStory->fieldList['status']['statusMap'] = $lang->story->statusList;
  83. global $app;
  84. $app->loadLang('program');
  85. $app->loadConfig('program');
  86. $config->charter->programList = new stdclass();
  87. $config->charter->programList->fieldList = array();
  88. $config->charter->programList->fieldList['id']['name'] = 'id';
  89. $config->charter->programList->fieldList['id']['type'] = 'id';
  90. $config->charter->programList->fieldList['id']['sortType'] = false;
  91. $config->charter->programList->fieldList['name'] = $config->program->browse->dtable->fieldList['name'];
  92. $config->charter->programList->fieldList['status'] = $config->program->browse->dtable->fieldList['status'];
  93. $config->charter->programList->fieldList['PM'] = $config->program->browse->dtable->fieldList['PM'];
  94. $config->charter->programList->fieldList['budget'] = $config->program->browse->dtable->fieldList['budget'];
  95. $config->charter->programList->fieldList['begin'] = $config->program->browse->dtable->fieldList['begin'];
  96. $config->charter->programList->fieldList['end'] = $config->program->browse->dtable->fieldList['end'];
  97. $config->charter->programList->fieldList['progress'] = $config->program->browse->dtable->fieldList['progress'];
  98. $config->charter->programList->fieldList['PM']['type'] = 'user';
  99. $config->charter->programList->fieldList['name']['link'] = "RAWJS<function(info){const {row, col} = info; if(row.data.type == 'project') return {url:$.createLink('project', 'view', 'projectID=' + row.data.id)}; if(row.data.type == 'program') return {url:$.createLink('program', 'project', 'programID=' + row.data.id)};}>RAWJS";
  100. unset($config->charter->programList->fieldList['PM']['link']);
  101. if($config->vision == 'or') unset($config->charter->programList->fieldList['name']['link']);