|
5 | 5 | <div class="ui five wide column"> |
6 | 6 | <div class="ui card"> |
7 | 7 | <div id="profile-avatar" class="content gt-df"> |
8 | | - {{if eq .SignedUserName .Owner.Name}} |
| 8 | + {{if eq .SignedUserName .ContextUser.Name}} |
9 | 9 | <a class="image" href="{{AppSubUrl}}/user/settings" data-tooltip-content="{{.locale.Tr "user.change_avatar"}}"> |
10 | | - {{avatar $.Context .Owner 290}} |
| 10 | + {{avatar $.Context .ContextUser 290}} |
11 | 11 | </a> |
12 | 12 | {{else}} |
13 | 13 | <span class="image"> |
14 | | - {{avatar $.Context .Owner 290}} |
| 14 | + {{avatar $.Context .ContextUser 290}} |
15 | 15 | </span> |
16 | 16 | {{end}} |
17 | 17 | </div> |
18 | 18 | <div class="content gt-word-break profile-avatar-name"> |
19 | | - {{if .Owner.FullName}}<span class="header text center">{{.Owner.FullName}}</span>{{end}} |
20 | | - <span class="username text center">{{.Owner.Name}}</span> |
| 19 | + {{if .ContextUser.FullName}}<span class="header text center">{{.ContextUser.FullName}}</span>{{end}} |
| 20 | + <span class="username text center">{{.ContextUser.Name}}</span> |
21 | 21 | {{if .EnableFeed}} |
22 | | - <a href="{{.Owner.HomeLink}}.rss"><i class="ui text grey gt-ml-3" data-tooltip-content="{{.locale.Tr "rss_feed"}}">{{svg "octicon-rss" 18}}</i></a> |
| 22 | + <a href="{{.ContextUser.HomeLink}}.rss"><i class="ui text grey gt-ml-3" data-tooltip-content="{{.locale.Tr "rss_feed"}}">{{svg "octicon-rss" 18}}</i></a> |
23 | 23 | {{end}} |
24 | 24 | <div class="gt-mt-3"> |
25 | | - <a class="muted" href="{{.Owner.HomeLink}}?tab=followers">{{svg "octicon-person" 18 "gt-mr-2"}}{{.Owner.NumFollowers}} {{.locale.Tr "user.followers"}}</a> · <a class="muted" href="{{.Owner.HomeLink}}?tab=following">{{.Owner.NumFollowing}} {{.locale.Tr "user.following"}}</a> |
| 25 | + <a class="muted" href="{{.ContextUser.HomeLink}}?tab=followers">{{svg "octicon-person" 18 "gt-mr-2"}}{{.ContextUser.NumFollowers}} {{.locale.Tr "user.followers"}}</a> · <a class="muted" href="{{.ContextUser.HomeLink}}?tab=following">{{.ContextUser.NumFollowing}} {{.locale.Tr "user.following"}}</a> |
26 | 26 | </div> |
27 | 27 | </div> |
28 | 28 | <div class="extra content gt-word-break"> |
29 | 29 | <ul> |
30 | | - {{if .Owner.Location}} |
31 | | - <li>{{svg "octicon-location"}} {{.Owner.Location}}</li> |
| 30 | + {{if .ContextUser.Location}} |
| 31 | + <li>{{svg "octicon-location"}} {{.ContextUser.Location}}</li> |
32 | 32 | {{end}} |
33 | | - {{if (eq .SignedUserName .Owner.Name)}} |
| 33 | + {{if (eq .SignedUserName .ContextUser.Name)}} |
34 | 34 | <li> |
35 | 35 | {{svg "octicon-mail"}} |
36 | | - <a href="mailto:{{.Owner.Email}}" rel="nofollow">{{.Owner.Email}}</a> |
| 36 | + <a href="mailto:{{.ContextUser.Email}}" rel="nofollow">{{.ContextUser.Email}}</a> |
37 | 37 | <a href="{{AppSubUrl}}/user/settings#keep-email-private"> |
38 | 38 | {{if .ShowUserEmail}} |
39 | 39 | <i class="ui right" data-tooltip-content="{{.locale.Tr "user.email_visibility.limited"}}"> |
|
50 | 50 | {{if .ShowUserEmail}} |
51 | 51 | <li> |
52 | 52 | {{svg "octicon-mail"}} |
53 | | - <a href="mailto:{{.Owner.Email}}" rel="nofollow">{{.Owner.Email}}</a> |
| 53 | + <a href="mailto:{{.ContextUser.Email}}" rel="nofollow">{{.ContextUser.Email}}</a> |
54 | 54 | </li> |
55 | 55 | {{end}} |
56 | 56 | {{end}} |
57 | | - {{if .Owner.Website}} |
| 57 | + {{if .ContextUser.Website}} |
58 | 58 | <li> |
59 | 59 | {{svg "octicon-link"}} |
60 | | - <a target="_blank" rel="noopener noreferrer me" href="{{.Owner.Website}}">{{.Owner.Website}}</a> |
| 60 | + <a target="_blank" rel="noopener noreferrer me" href="{{.ContextUser.Website}}">{{.ContextUser.Website}}</a> |
61 | 61 | </li> |
62 | 62 | {{end}} |
63 | 63 | {{if $.RenderedDescription}} |
|
73 | 73 | </li> |
74 | 74 | {{end}} |
75 | 75 | {{end}} |
76 | | - <li>{{svg "octicon-clock"}} {{.locale.Tr "user.join_on"}} {{template "shared/datetime/short" (dict "Datetime" .Owner.CreatedUnix.FormatLong "Fallback" .Owner.CreatedUnix.FormatShort)}}</li> |
| 76 | + <li>{{svg "octicon-clock"}} {{.locale.Tr "user.join_on"}} {{template "shared/datetime/short" (dict "Datetime" .ContextUser.CreatedUnix.FormatLong "Fallback" .ContextUser.CreatedUnix.FormatShort)}}</li> |
77 | 77 | {{if and .Orgs .HasOrgsVisible}} |
78 | 78 | <li> |
79 | 79 | <ul class="user-orgs"> |
|
100 | 100 | </ul> |
101 | 101 | </li> |
102 | 102 | {{end}} |
103 | | - {{if and .IsSigned (ne .SignedUserName .Owner.Name)}} |
| 103 | + {{if and .IsSigned (ne .SignedUserName .ContextUser.Name)}} |
104 | 104 | <li class="follow"> |
105 | 105 | {{if $.IsFollowing}} |
106 | 106 | <form method="post" action="{{.Link}}?action=unfollow&redirect_to={{$.Link}}"> |
|
121 | 121 | </div> |
122 | 122 | <div class="ui eleven wide column"> |
123 | 123 | <div class="ui secondary stackable pointing tight menu"> |
124 | | - <a class='{{if and (ne .TabName "activity") (ne .TabName "following") (ne .TabName "followers") (ne .TabName "stars") (ne .TabName "watching") (ne .TabName "projects") (ne .TabName "code")}}active {{end}}item' href="{{.Owner.HomeLink}}"> |
| 124 | + <a class='{{if and (ne .TabName "activity") (ne .TabName "following") (ne .TabName "followers") (ne .TabName "stars") (ne .TabName "watching") (ne .TabName "projects") (ne .TabName "code")}}active {{end}}item' href="{{.ContextUser.HomeLink}}"> |
125 | 125 | {{svg "octicon-repo"}} {{.locale.Tr "user.repositories"}} |
126 | | - {{if .Owner.NumRepos}} |
127 | | - <div class="ui small label">{{.Owner.NumRepos}}</div> |
| 126 | + {{if .ContextUser.NumRepos}} |
| 127 | + <div class="ui small label">{{.ContextUser.NumRepos}}</div> |
128 | 128 | {{end}} |
129 | 129 | </a> |
130 | | - <a href="{{.Owner.HomeLink}}/-/projects" class="{{if eq .TabName "projects"}}active {{end}}item"> |
| 130 | + <a href="{{.ContextUser.HomeLink}}/-/projects" class="{{if eq .TabName "projects"}}active {{end}}item"> |
131 | 131 | {{svg "octicon-project-symlink"}} {{.locale.Tr "user.projects"}} |
132 | 132 | </a> |
133 | 133 | {{if .IsPackageEnabled}} |
134 | | - <a class='{{if eq .TabName "packages"}}active {{end}}item' href="{{.Owner.HomeLink}}/-/packages"> |
| 134 | + <a class='{{if eq .TabName "packages"}}active {{end}}item' href="{{.ContextUser.HomeLink}}/-/packages"> |
135 | 135 | {{svg "octicon-package"}} {{.locale.Tr "packages.title"}} |
136 | 136 | </a> |
137 | 137 | {{end}} |
138 | 138 | {{if .IsRepoIndexerEnabled}} |
139 | | - <a class='{{if eq .TabName "code"}}active {{end}}item' href="{{.Owner.HomeLink}}/-/code"> |
| 139 | + <a class='{{if eq .TabName "code"}}active {{end}}item' href="{{.ContextUser.HomeLink}}/-/code"> |
140 | 140 | {{svg "octicon-code"}} {{.locale.Tr "user.code"}} |
141 | 141 | </a> |
142 | 142 | {{end}} |
143 | | - <a class='{{if eq .TabName "activity"}}active {{end}}item' href="{{.Owner.HomeLink}}?tab=activity"> |
| 143 | + <a class='{{if eq .TabName "activity"}}active {{end}}item' href="{{.ContextUser.HomeLink}}?tab=activity"> |
144 | 144 | {{svg "octicon-rss"}} {{.locale.Tr "user.activity"}} |
145 | 145 | </a> |
146 | 146 | {{if not .DisableStars}} |
147 | | - <a class='{{if eq .TabName "stars"}}active {{end}}item' href="{{.Owner.HomeLink}}?tab=stars"> |
| 147 | + <a class='{{if eq .TabName "stars"}}active {{end}}item' href="{{.ContextUser.HomeLink}}?tab=stars"> |
148 | 148 | {{svg "octicon-star"}} {{.locale.Tr "user.starred"}} |
149 | | - {{if .Owner.NumStars}} |
150 | | - <div class="ui small label">{{.Owner.NumStars}}</div> |
| 149 | + {{if .ContextUser.NumStars}} |
| 150 | + <div class="ui small label">{{.ContextUser.NumStars}}</div> |
151 | 151 | {{end}} |
152 | 152 | </a> |
153 | 153 | {{else}} |
154 | | - <a class='{{if eq .TabName "watching"}}active {{end}}item' href="{{.Owner.HomeLink}}?tab=watching"> |
| 154 | + <a class='{{if eq .TabName "watching"}}active {{end}}item' href="{{.ContextUser.HomeLink}}?tab=watching"> |
155 | 155 | {{svg "octicon-eye"}} {{.locale.Tr "user.watched"}} |
156 | 156 | </a> |
157 | 157 | {{end}} |
158 | 158 | </div> |
159 | 159 |
|
160 | 160 | {{if eq .TabName "activity"}} |
161 | | - {{if .Owner.KeepActivityPrivate}} |
| 161 | + {{if .ContextUser.KeepActivityPrivate}} |
162 | 162 | <div class="ui info message"> |
163 | 163 | <p>{{.locale.Tr "user.disabled_public_activity"}}</p> |
164 | 164 | </div> |
|
0 commit comments