profile.html.php 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. <?php
  2. /**
  3. * The profile view file of user 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 Wang Yidong <yidong@easycorp.ltd>
  7. * @package user
  8. * @link https://www.zentao.net
  9. */
  10. namespace zin;
  11. if(!isInModal()) include 'featurebar.html.php';
  12. $groupName = '';
  13. foreach($groups as $group) $groupName .= $group->name . ' ';
  14. $deptName = '/';
  15. if($deptPath)
  16. {
  17. $deptName = array();
  18. foreach($deptPath as $key => $dept) $deptName[] = $dept->name;
  19. $deptName = implode($lang->arrow, $deptName);
  20. };
  21. div
  22. (
  23. set::style(array('width' => isInModal() ? '100%' : '60%')),
  24. setClass('bg-white m-auto p-5 mb-4'),
  25. div
  26. (
  27. setClass('flex items-center pb-5 col'),
  28. cell
  29. (
  30. set::width('50%'),
  31. userAvatar(set::user($user), set::size('lg'))
  32. ),
  33. cell
  34. (
  35. setClass('row'),
  36. set::width('50%'),
  37. span
  38. (
  39. setClass('user-name font-bold center'),
  40. $user->realname
  41. ),
  42. zget($lang->user->roleList, $user->role, '') == '' ? null : span
  43. (
  44. setClass('user-role text-gray center ml-1'),
  45. '(' . zget($lang->user->roleList, $user->role) . ')'
  46. )
  47. )
  48. ),
  49. h::table
  50. (
  51. h::tr
  52. (
  53. h::th($lang->user->realname),
  54. h::td($user->realname),
  55. h::th($lang->user->gender),
  56. h::td(zget($lang->user->genderList, $user->gender))
  57. ),
  58. h::tr
  59. (
  60. h::th($lang->user->account),
  61. h::td($user->account),
  62. h::th($lang->user->email),
  63. h::td(set::title($user->email), $user->email ? a(set::href("javascript:;"), set::onclick("javascript:window.location.href='mailto:{$user->email}'"), $user->email) : null)
  64. ),
  65. h::tr
  66. (
  67. h::th($lang->user->dept),
  68. h::td(html($deptName)),
  69. h::th($lang->user->role),
  70. h::td(zget($lang->user->roleList, $user->role, ''))
  71. ),
  72. h::tr
  73. (
  74. h::th($lang->user->abbr->join),
  75. h::td(formatTime($user->join)),
  76. h::th($lang->user->priv),
  77. h::td(trim($groupName))
  78. )
  79. ),
  80. h::hr(),
  81. h::table
  82. (
  83. h::tr
  84. (
  85. h::th($lang->user->mobile),
  86. h::td($user->mobile),
  87. h::th($lang->user->weixin),
  88. h::td($user->weixin)
  89. ),
  90. h::tr
  91. (
  92. h::th($lang->user->phone),
  93. h::td($user->phone),
  94. h::th($lang->user->qq),
  95. h::td($user->qq)
  96. ),
  97. h::tr
  98. (
  99. h::th($lang->user->zipcode),
  100. h::td($user->zipcode),
  101. h::th($lang->user->abbr->address),
  102. h::td(set::title($user->address), $user->address)
  103. )
  104. ),
  105. isInModal() ? null : h::hr(),
  106. isInModal() ? null : h::table
  107. (
  108. h::tr
  109. (
  110. h::th($lang->user->commiter),
  111. h::td($user->commiter),
  112. h::th($lang->user->skype),
  113. h::td($user->skype ? a(set::href("callto://{$user->skype}"), $user->skype) : null)
  114. ),
  115. h::tr
  116. (
  117. h::th($lang->user->visits),
  118. h::td($user->visits),
  119. h::th($lang->user->whatsapp),
  120. h::td($user->whatsapp)
  121. ),
  122. h::tr
  123. (
  124. h::th($lang->user->last),
  125. h::td($user->last),
  126. h::th($lang->user->slack),
  127. h::td($user->slack)
  128. ),
  129. h::tr
  130. (
  131. h::th($lang->user->ip),
  132. h::td($user->ip),
  133. h::th($lang->user->dingding),
  134. h::td($user->dingding)
  135. )
  136. )
  137. );
  138. render();