99 lines
3.3 KiB
Go HTML Template
99 lines
3.3 KiB
Go HTML Template
{{template "base/head" .}}
|
|
<div role="main" aria-label="{{.Title}}" class="page-content user profile">
|
|
<div class="ui container">
|
|
{{template "base/alert" .}}
|
|
<div class="ui stackable grid">
|
|
<div class="ui four wide column">
|
|
{{template "shared/user/profile_big_avatar" .}}
|
|
</div>
|
|
<div class="ui twelve wide column tw-mb-4">
|
|
{{template "user/overview/header" .}}
|
|
{{if eq .TabName "activity"}}
|
|
{{if eq .SignedUserID .ContextUser.ID}}
|
|
<p id="visibility-hint">
|
|
{{if .ContextUser.KeepActivityPrivate}}
|
|
{{ctx.Locale.Tr "user.public_activity.visibility_hint.self_private" "/user/settings#keep-activity-private"}}
|
|
{{else}}
|
|
{{ctx.Locale.Tr "user.public_activity.visibility_hint.self_public" "/user/settings#keep-activity-private"}}
|
|
{{end}}
|
|
</p>
|
|
{{else}}
|
|
{{if .IsAdmin}}
|
|
<div id="visibility-hint" class="ui info message">
|
|
{{if .ContextUser.KeepActivityPrivate}}
|
|
{{ctx.Locale.Tr "user.public_activity.visibility_hint.admin_private"}}
|
|
{{else}}
|
|
{{ctx.Locale.Tr "user.public_activity.visibility_hint.admin_public"}}
|
|
{{end}}
|
|
</div>
|
|
{{else}}
|
|
{{if .ContextUser.KeepActivityPrivate}}
|
|
<p id="visibility-hint">{{ctx.Locale.Tr "user.disabled_public_activity"}}</p>
|
|
{{end}}
|
|
{{end}}
|
|
{{end}}
|
|
{{if or .IsAdmin (eq .SignedUserID .ContextUser.ID) (not .ContextUser.KeepActivityPrivate)}}
|
|
{{template "user/heatmap" .}}
|
|
{{template "user/dashboard/feeds" .}}
|
|
{{end}}
|
|
{{else if eq .TabName "stars"}}
|
|
<div class="stars">
|
|
{{template "shared/repo_search" .}}
|
|
{{template "explore/repo_list" .}}
|
|
{{template "base/paginate" .}}
|
|
</div>
|
|
{{else if eq .TabName "following"}}
|
|
{{template "repo/user_cards" .}}
|
|
{{else if eq .TabName "followers"}}
|
|
{{template "repo/user_cards" .}}
|
|
{{else if eq .TabName "overview"}}
|
|
<div id="readme_profile" class="markup">{{.ProfileReadme}}</div>
|
|
{{else}}
|
|
{{template "shared/repo_search" .}}
|
|
{{template "explore/repo_list" .}}
|
|
{{template "base/paginate" .}}
|
|
{{end}}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="ui g-modal-confirm delete modal" id="block-user">
|
|
<div class="header">
|
|
{{ctx.Locale.Tr "user.block_user"}}
|
|
</div>
|
|
<div class="content">
|
|
<p>{{ctx.Locale.Tr "user.block_user.detail"}}</p>
|
|
<ul>
|
|
<li>{{ctx.Locale.Tr "user.block_user.detail_1"}}</li>
|
|
<li>{{ctx.Locale.Tr "user.block_user.detail_2"}}</li>
|
|
<li>{{ctx.Locale.Tr "user.block_user.detail_3"}}</li>
|
|
</ul>
|
|
</div>
|
|
{{template "base/modal_actions_confirm" .}}
|
|
</div>
|
|
|
|
{{if $.IsAdmin}}
|
|
<div class="ui g-modal-confirm delete modal" id="delete-user-modal">
|
|
<div class="header">
|
|
{{svg "octicon-trash"}}
|
|
{{ctx.Locale.Tr "settings.delete_account_title"}}
|
|
</div>
|
|
<form class="ui form" method="POST" action="/admin/users/{{.ContextUser.ID}}/delete">
|
|
<div class="content">
|
|
<p>{{ctx.Locale.Tr "settings.delete_account_desc"}}</p>
|
|
{{$.CsrfTokenHtml}}
|
|
<div class="field">
|
|
<div class="ui checkbox">
|
|
<label for="purge">{{ctx.Locale.Tr "admin.users.purge"}}</label>
|
|
<input name="purge" type="checkbox">
|
|
</div>
|
|
<p class="help">{{ctx.Locale.Tr "admin.users.purge_help"}}</p>
|
|
</div>
|
|
</div>
|
|
{{template "base/modal_actions_confirm" .}}
|
|
</form>
|
|
</div>
|
|
{{end}}
|
|
{{template "base/footer" .}}
|