8ecc637ab9
Requests are now logged as one big chunk to help prevent them getting torn apart and improve log throughput. Newlines are now stripped from dumped requests. Prepared statement logging now only happens in debug mode for speedier server startups. More suspicious request tracking is done outside of debug mode now. Only log the initial message in plugin_markdown in debug mode. Moved the CreateTopicSubmit attachment logging to super debug mode. Removed a couple of unneccesary menu items from the Account Manager menu. Hid the add friend option on the profiles for now. Moved the remaining analytics results loops into a common function. Only log the graph for the analytics routes in debug mode. Every Theme: Added CSS for the Don't have an Account link on the Login Page. Cosora: Fixed the header CSS on mobile. The header CSS now covers optheads on mobile. Revamped the profile comment UI. Shadow: Added CSS for sticky topics. Tempra Simple: Button CSS now applies to type=submit inputs. Fixed the IP Search CSS. Tempra Conflux: Button CSS now applies to type=submit inputs. Fixed the IP Search CSS. Tempra Cursive (Deprecated): Button CSS now applies to type=submit inputs.
116 lines
4.5 KiB
HTML
116 lines
4.5 KiB
HTML
{{template "header.html" . }}
|
|
|
|
<div id="profile_container" class="colstack">
|
|
|
|
<div id="profile_left_lane" class="colstack_left">
|
|
<div id="profile_left_pane" class="rowmenu">
|
|
<div class="topBlock">
|
|
<div class="rowitem avatarRow">
|
|
<img src="{{.ProfileOwner.Avatar}}" class="avatar" alt="{{.ProfileOwner.Name}}'s Avatar" title="{{.ProfileOwner.Name}}'s Avatar" />
|
|
</div>
|
|
<div class="rowitem nameRow">
|
|
<span class="profileName">{{.ProfileOwner.Name}}</span>{{if .ProfileOwner.Tag}}<span class="username">{{.ProfileOwner.Tag}}</span>{{end}}
|
|
</div>
|
|
</div>
|
|
<div class="passiveBlock">
|
|
{{if not .CurrentUser.Loggedin}}<div class="rowitem passive">
|
|
<a class="profile_menu_item">Login for options</a>
|
|
</div>{{else}}
|
|
<!--<div class="rowitem passive">
|
|
<a class="profile_menu_item">Add Friend</a>
|
|
</div>-->
|
|
{{if (.CurrentUser.IsSuperMod) and not (.ProfileOwner.IsSuperMod) }}<div class="rowitem passive">
|
|
{{if .ProfileOwner.IsBanned }}<a href="/users/unban/{{.ProfileOwner.ID}}?session={{.CurrentUser.Session}}" class="profile_menu_item">Unban</a>
|
|
{{else}}<a href="#ban_user" class="profile_menu_item">Ban</a>{{end}}
|
|
</div>{{end}}
|
|
<div class="rowitem passive">
|
|
<a href="/report/submit/{{.ProfileOwner.ID}}?session={{.CurrentUser.Session}}&type=user" class="profile_menu_item report_item" aria-label="Report User" title="Report User"></a>
|
|
</div>
|
|
{{end}}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="profile_right_lane" class="colstack_right">
|
|
{{if .CurrentUser.Perms.BanUsers}}
|
|
<!-- TODO: Inline the display: none; CSS -->
|
|
<div id="ban_user_head" class="colstack_item colstack_head hash_hide ban_user_hash" style="display: none;">
|
|
<div class="rowitem"><h1><a>Ban User</a></h1></div>
|
|
</div>
|
|
<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;">
|
|
{{/** TODO: Put a JS duration calculator here instead of this text? **/}}
|
|
<div class="colline">If all the fields are left blank, the ban will be permanent.</div>
|
|
<div class="colstack_item">
|
|
<div class="formrow real_first_child">
|
|
<div class="formitem formlabel"><a>Days</a></div>
|
|
<div class="formitem">
|
|
<input name="ban-duration-days" type="number" value="0" min="0" />
|
|
</div>
|
|
</div>
|
|
<div class="formrow">
|
|
<div class="formitem formlabel"><a>Weeks</a></div>
|
|
<div class="formitem">
|
|
<input name="ban-duration-weeks" type="number" value="0" min="0" />
|
|
</div>
|
|
</div>
|
|
<div class="formrow">
|
|
<div class="formitem formlabel"><a>Months</a></div>
|
|
<div class="formitem">
|
|
<input name="ban-duration-months" type="number" value="0" min="0" />
|
|
</div>
|
|
</div>
|
|
<!--<div class="formrow">
|
|
<div class="formitem formlabel"><a>Reason</a></div>
|
|
<div class="formitem"><textarea name="ban-reason" placeholder="A really horrible person" required></textarea></div>
|
|
</div>-->
|
|
<div class="formrow">
|
|
<div class="formitem"><button name="ban-button" class="formbutton form_middle_button">Ban User</button></div>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
{{end}}
|
|
|
|
<div id="profile_comments_head" class="colstack_item colstack_head hash_hide">
|
|
<div class="rowitem"><h1><a>Comments</a></h1></div>
|
|
</div>
|
|
<div id="profile_comments" class="colstack_item hash_hide">{{template "profile_comments_row.html" . }}</div>
|
|
|
|
{{if not .CurrentUser.IsBanned}}
|
|
<form id="profile_comments_form" class="hash_hide" action="/profile/reply/create/?session={{.CurrentUser.Session}}" method="post">
|
|
<input name="uid" value='{{.ProfileOwner.ID}}' type="hidden" />
|
|
<div class="colstack_item topic_reply_form" style="border-top: none;">
|
|
<div class="formrow">
|
|
<div class="formitem"><textarea class="input_content" name="reply-content" placeholder="Insert comment here"></textarea></div>
|
|
</div>
|
|
<div class="formrow quick_button_row">
|
|
<div class="formitem"><button name="reply-button" class="formbutton">Create Reply</button></div>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
{{end}}
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{/** Quick subpage switcher **/}}
|
|
{{/** TODO: Stop inlining this **/}}
|
|
<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>
|
|
|
|
{{template "footer.html" . }}
|