caseblock.php 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. global $lang, $app;
  3. $app->loadLang('testcase');
  4. $app->loadModuleConfig('testcase');
  5. $config->block->case = new stdclass();
  6. $config->block->case->dtable = new stdclass();
  7. $config->block->case->dtable->fieldList = array();
  8. $config->block->case->dtable->fieldList['id'] = array('name' => 'id', 'title' => $lang->idAB, 'type' => 'id', 'fixed' => false, 'sort' => 'number');
  9. $config->block->case->dtable->fieldList['title'] = array('name' => 'title', 'title' => $lang->testcase->title, 'type' => 'title', 'sort' => true, 'link' => array('module' => 'testcase', 'method' => 'view', 'params' => "caseID={id}"), 'fixed' => false, 'width' => '50%');
  10. $config->block->case->dtable->fieldList['pri'] = $config->testcase->dtable->fieldList['pri'];
  11. $config->block->case->dtable->fieldList['type'] = $config->testcase->dtable->fieldList['type'];
  12. $config->block->case->dtable->fieldList['status'] = $config->testcase->dtable->fieldList['status'];
  13. $config->block->case->dtable->fieldList['lastRunDate'] = $config->testcase->dtable->fieldList['lastRunDate'];
  14. $config->block->case->dtable->fieldList['lastRunResult'] = $config->testcase->dtable->fieldList['lastRunResult'];
  15. $config->block->case->dtable->fieldList['pri']['name'] = 'pri';
  16. $config->block->case->dtable->fieldList['pri']['title'] = $lang->priAB;
  17. $config->block->case->dtable->fieldList['pri']['sort'] = true;
  18. $config->block->case->dtable->fieldList['type']['name'] = 'type';
  19. $config->block->case->dtable->fieldList['status']['name'] = 'status';
  20. $config->block->case->dtable->fieldList['status']['title'] = $lang->statusAB;
  21. $config->block->case->dtable->fieldList['status']['sort'] = true;
  22. $config->block->case->dtable->fieldList['lastRunDate']['name'] = 'lastRunDate';
  23. $config->block->case->dtable->fieldList['lastRunDate']['type'] = 'datetime';
  24. $config->block->case->dtable->fieldList['lastRunDate']['sort'] = true;
  25. $config->block->case->dtable->fieldList['lastRunResult']['name'] = 'lastRunResult';
  26. $config->block->case->dtable->fieldList['lastRunResult']['sort'] = true;
  27. unset($config->block->case->dtable->fieldList['pri']['group']);
  28. unset($config->block->case->dtable->fieldList['status']['group']);
  29. unset($config->block->case->dtable->fieldList['lastRunDate']['group']);
  30. unset($config->block->case->dtable->fieldList['lastRunResult']['group']);
  31. unset($config->block->case->dtable->fieldList['pri']['sortType']);
  32. unset($config->block->case->dtable->fieldList['type']['sortType']);
  33. unset($config->block->case->dtable->fieldList['status']['sortType']);
  34. unset($config->block->case->dtable->fieldList['lastRunDate']['sortType']);
  35. unset($config->block->case->dtable->fieldList['lastRunResult']['sortType']);
  36. $config->block->case->dtable->short = new stdclass();
  37. $config->block->case->dtable->short->fieldList['id'] = $config->block->case->dtable->fieldList['id'];
  38. $config->block->case->dtable->short->fieldList['title'] = $config->block->case->dtable->fieldList['title'];
  39. $config->block->case->dtable->short->fieldList['lastRunResult'] = $config->block->case->dtable->fieldList['lastRunResult'];