config.php 7.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. <?php
  2. $config->release = new stdclass();
  3. $config->release->create = new stdclass();
  4. $config->release->edit = new stdclass();
  5. $config->release->publish = new stdclass();
  6. $config->release->create->requiredFields = 'name,date,releasedDate';
  7. $config->release->edit->requiredFields = 'name,date,releasedDate';
  8. $config->release->publish->requiredFields = 'releasedDate';
  9. $config->release->editor = new stdclass();
  10. $config->release->editor->create = array('id' => 'desc', 'tools' => 'simpleTools');
  11. $config->release->editor->edit = array('id' => 'desc', 'tools' => 'simpleTools');
  12. global $lang, $app;
  13. $config->release->actionList['linkStory']['icon'] = 'link';
  14. $config->release->actionList['linkStory']['hint'] = $lang->release->linkStory;
  15. $config->release->actionList['linkStory']['url'] = common::hasPriv('release', 'linkStory') ? array('module' => 'release', 'method' => 'view', 'params' => 'releaseID={id}&type=story&link=true') : null;
  16. $config->release->actionList['unlinkStory']['icon'] = 'unlink';
  17. $config->release->actionList['unlinkStory']['hint'] = $lang->release->unlinkStory;
  18. $config->release->actionList['unlinkStory']['url'] = 'javascript: unlinkObject("story", "{id}")';
  19. $config->release->actionList['linkBug']['icon'] = 'bug';
  20. $config->release->actionList['linkBug']['hint'] = $lang->release->linkBug;
  21. $config->release->actionList['linkBug']['url'] = common::hasPriv('release', 'linkBug') ? array('module' => 'release', 'method' => 'view', 'params' => 'releaseID={id}&type=bug&link=true') : null;
  22. $config->release->actionList['unlinkBug']['icon'] = 'unlink';
  23. $config->release->actionList['unlinkBug']['hint'] = $lang->release->unlinkBug;
  24. $config->release->actionList['unlinkBug']['url'] = 'javascript: unlinkObject("bug", "{id}")';
  25. $config->release->actionList['unlinkLeftBug']['icon'] = 'unlink';
  26. $config->release->actionList['unlinkLeftBug']['hint'] = $lang->release->unlinkBug;
  27. $config->release->actionList['unlinkLeftBug']['url'] = 'javascript: unlinkObject("leftBug", "{id}")';
  28. $config->release->actionList['publish']['icon'] = 'publish';
  29. $config->release->actionList['publish']['text '] = $this->lang->release->changeStatusList['wait'];
  30. $config->release->actionList['publish']['hint'] = $this->lang->release->changeStatusList['wait'];
  31. $config->release->actionList['publish']['url'] = array('module' => $app->tab == 'project' ? 'projectrelease' : 'release', 'method' => 'publish', 'params' => 'releaseID={id}');
  32. $config->release->actionList['publish']['notLoadModel'] = true;
  33. $config->release->actionList['publish']['data-toggle'] = 'modal';
  34. $config->release->actionList['publish']['class'] = 'publish-btn';
  35. $config->release->actionList['play']['icon'] = 'play';
  36. $config->release->actionList['play']['text '] = $this->lang->release->changeStatusList['normal'];
  37. $config->release->actionList['play']['hint'] = $this->lang->release->changeStatusList['normal'];
  38. $config->release->actionList['play']['url'] = array('module' => $app->tab == 'project' ? 'projectrelease' : 'release', 'method' => 'changeStatus', 'params' => 'releaseID={id}&action=active');
  39. $config->release->actionList['play']['notLoadModel'] = true;
  40. $config->release->actionList['play']['className'] = 'ajax-submit';
  41. $config->release->actionList['play']['data-confirm'] = array('message' => $lang->release->confirmActivate, 'icon' => 'icon-exclamation-sign', 'iconClass' => 'warning-pale rounded-full icon-2x');
  42. $config->release->actionList['pause']['icon'] = 'pause';
  43. $config->release->actionList['pause']['text'] = $this->lang->release->changeStatusList['terminate'];
  44. $config->release->actionList['pause']['hint'] = $this->lang->release->changeStatusList['terminate'];
  45. $config->release->actionList['pause']['url'] = array('module' => $app->tab == 'project' ? 'projectrelease' : 'release', 'method' => 'changeStatus', 'params' => 'releaseID={id}&action=pause');
  46. $config->release->actionList['pause']['notLoadModel'] = true;
  47. $config->release->actionList['pause']['className'] = 'ajax-submit';
  48. $config->release->actionList['pause']['data-confirm'] = array('message' => $lang->release->confirmTerminate, 'icon' => 'icon-exclamation-sign', 'iconClass' => 'warning-pale rounded-full icon-2x');
  49. $config->release->actionList['edit']['icon'] = 'edit';
  50. $config->release->actionList['edit']['text'] = $lang->release->edit;
  51. $config->release->actionList['edit']['hint'] = $lang->release->edit;
  52. $config->release->actionList['edit']['url'] = $app->tab == 'project' ? helper::createLink('projectrelease', 'edit', 'releaseID={id}') : helper::createLink('release', 'edit', 'releaseID={id}');
  53. $config->release->actionList['notify']['icon'] = 'bullhorn';
  54. $config->release->actionList['notify']['hint'] = $lang->release->notify;
  55. $config->release->actionList['notify']['url'] = helper::createLink('release', 'notify', 'releaseID={id}');
  56. $config->release->actionList['notify']['data-toggle'] = 'modal';
  57. $config->release->actionList['delete']['icon'] = 'trash';
  58. $config->release->actionList['delete']['text'] = $lang->release->delete;
  59. $config->release->actionList['delete']['hint'] = $lang->release->delete;
  60. $config->release->actionList['delete']['url'] = helper::createLink($app->tab == 'project' ? 'projectrelease' : 'release', 'delete', 'releaseID={id}');
  61. $config->release->actionList['delete']['className'] = 'ajax-submit';
  62. $config->release->actionList['delete']['data-confirm'] = array('message' => $lang->release->confirmDelete, 'icon' => 'icon-exclamation-sign', 'iconClass' => 'warning-pale rounded-full icon-2x');
  63. /* Search config. */
  64. $config->release->search['module'] = 'release';
  65. $config->release->search['fields']['name'] = $lang->release->name;
  66. $config->release->search['fields']['branch'] = $lang->release->branch;
  67. $config->release->search['fields']['id'] = $lang->idAB;
  68. $config->release->search['fields']['build'] = $lang->release->includedBuild;
  69. $config->release->search['fields']['status'] = $lang->release->status;
  70. $config->release->search['fields']['date'] = $lang->release->date;
  71. $config->release->search['fields']['marker'] = $lang->release->marker;
  72. $config->release->search['params']['name'] = array('operator' => 'include', 'control' => 'input', 'values' => '');
  73. $config->release->search['params']['branch'] = array('operator' => '=', 'control' => 'select', 'values' => array());
  74. $config->release->search['params']['id'] = array('operator' => '=', 'control' => 'input', 'values' => '');
  75. $config->release->search['params']['build'] = array('operator' => 'include', 'control' => 'select', 'values' => array());
  76. $config->release->search['params']['status'] = array('operator' => '=', 'control' => 'select', 'values' => $lang->release->statusList);
  77. $config->release->search['params']['date'] = array('operator' => '=', 'control' => 'date', 'values' => '');
  78. $config->release->search['params']['marker'] = array('operator' => '=', 'control' => 'select', 'values' => $lang->release->markerList);
  79. $config->release->actions = new stdclass();
  80. $config->release->actions->view = array();
  81. $config->release->actions->view['mainActions'] = array('publish', 'play', 'pause');
  82. $config->release->actions->view['suffixActions'] = array('edit', 'delete');