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.

134 lines
5.1 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">
  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">
  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. {{range .Orgs}}
  73. {{if (or .Visibility.IsPublic (and ($.SignedUser) (or .Visibility.IsLimited (and (.IsUserPartOfOrg $.SignedUserID) .Visibility.IsPrivate) ($.IsAdmin))))}}
  74. <a href="{{.HomeLink}}"><img class="ui mini image poping up" src="{{.RelAvatarLink}}" data-content="{{.Name}}" data-position="top center" data-variation="tiny inverted"></a>
  75. {{end}}
  76. {{end}}
  77. </li>
  78. {{end}}
  79. {{if and .IsSigned (ne .SignedUserName .Owner.Name)}}
  80. <li class="follow">
  81. {{if .SignedUser.IsFollowing .Owner.ID}}
  82. <a class="ui basic red button" href="{{.Link}}/action/unfollow?redirect_to={{$.Link}}"><i class="octicon octicon-person"></i> {{.i18n.Tr "user.unfollow"}}</a>
  83. {{else}}
  84. <a class="ui basic green button" href="{{.Link}}/action/follow?redirect_to={{$.Link}}"><i class="octicon octicon-person"></i> {{.i18n.Tr "user.follow"}}</a>
  85. {{end}}
  86. </li>
  87. {{end}}
  88. </ul>
  89. </div>
  90. </div>
  91. </div>
  92. <div class="ui eleven wide column">
  93. <div class="ui secondary stackable pointing menu">
  94. <a class='{{if and (ne .TabName "activity") (ne .TabName "stars")}}active{{end}} item' href="{{.Owner.HomeLink}}">
  95. <i class="octicon octicon-repo"></i> {{.i18n.Tr "user.repositories"}}
  96. </a>
  97. <a class='{{if eq .TabName "activity"}}active{{end}} item' href="{{.Owner.HomeLink}}?tab=activity">
  98. <i class="octicon octicon-rss"></i> {{.i18n.Tr "user.activity"}}
  99. </a>
  100. <a class='{{if eq .TabName "stars"}}active{{end}} item' href="{{.Owner.HomeLink}}?tab=stars">
  101. <i class="octicon octicon-star"></i> {{.i18n.Tr "user.starred"}}
  102. </a>
  103. </div>
  104. {{if eq .TabName "activity"}}
  105. {{if .EnableHeatmap}}
  106. <div id="user-heatmap" style="padding-right: 40px">
  107. <activity-heatmap :locale="locale" :suburl="suburl" :user="heatmapUser">
  108. <div slot="loading">
  109. <div class="ui active centered inline indeterminate text loader" id="loading-heatmap">{{.i18n.Tr "user.heatmap.loading"}}</div>
  110. </div>
  111. </activity-heatmap>
  112. </div>
  113. <div class="ui divider"></div>
  114. {{end}}
  115. <div class="feeds">
  116. {{template "user/dashboard/feeds" .}}
  117. </div>
  118. {{else if eq .TabName "stars"}}
  119. <div class="stars">
  120. {{template "explore/repo_search" .}}
  121. {{template "explore/repo_list" .}}
  122. {{template "base/paginate" .}}
  123. </div>
  124. {{else}}
  125. {{template "explore/repo_search" .}}
  126. {{template "explore/repo_list" .}}
  127. {{template "base/paginate" .}}
  128. {{end}}
  129. </div>
  130. </div>
  131. </div>
  132. </div>
  133. {{template "base/footer" .}}