mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-08-09 05:18:47 +00:00
Add the ability for moderators to forcibly lock levels (#831)
* Add the ability for moderators to forcibly lock levels * Prevent forcibly locking an already locked level I had to rollback and re-commit this because I was getting some weird error within Rider. * Correct moderation notice header styling & remove errant text
This commit is contained in:
parent
df4d717763
commit
25bb2ecfc1
8 changed files with 114 additions and 13 deletions
|
@ -26,12 +26,32 @@
|
|||
@if (Model.Slot!.Hidden)
|
||||
{
|
||||
<div class="ui inverted red segment">
|
||||
<h2>This level is currently hidden.</h2>
|
||||
<p><b>Only you and moderators may view this level.</b></p>
|
||||
|
||||
<b>Reason:</b> <span>"@Model.Slot.HiddenReason"</span>
|
||||
|
||||
<p><b>For more information please contact a moderator.</b></p>
|
||||
<h3><i class="ban icon"></i> This level is currently hidden.</h3>
|
||||
@if (Model.User != null && Model.User.IsModerator)
|
||||
{
|
||||
<b>Reason:</b>
|
||||
<span>"@Model.Slot.HiddenReason"</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<p>This level has been hidden for violating the Terms of Service. Remember to follow the rules!</p>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
|
||||
@if (Model.Slot!.LockedByModerator)
|
||||
{
|
||||
<div class="ui inverted red segment">
|
||||
<h3><i class="lock icon"></i> This level has been locked by a moderator.</h3>
|
||||
@if (Model.User != null && Model.User.IsModerator)
|
||||
{
|
||||
<b>Reason:</b>
|
||||
<span>"@Model.Slot.LockedReason"</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<p>This level has been locked for violating the Terms of Service. Remember to follow the rules!</p>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
|
||||
|
@ -208,6 +228,16 @@
|
|||
</a>
|
||||
}
|
||||
|
||||
@if (!Model.Slot!.InitiallyLocked && !Model.Slot!.LockedByModerator)
|
||||
{
|
||||
<a href="/moderation/newCase?type=@((int)CaseType.LevelLock)&affectedId=@Model.Slot?.SlotId">
|
||||
<div class="ui yellow button">
|
||||
<i class="lock icon"></i>
|
||||
<span>Forcibly Lock Level</span>
|
||||
</div>
|
||||
</a>
|
||||
}
|
||||
|
||||
@if (Model.Slot!.CommentsEnabled)
|
||||
{
|
||||
<a class="ui yellow button" href="/moderation/newCase?type=@((int)CaseType.LevelDisableComments)&affectedId=@Model.Slot?.SlotId">
|
||||
|
|
|
@ -23,14 +23,11 @@
|
|||
@if (Model.ProfileUser.IsBanned)
|
||||
{
|
||||
<div class="ui inverted red segment">
|
||||
<h3 style="margin-bottom:5px;"><i class="ban icon"></i> This user is currently banned.</h3>
|
||||
<h3><i class="ban icon"></i> This user is currently banned.</h3>
|
||||
@if (Model.User != null && Model.User.IsModerator)
|
||||
{
|
||||
<b>Reason:</b>
|
||||
<span>"@Model.ProfileUser.BannedReason"</span> <br />
|
||||
<p>
|
||||
<i>Only you and other moderators may view the ban reason.</i>
|
||||
</p>
|
||||
<span>"@Model.ProfileUser.BannedReason"</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue