You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. {{template "base/head" .}}
  2. <div class="page-content user profile">
  3. <div class="ui container">
  4. <div class="ui stackable grid">
  5. <div class="ui five wide column">
  6. <div class="ui card">
  7. {{if eq .SignedUserName .Owner.Name}}
  8. <a class="image tooltip" href="{{AppSubUrl}}/user/settings" id="profile-avatar" data-content="{{.i18n.Tr "user.change_avatar"}}" data-position="bottom center">
  9. {{avatar .Owner 290}}
  10. </a>
  11. {{else}}
  12. <span class="image" id="profile-avatar">
  13. {{avatar .Owner 290}}
  14. </span>
  15. {{end}}
  16. <div class="content word-break profile-avatar-name">
  17. {{if .Owner.FullName}}<span class="header text center">{{.Owner.FullName}}</span>{{end}}
  18. <span class="username text center">{{.Owner.Name}}</span>
  19. </div>
  20. <div class="extra content word-break">
  21. <ul>
  22. {{if .Owner.Location}}
  23. <li>{{svg "octicon-location"}} {{.Owner.Location}}</li>
  24. {{end}}
  25. {{if .ShowUserEmail }}
  26. <li>
  27. {{svg "octicon-mail"}}
  28. <a href="mailto:{{.Owner.Email}}" rel="nofollow">{{.Owner.Email}}</a>
  29. </li>
  30. {{end}}
  31. {{if .Owner.Website}}
  32. <li>
  33. {{svg "octicon-link"}}
  34. <a target="_blank" rel="noopener noreferrer me" href="{{.Owner.Website}}">{{.Owner.Website}}</a>
  35. </li>
  36. {{end}}
  37. {{if $.RenderedDescription}}
  38. <li>
  39. <div class="render-content markup">{{$.RenderedDescription|Str2html}}</div>
  40. </li>
  41. {{end}}
  42. {{range .OpenIDs}}
  43. {{if .Show}}
  44. <li>
  45. {{svg "fontawesome-openid"}}
  46. <a target="_blank" rel="noopener noreferrer" href="{{.URI}}">{{.URI}}</a>
  47. </li>
  48. {{end}}
  49. {{end}}
  50. <li>{{svg "octicon-clock"}} {{.i18n.Tr "user.join_on"}} {{.Owner.CreatedUnix.FormatShort}}</li>
  51. {{if and .Orgs .HasOrgsVisible}}
  52. <li>
  53. <ul class="user-orgs">
  54. {{range .Orgs}}
  55. {{if (or .Visibility.IsPublic (and ($.SignedUser) (or .Visibility.IsLimited (and (.HasMemberWithUserID $.SignedUserID) .Visibility.IsPrivate) ($.IsAdmin))))}}
  56. <li>
  57. <a class="tooltip" href="{{.HomeLink}}" data-content="{{.Name}}" data-position="top center">
  58. {{avatar .}}
  59. </a>
  60. </li>
  61. {{end}}
  62. {{end}}
  63. </ul>
  64. </li>
  65. {{end}}
  66. {{if and .IsSigned (ne .SignedUserName .Owner.Name)}}
  67. <li class="follow">
  68. {{if $.IsFollowing}}
  69. <form method="post" action="{{.Link}}?action=unfollow&redirect_to={{$.Link}}">
  70. {{$.CsrfTokenHtml}}
  71. <button type="submit" class="ui basic red button">{{svg "octicon-person"}} {{.i18n.Tr "user.unfollow"}}</button>
  72. </form>
  73. {{else}}
  74. <form method="post" action="{{.Link}}?action=follow&redirect_to={{$.Link}}">
  75. {{$.CsrfTokenHtml}}
  76. <button type="submit" class="ui basic green button">{{svg "octicon-person"}} {{.i18n.Tr "user.follow"}}</button>
  77. </form>
  78. {{end}}
  79. </li>
  80. {{end}}
  81. </ul>
  82. </div>
  83. </div>
  84. </div>
  85. <div class="ui eleven wide column">
  86. <div class="ui secondary stackable pointing tight menu">
  87. <a class='{{if and (ne .TabName "activity") (ne .TabName "following") (ne .TabName "followers") (ne .TabName "stars") (ne .TabName "watching") (ne .TabName "projects")}}active{{end}} item' href="{{.Owner.HomeLink}}">
  88. {{svg "octicon-repo"}} {{.i18n.Tr "user.repositories"}}
  89. </a>
  90. <a class='{{if eq .TabName "activity"}}active{{end}} item' href="{{.Owner.HomeLink}}?tab=activity">
  91. {{svg "octicon-rss"}} {{.i18n.Tr "user.activity"}}
  92. </a>
  93. {{if not .DisableStars}}
  94. <a class='{{if eq .TabName "stars"}}active{{end}} item' href="{{.Owner.HomeLink}}?tab=stars">
  95. {{svg "octicon-star"}} {{.i18n.Tr "user.starred"}}
  96. {{if .Owner.NumStars}}
  97. <div class="ui primary label">{{.Owner.NumStars}}</div>
  98. {{end}}
  99. </a>
  100. {{else}}
  101. <a class='{{if eq .TabName "watching"}}active{{end}} item' href="{{.Owner.HomeLink}}?tab=watching">
  102. {{svg "octicon-eye"}} {{.i18n.Tr "user.watched"}}
  103. </a>
  104. {{end}}
  105. <a class='{{if eq .TabName "following"}}active{{end}} item' href="{{.Owner.HomeLink}}?tab=following">
  106. {{svg "octicon-person"}} {{.i18n.Tr "user.following"}}
  107. {{if .Owner.NumFollowing}}
  108. <div class="ui primary label">{{.Owner.NumFollowing}}</div>
  109. {{end}}
  110. </a>
  111. <a class='{{if eq .TabName "followers"}}active{{end}} item' href="{{.Owner.HomeLink}}?tab=followers">
  112. {{svg "octicon-person"}} {{.i18n.Tr "user.followers"}}
  113. {{if .Owner.NumFollowers}}
  114. <div class="ui primary label">{{.Owner.NumFollowers}}</div>
  115. {{end}}
  116. </a>
  117. </div>
  118. {{if eq .TabName "activity"}}
  119. {{if .Owner.KeepActivityPrivate}}
  120. <div class="ui info message">
  121. <p>{{.i18n.Tr "user.disabled_public_activity"}}</p>
  122. </div>
  123. {{end}}
  124. {{template "user/heatmap" .}}
  125. <div class="feeds">
  126. {{template "user/dashboard/feeds" .}}
  127. </div>
  128. {{else if eq .TabName "stars"}}
  129. <div class="stars">
  130. {{template "explore/repo_search" .}}
  131. {{template "explore/repo_list" .}}
  132. {{template "base/paginate" .}}
  133. </div>
  134. {{else if eq .TabName "following"}}
  135. {{template "repo/user_cards" .}}
  136. {{else if eq .TabName "followers"}}
  137. {{template "repo/user_cards" .}}
  138. {{else}}
  139. {{template "explore/repo_search" .}}
  140. {{template "explore/repo_list" .}}
  141. {{template "base/paginate" .}}
  142. {{end}}
  143. </div>
  144. </div>
  145. </div>
  146. </div>
  147. {{template "base/footer" .}}