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.

138 lines
5.2 KiB

9 years ago
  1. {{template "base/head" .}}
  2. <div class="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 poping up" href="{{AppSubUrl}}/user/settings" id="profile-avatar" data-content="{{.i18n.Tr "user.change_avatar"}}" data-variation="inverted tiny" data-position="bottom center">
  9. <img src="{{.Owner.SizedRelAvatarLink 290}}" title="{{.Owner.Name}}"/>
  10. </a>
  11. {{else}}
  12. <span class="image">
  13. <img src="{{.Owner.SizedRelAvatarLink 290}}" title="{{.Owner.Name}}"/>
  14. </span>
  15. {{end}}
  16. <div class="content wrap">
  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 wrap">
  21. <ul class="text black">
  22. {{if .Owner.Location}}
  23. <li><i class="octicon octicon-location"></i> {{.Owner.Location}}</li>
  24. {{end}}
  25. {{if .ShowUserEmail }}
  26. <li>
  27. <i class="octicon octicon-mail"></i>
  28. <a href="mailto:{{.Owner.Email}}" rel="nofollow">{{.Owner.Email}}</a>
  29. </li>
  30. {{end}}
  31. {{if .Owner.Website}}
  32. <li>
  33. <i class="octicon octicon-link"></i>
  34. <a target="_blank" rel="noopener noreferrer me" href="{{.Owner.Website}}">{{.Owner.Website}}</a>
  35. </li>
  36. {{end}}
  37. {{if .Owner.Description}}
  38. <li>
  39. <i class="octicon octicon-info"></i>
  40. <span>{{.Owner.Description}}</span>
  41. </li>
  42. {{end}}
  43. {{range .OpenIDs}}
  44. {{if .Show}}
  45. <li>
  46. <i class="fa fa-openid"></i>
  47. <a target="_blank" rel="noopener noreferrer" href="{{.URI}}">{{.URI}}</a>
  48. </li>
  49. {{end}}
  50. {{end}}
  51. <li><i class="octicon octicon-clock"></i> {{.i18n.Tr "user.join_on"}} {{.Owner.CreatedUnix.FormatShort}}</li>
  52. <li>
  53. <i class="octicon octicon-person"></i>
  54. <a href="{{.Owner.HomeLink}}/followers">
  55. {{.Owner.NumFollowers}} {{.i18n.Tr "user.followers"}}
  56. </a>
  57. -
  58. <a href="{{.Owner.HomeLink}}/following">
  59. {{.Owner.NumFollowing}} {{.i18n.Tr "user.following"}}
  60. </a>
  61. </li>
  62. {{/*
  63. <li>
  64. <i class="octicon octicon-star"></i>
  65. <a href="{{.Owner.HomeLink}}/stars">
  66. {{.Owner.NumStars}} {{.i18n.Tr "user.starred"}}
  67. </a>
  68. </li>
  69. */}}
  70. {{if and .Orgs .HasOrgsVisible}}
  71. <li>
  72. <ul class="user-orgs">
  73. {{range .Orgs}}
  74. {{if (or .Visibility.IsPublic (and ($.SignedUser) (or .Visibility.IsLimited (and (.IsUserPartOfOrg $.SignedUserID) .Visibility.IsPrivate) ($.IsAdmin))))}}
  75. <li>
  76. <a href="{{.HomeLink}}"><img class="ui image poping up" src="{{.RelAvatarLink}}" data-content="{{.Name}}" data-position="top center" data-variation="tiny inverted"></a>
  77. </li>
  78. {{end}}
  79. {{end}}
  80. </ul>
  81. </li>
  82. {{end}}
  83. {{if and .IsSigned (ne .SignedUserName .Owner.Name)}}
  84. <li class="follow">
  85. {{if .SignedUser.IsFollowing .Owner.ID}}
  86. <a class="ui basic red button" href="{{.Link}}/action/unfollow?redirect_to={{$.Link}}"><i class="octicon octicon-person"></i> {{.i18n.Tr "user.unfollow"}}</a>
  87. {{else}}
  88. <a class="ui basic green button" href="{{.Link}}/action/follow?redirect_to={{$.Link}}"><i class="octicon octicon-person"></i> {{.i18n.Tr "user.follow"}}</a>
  89. {{end}}
  90. </li>
  91. {{end}}
  92. </ul>
  93. </div>
  94. </div>
  95. </div>
  96. <div class="ui eleven wide column">
  97. <div class="ui secondary stackable pointing menu">
  98. <a class='{{if and (ne .TabName "activity") (ne .TabName "stars")}}active{{end}} item' href="{{.Owner.HomeLink}}">
  99. <i class="octicon octicon-repo"></i> {{.i18n.Tr "user.repositories"}}
  100. </a>
  101. <a class='{{if eq .TabName "activity"}}active{{end}} item' href="{{.Owner.HomeLink}}?tab=activity">
  102. <i class="octicon octicon-rss"></i> {{.i18n.Tr "user.activity"}}
  103. </a>
  104. <a class='{{if eq .TabName "stars"}}active{{end}} item' href="{{.Owner.HomeLink}}?tab=stars">
  105. <i class="octicon octicon-star"></i> {{.i18n.Tr "user.starred"}}
  106. </a>
  107. </div>
  108. {{if eq .TabName "activity"}}
  109. {{if .EnableHeatmap}}
  110. <div id="user-heatmap" style="padding-right: 40px">
  111. <activity-heatmap :locale="locale" :suburl="suburl" :user="heatmapUser">
  112. <div slot="loading">
  113. <div class="ui active centered inline indeterminate text loader" id="loading-heatmap">{{.i18n.Tr "user.heatmap.loading"}}</div>
  114. </div>
  115. </activity-heatmap>
  116. </div>
  117. <div class="ui divider"></div>
  118. {{end}}
  119. <div class="feeds">
  120. {{template "user/dashboard/feeds" .}}
  121. </div>
  122. {{else if eq .TabName "stars"}}
  123. <div class="stars">
  124. {{template "explore/repo_search" .}}
  125. {{template "explore/repo_list" .}}
  126. {{template "base/paginate" .}}
  127. </div>
  128. {{else}}
  129. {{template "explore/repo_search" .}}
  130. {{template "explore/repo_list" .}}
  131. {{template "base/paginate" .}}
  132. {{end}}
  133. </div>
  134. </div>
  135. </div>
  136. </div>
  137. {{template "base/footer" .}}