profile.tmpl 5.4 KB

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