2016-12-07 09:34:09 +00:00
|
|
|
{{template "header.html" . }}
|
2017-05-29 14:52:37 +00:00
|
|
|
|
2017-11-23 05:37:08 +00:00
|
|
|
<div id="profile_container" class="colstack">
|
2017-11-06 16:24:45 +00:00
|
|
|
|
2017-07-29 10:36:39 +00:00
|
|
|
<div id="profile_left_lane" class="colstack_left">
|
|
|
|
<div id="profile_left_pane" class="rowmenu">
|
2017-11-12 07:18:25 +00:00
|
|
|
<div class="topBlock">
|
|
|
|
<div class="rowitem avatarRow">
|
2017-12-22 03:32:23 +00:00
|
|
|
<img src="{{.ProfileOwner.Avatar}}" class="avatar" alt="{{.ProfileOwner.Name}}'s Avatar" title="{{.ProfileOwner.Name}}'s Avatar" />
|
2017-11-12 07:18:25 +00:00
|
|
|
</div>
|
|
|
|
<div class="rowitem nameRow">
|
|
|
|
<span class="profileName">{{.ProfileOwner.Name}}</span>{{if .ProfileOwner.Tag}}<span class="username">{{.ProfileOwner.Tag}}</span>{{end}}
|
|
|
|
</div>
|
2017-07-29 10:36:39 +00:00
|
|
|
</div>
|
2017-11-10 00:16:15 +00:00
|
|
|
<div class="passiveBlock">
|
2018-02-26 09:07:00 +00:00
|
|
|
{{if not .CurrentUser.Loggedin}}<div class="rowitem passive">
|
2018-03-11 09:33:49 +00:00
|
|
|
<a class="profile_menu_item">{{lang "profile_login_for_options"}}</a>
|
2018-02-26 09:07:00 +00:00
|
|
|
</div>{{else}}
|
|
|
|
<!--<div class="rowitem passive">
|
2018-03-11 09:33:49 +00:00
|
|
|
<a class="profile_menu_item">{{lang "profile_add_friend"}}</a>
|
2018-02-26 09:07:00 +00:00
|
|
|
</div>-->
|
2017-11-10 00:16:15 +00:00
|
|
|
{{if (.CurrentUser.IsSuperMod) and not (.ProfileOwner.IsSuperMod) }}<div class="rowitem passive">
|
2018-03-11 09:33:49 +00:00
|
|
|
{{if .ProfileOwner.IsBanned }}<a href="/users/unban/{{.ProfileOwner.ID}}?session={{.CurrentUser.Session}}" class="profile_menu_item">{{lang "profile_unban"}}</a>
|
|
|
|
{{else}}<a href="#ban_user" class="profile_menu_item">{{lang "profile_ban"}}</a>{{end}}
|
2017-11-10 00:16:15 +00:00
|
|
|
</div>{{end}}
|
|
|
|
<div class="rowitem passive">
|
2018-03-11 09:33:49 +00:00
|
|
|
<a href="/report/submit/{{.ProfileOwner.ID}}?session={{.CurrentUser.Session}}&type=user" class="profile_menu_item report_item" aria-label="{{lang "profile_report_user_aria"}}" title="{{lang "profile_report_user_tooltip"}}"></a>
|
2017-11-10 00:16:15 +00:00
|
|
|
</div>
|
2018-02-26 09:07:00 +00:00
|
|
|
{{end}}
|
2017-07-29 10:36:39 +00:00
|
|
|
</div>
|
2016-12-07 09:34:09 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2017-05-29 14:52:37 +00:00
|
|
|
|
2017-07-29 10:36:39 +00:00
|
|
|
<div id="profile_right_lane" class="colstack_right">
|
2017-08-27 09:33:45 +00:00
|
|
|
{{if .CurrentUser.Perms.BanUsers}}
|
2017-09-10 16:57:22 +00:00
|
|
|
<!-- TODO: Inline the display: none; CSS -->
|
2017-08-27 09:33:45 +00:00
|
|
|
<div id="ban_user_head" class="colstack_item colstack_head hash_hide ban_user_hash" style="display: none;">
|
2018-03-11 09:33:49 +00:00
|
|
|
<div class="rowitem"><h1><a>{{lang "profile_ban_user_head"}}</a></h1></div>
|
2017-07-29 10:36:39 +00:00
|
|
|
</div>
|
2017-09-15 22:20:01 +00:00
|
|
|
<form id="ban_user_form" class="hash_hide ban_user_hash" action="/users/ban/submit/{{.ProfileOwner.ID}}?session={{.CurrentUser.Session}}" method="post" style="display: none;">
|
2017-09-10 16:57:22 +00:00
|
|
|
{{/** TODO: Put a JS duration calculator here instead of this text? **/}}
|
2018-03-11 09:33:49 +00:00
|
|
|
<div class="colline">{{lang "profile_ban_user_notice"}}</div>
|
2017-08-27 09:33:45 +00:00
|
|
|
<div class="colstack_item">
|
|
|
|
<div class="formrow real_first_child">
|
2018-03-11 09:33:49 +00:00
|
|
|
<div class="formitem formlabel"><a>{{lang "profile_ban_user_days"}}</a></div>
|
2017-08-27 09:33:45 +00:00
|
|
|
<div class="formitem">
|
|
|
|
<input name="ban-duration-days" type="number" value="0" min="0" />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="formrow">
|
2018-03-11 09:33:49 +00:00
|
|
|
<div class="formitem formlabel"><a>{{lang "profile_ban_user_weeks"}}</a></div>
|
2017-08-27 09:33:45 +00:00
|
|
|
<div class="formitem">
|
|
|
|
<input name="ban-duration-weeks" type="number" value="0" min="0" />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="formrow">
|
2018-03-11 09:33:49 +00:00
|
|
|
<div class="formitem formlabel"><a>{{lang "profile_ban_user_months"}}</a></div>
|
2017-08-27 09:33:45 +00:00
|
|
|
<div class="formitem">
|
|
|
|
<input name="ban-duration-months" type="number" value="0" min="0" />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<!--<div class="formrow">
|
2018-03-11 09:33:49 +00:00
|
|
|
<div class="formitem formlabel"><a>{{lang "profile_ban_user_reason"}}</a></div>
|
2017-08-27 09:33:45 +00:00
|
|
|
<div class="formitem"><textarea name="ban-reason" placeholder="A really horrible person" required></textarea></div>
|
|
|
|
</div>-->
|
|
|
|
<div class="formrow">
|
2018-03-11 09:33:49 +00:00
|
|
|
<div class="formitem"><button name="ban-button" class="formbutton form_middle_button">{{lang "profile_ban_user_button"}}</button></div>
|
2017-08-27 09:33:45 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
{{end}}
|
|
|
|
|
|
|
|
<div id="profile_comments_head" class="colstack_item colstack_head hash_hide">
|
2018-03-11 09:33:49 +00:00
|
|
|
<div class="rowitem"><h1><a>{{lang "profile_comments_head"}}</a></h1></div>
|
2017-08-27 09:33:45 +00:00
|
|
|
</div>
|
2017-12-24 22:08:35 +00:00
|
|
|
<div id="profile_comments" class="colstack_item hash_hide">{{template "profile_comments_row.html" . }}</div>
|
2017-05-29 14:52:37 +00:00
|
|
|
|
2017-09-03 04:50:31 +00:00
|
|
|
{{if not .CurrentUser.IsBanned}}
|
2018-01-14 14:27:10 +00:00
|
|
|
<form id="profile_comments_form" class="hash_hide" action="/profile/reply/create/?session={{.CurrentUser.Session}}" method="post">
|
2017-07-29 10:36:39 +00:00
|
|
|
<input name="uid" value='{{.ProfileOwner.ID}}' type="hidden" />
|
|
|
|
<div class="colstack_item topic_reply_form" style="border-top: none;">
|
|
|
|
<div class="formrow">
|
2018-03-11 09:33:49 +00:00
|
|
|
<div class="formitem"><textarea class="input_content" name="reply-content" placeholder="{{lang "profile_comments_form_content"}}"></textarea></div>
|
2017-07-29 10:36:39 +00:00
|
|
|
</div>
|
2017-12-24 22:08:35 +00:00
|
|
|
<div class="formrow quick_button_row">
|
2018-03-11 09:33:49 +00:00
|
|
|
<div class="formitem"><button name="reply-button" class="formbutton">{{lang "profile_comments_form_button"}}</button></div>
|
2017-07-29 10:36:39 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|
2016-12-07 09:34:09 +00:00
|
|
|
{{end}}
|
2017-01-08 16:02:19 +00:00
|
|
|
</div>
|
2017-05-29 14:52:37 +00:00
|
|
|
|
2017-11-06 16:24:45 +00:00
|
|
|
</div>
|
|
|
|
|
2017-08-27 09:33:45 +00:00
|
|
|
{{/** Quick subpage switcher **/}}
|
2017-09-10 16:57:22 +00:00
|
|
|
{{/** TODO: Stop inlining this **/}}
|
2017-08-27 09:33:45 +00:00
|
|
|
<script type="text/javascript">
|
|
|
|
function handle_profile_hashbit() {
|
|
|
|
var hash_class = ""
|
|
|
|
switch(window.location.hash.substr(1)) {
|
|
|
|
case "ban_user":
|
|
|
|
hash_class = "ban_user_hash"
|
|
|
|
break
|
|
|
|
default:
|
|
|
|
console.log("Unknown hashbit")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
$(".hash_hide").hide()
|
|
|
|
$("." + hash_class).show()
|
|
|
|
}
|
|
|
|
if(window.location.hash) handle_profile_hashbit()
|
|
|
|
window.addEventListener("hashchange", handle_profile_hashbit, false)
|
|
|
|
</script>
|
|
|
|
|
2017-05-29 14:52:37 +00:00
|
|
|
{{template "footer.html" . }}
|