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.

105 lines
4.0 KiB

9 years ago
  1. {{template "base/head" .}}
  2. <div class="user profile">
  3. <div class="ui container">
  4. <div class="ui 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/avatar" id="profile-avatar" data-content="{{.i18n.Tr "user.change_avatar"}}" data-variation="inverted tiny" data-position="bottom center">
  9. <img src="{{.Owner.RelAvatarLink}}?s=290" title="{{.Owner.Name}}"/>
  10. </a>
  11. {{else}}
  12. <span class="image">
  13. <img src="{{.Owner.RelAvatarLink}}?s=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 or (and $.ShowUserEmail .Owner.Email .IsSigned) (and .Owner.Email .IsSigned (not .Owner.KeepEmailPrivate))}}
  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" href="{{.Owner.Website}}">{{.Owner.Website}}</a>
  35. </li>
  36. {{end}}
  37. <li><i class="octicon octicon-clock"></i> {{.i18n.Tr "user.join_on"}} {{DateFmtShort .Owner.Created}}</li>
  38. <li>
  39. <i class="octicon octicon-person"></i>
  40. <a href="{{.Owner.HomeLink}}/followers">
  41. {{.Owner.NumFollowers}} {{.i18n.Tr "user.followers"}}
  42. </a>
  43. -
  44. <a href="{{.Owner.HomeLink}}/following">
  45. {{.Owner.NumFollowing}} {{.i18n.Tr "user.following"}}
  46. </a>
  47. </li>
  48. {{/*
  49. <li>
  50. <i class="octicon octicon-star"></i>
  51. <a href="{{.Owner.HomeLink}}/stars">
  52. {{.Owner.NumStars}} {{.i18n.Tr "user.starred"}}
  53. </a>
  54. </li>
  55. */}}
  56. {{if .Orgs}}
  57. <li>
  58. {{range .Orgs}}
  59. <a href="{{.HomeLink}}"><img class="ui mini image poping up" src="{{.RelAvatarLink}}" data-content="{{.Name}}" data-position="top center" data-variation="tiny inverted"></a>
  60. {{end}}
  61. </li>
  62. {{end}}
  63. {{if and .IsSigned (ne .SignedUserName .Owner.Name)}}
  64. <li class="follow">
  65. {{if .SignedUser.IsFollowing .Owner.ID}}
  66. <a class="ui basic red button" href="{{.Link}}/action/unfollow?redirect_to={{$.Link}}"><i class="octicon octicon-person"></i> {{.i18n.Tr "user.unfollow"}}</a>
  67. {{else}}
  68. <a class="ui basic green button" href="{{.Link}}/action/follow?redirect_to={{$.Link}}"><i class="octicon octicon-person"></i> {{.i18n.Tr "user.follow"}}</a>
  69. {{end}}
  70. </li>
  71. {{end}}
  72. </ul>
  73. </div>
  74. </div>
  75. </div>
  76. <div class="ui eleven wide column">
  77. <div class="ui secondary pointing menu">
  78. <a class='{{if and (ne .TabName "activity") (ne .TabName "stars")}}active{{end}} item' href="{{.Owner.HomeLink}}">
  79. <i class="octicon octicon-repo"></i> {{.i18n.Tr "user.repositories"}}
  80. </a>
  81. <a class='{{if eq .TabName "activity"}}active{{end}} item' href="{{.Owner.HomeLink}}?tab=activity">
  82. <i class="octicon octicon-rss"></i> {{.i18n.Tr "user.activity"}}
  83. </a>
  84. <a class='{{if eq .TabName "stars"}}active{{end}} item' href="{{.Owner.HomeLink}}?tab=stars">
  85. <i class="octicon octicon-star"></i> {{.i18n.Tr "user.starred"}}
  86. </a>
  87. </div>
  88. {{if eq .TabName "activity"}}
  89. <div class="feeds">
  90. {{template "user/dashboard/feeds" .}}
  91. </div>
  92. {{else if eq .TabName "stars"}}
  93. <div class="stars">
  94. {{template "explore/repo_list" .}}
  95. </div>
  96. {{else}}
  97. {{template "explore/repo_list" .}}
  98. {{template "base/paginate" .}}
  99. {{end}}
  100. </div>
  101. </div>
  102. </div>
  103. </div>
  104. {{template "base/footer" .}}