profile.tmpl 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. {{template "ng/base/head" .}}
  2. {{template "ng/base/header" .}}
  3. <div class="main-wrapper">
  4. <div id="user-profile-page" class="container clear">
  5. <div class="grid-1-5 left">
  6. <div>
  7. {{if and (.Owner.UseCustomAvatar) (eq .SignedUserName .Owner.Name)}}
  8. <a href="{{AppSubUrl}}/user/settings" id="profile-avatar" original-title="{{.i18n.Tr "user.change_custom_avatar"}}">
  9. {{else if eq .SignedUserName .Owner.Name}}
  10. <a href="http://gravatar.com/emails/" id="profile-avatar" original-title="{{.i18n.Tr "user.change_avatar"}}">
  11. {{else}}
  12. <a id="profile-avatar">
  13. {{end}}
  14. <img class="profile-avatar" src="{{.Owner.AvatarLink}}?s=234" title="{{.Owner.Name}}"/>
  15. </a>
  16. <div class="text-center" id="profile-name">
  17. {{if .Owner.FullName}}<span id="profile-fullname" class="center-block">{{.Owner.FullName}}</span><br>{{end}}
  18. <span class="center-block" id="profile-username">{{.Owner.Name}}</span>
  19. </div>
  20. </div>
  21. <div class="profile-info">
  22. <hr>
  23. <ul class="list-no-style">
  24. {{if .Owner.Location}}
  25. <li class="list-group-item"><i class="octicon octicon-location"></i>&nbsp;&nbsp;{{.Owner.Location}}</li>
  26. {{end}}
  27. {{if and .Owner.Email .IsSigned}}
  28. <li class="list-group-item"><i class="octicon octicon-mail"></i>&nbsp;&nbsp;<a href="mailto:{{.Owner.Email}}" rel="nofollow">{{.Owner.Email}}</a></li>
  29. {{end}}
  30. {{if .Owner.Website}}
  31. <li class="list-group-item"><i class="octicon octicon-link"></i>&nbsp;&nbsp;<a target="_blank" href="{{.Owner.Website}}">{{.Owner.Website}}</a></li>
  32. {{end}}
  33. <li class="list-group-item"><i class="octicon octicon-clock"></i>&nbsp;&nbsp;{{.i18n.Tr "user.join_on"}} {{DateFmtShort .Owner.Created}}</li>
  34. </ul>
  35. <hr>
  36. <ul class="list-no-style">
  37. <li class="list-group-item profile-rel">
  38. <a class="text-black" href="">
  39. <strong>{{.Owner.NumFollowers}}</strong>
  40. <p>{{.i18n.Tr "user.followers"}}</p>
  41. </a>
  42. </li>
  43. <li class="list-group-item profile-rel">
  44. <a class="text-black" href="">
  45. <strong>{{.Owner.NumStars}}</strong>
  46. <p>{{.i18n.Tr "user.starred"}}</p>
  47. </a>
  48. </li>
  49. <li class="list-group-item profile-rel">
  50. <a class="text-black" href="">
  51. <strong>{{.Owner.NumFollowings}}</strong>
  52. <p>{{.i18n.Tr "user.following"}}</p>
  53. </a>
  54. </li>
  55. </ul>
  56. <hr>
  57. </div>
  58. </div>
  59. <div class="grid-4-5 left">
  60. <div id="profile-body">
  61. <ul class="menu menu-line" id="profile-header">
  62. <li>
  63. <a {{if not .TabName}}class="current"{{end}} href="{{.Owner.HomeLink}}"><i class="octicon octicon-repo"></i> {{.i18n.Tr "user.repositories"}}</a>
  64. </li>
  65. <li>
  66. <a {{if eq .TabName "activity"}}class="current"{{end}} href="{{.Owner.HomeLink}}?tab=activity"><i class="octicon octicon-repo"></i> {{.i18n.Tr "user.activity"}}</a>
  67. </li>
  68. </ul>
  69. <div class="tab-content">
  70. {{if eq .TabName "activity"}}
  71. <div class="tab-pane active" id="dashboard-news">
  72. <br>
  73. {{template "user/dashboard/feeds" .}}
  74. </div>
  75. {{else}}
  76. <div class="tab-pane active">
  77. <div id="org-repo-list">
  78. {{range .Repos}}
  79. {{if or (not .IsPrivate) (.HasAccess $.SignedUser)}}
  80. <div class="org-repo-item">
  81. <ul class="org-repo-status right">
  82. <li><i class="octicon octicon-star"></i> {{.NumStars}}</li>
  83. <li><i class="octicon octicon-git-branch"></i> {{.NumForks}}</li>
  84. </ul>
  85. <h2>
  86. <a href="{{AppSubUrl}}/{{$.Owner.Name}}/{{.Name}}">{{.Name}}</a>
  87. {{if .IsPrivate}}
  88. <span class="text-gold"><i class="octicon octicon-lock"></i></span>
  89. {{end}}
  90. </h2>
  91. <p class="org-repo-description">{{.Description}}</p>
  92. <p class="org-repo-updated">{{$.i18n.Tr "org.repo_updated"}} {{TimeSince .Updated $.i18n.Lang}}</p>
  93. </div>
  94. {{end}}
  95. {{end}}
  96. </div>
  97. </div>
  98. {{end}}
  99. </div>
  100. </div>
  101. </div>
  102. </div>
  103. </div>
  104. {{template "ng/base/footer" .}}