profile.tmpl 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  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 .LoggedUserName .Owner.Name}}
  8. <a class="profile-avatar 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="{{AppendAvatarSize .Owner.RelAvatarLink 287}}" title="{{.Owner.Name}}"/>
  10. </a>
  11. {{else}}
  12. <span class="profile-avatar image">
  13. <img src="{{AppendAvatarSize .Owner.RelAvatarLink 287}}" 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 and .Owner.Email .IsLogged}}
  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 nofollow" 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 .IsLogged (ne .LoggedUserName .Owner.Name)}}
  64. <li class="follow">
  65. {{if .LoggedUser.IsFollowing .Owner.ID}}
  66. <form action="{{.Link}}/action/unfollow?redirect_to={{$.Link}}" method="POST">
  67. {{.CSRFTokenHTML}}
  68. <button class="ui basic red button">
  69. <i class="octicon octicon-person"></i> {{.i18n.Tr "user.unfollow"}}
  70. </button>
  71. </form>
  72. {{else}}
  73. <form action="{{.Link}}/action/follow?redirect_to={{$.Link}}" method="POST">
  74. {{.CSRFTokenHTML}}
  75. <button class="ui basic green button">
  76. <i class="octicon octicon-person"></i> {{.i18n.Tr "user.follow"}}
  77. </button>
  78. </form>
  79. {{end}}
  80. </li>
  81. {{end}}
  82. </ul>
  83. </div>
  84. </div>
  85. </div>
  86. <div class="ui eleven wide column">
  87. <div class="ui secondary pointing menu">
  88. <a class="{{if ne .TabName "activity"}}active{{end}} item" href="{{.Owner.HomeLink}}">
  89. <i class="octicon octicon-repo"></i> {{.i18n.Tr "user.repositories"}}
  90. </a>
  91. <a class="item">
  92. <a class="{{if eq .TabName "activity"}}active{{end}} item" href="{{.Owner.HomeLink}}?tab=activity">
  93. <i class="octicon octicon-rss"></i> {{.i18n.Tr "user.activity"}}
  94. </a>
  95. </a>
  96. </div>
  97. {{if ne .TabName "activity"}}
  98. {{template "explore/repo_list" .}}
  99. {{template "explore/page" .}}
  100. {{else}}
  101. <br>
  102. <div class="feeds">
  103. {{template "user/dashboard/feeds" .}}
  104. </div>
  105. {{end}}
  106. </div>
  107. </div>
  108. </div>
  109. </div>
  110. {{template "base/footer" .}}