downloadclient.html.php 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <?php
  2. /**
  3. * The download client view file of block 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 Yuting Wang <wangyuting@easycorp.ltd>
  7. * @package block
  8. * @link https://www.zentao.net
  9. */
  10. namespace zin;
  11. /**
  12. * 展示客户端下载页面。
  13. * Print client download page.
  14. */
  15. function printDownloadClient()
  16. {
  17. global $lang, $config;
  18. $downloads = array();
  19. foreach($lang->block->zentaoclient->edition as $edition => $editionName)
  20. {
  21. $downloads[] = cell
  22. (
  23. set('class', 'py-6 px-2 border'),
  24. a
  25. (
  26. set('class', 'flex leading-6'),
  27. set('data-toggle', 'modal'),
  28. set('href', helper::createLink('misc', 'downloadClient', "action=getPackage&os=$edition")),
  29. span
  30. (
  31. set('class', 'avatar rounded-full flex-none size-sm has-img mr-2'),
  32. img(set('src', $config->webRoot . "theme/default/images/guide/edition_{$edition}.png"), set('class', 'inline p-1.5'))
  33. ),
  34. span($editionName)
  35. )
  36. );
  37. }
  38. return div
  39. (
  40. set('class', 'download-client p-4'),
  41. div
  42. (
  43. div(span($lang->block->zentaoclient->common)),
  44. div(span(set('class', 'text-sm text-gray'), $lang->block->zentaoclient->desc)),
  45. div
  46. (
  47. set('class','flex py-4'),
  48. cell
  49. (
  50. set('width', '25%'),
  51. div
  52. (
  53. set('class', 'flex col'),
  54. $downloads
  55. )
  56. ),
  57. cell
  58. (
  59. set('class', 'ml-4'),
  60. set('width', '75%'),
  61. img(set('src', $config->webRoot . 'theme/default/images/guide/' . (common::checkNotCN() ? 'client_en.png' : 'client_cn.png')), set('class', 'h-56'))
  62. )
  63. )
  64. )
  65. );
  66. }