createguide.html.php 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <?php
  2. /**
  3. * The create guide view file of project module of ZenTaoPMS.
  4. * @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.zentao.net)
  5. * @license ZPL(https://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
  6. * @author Yanyi Cao<caoyanyi@easycorp.ltd>
  7. * @package project
  8. * @link https://www.zentao.net
  9. */
  10. namespace zin;
  11. div
  12. (
  13. setClass('modal-header justify-center font-bold p-0 pb-2'),
  14. h3($lang->project->chooseProgramType)
  15. );
  16. $hasWaterfall = helper::hasFeature('waterfall');
  17. $hasWaterfallPlus = helper::hasFeature('waterfallplus');
  18. $createLink = createLink("project", "create", "model=%s&programID=$programID&copyProjectID=0&extra=productID=$productID,branchID=$branchID");
  19. $itemList = array();
  20. foreach($lang->project->modelList as $model => $modelName)
  21. {
  22. if(empty($model)) continue;
  23. if(!$hasWaterfall && $model == 'waterfall') continue;
  24. if(!$hasWaterfallPlus && $model == 'waterfallplus') continue;
  25. $titleKey = "{$model}Title";
  26. $itemList[] = center
  27. (
  28. setClass('model-block p-2 ' . $model),
  29. div
  30. (
  31. setClass('model-item col items-center cursor-pointer'),
  32. set('data-url', sprintf($createLink, $model)),
  33. set('data-model', $model),
  34. img
  35. (
  36. setClass('border w-52'),
  37. set::src("theme/default/images/main/{$model}.png")
  38. ),
  39. h4
  40. (
  41. setClass('mt-2 font-bold'),
  42. $lang->project->{$model}
  43. ),
  44. p($lang->project->$titleKey)
  45. )
  46. );
  47. }
  48. div
  49. (
  50. setID('modelList'),
  51. setClass('flex items-center flex-wrap'),
  52. $itemList,
  53. div
  54. (
  55. setClass('model-block more-model p-2'),
  56. $config->edition == 'ipd' ? setClass('hidden') : null,
  57. div
  58. (
  59. setClass('border text-gray text-center'),
  60. $lang->project->moreModelTitle
  61. )
  62. ),
  63. on::click('.model-item')->call('window.openCreateProjectLink', jsRaw('$this'), $config->vision == 'or' ? 'charter' : 'project', isInModal())
  64. );