mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-09-19 15:59:04 +00:00
Simplify rank badges and implement profile tags (#880)
* Simplify website rank badges to use semantic classes * Fix ambiguity between partial display types * Add profile vanity tags and needed migration * Make form field read only to non-administrators * Display lock icon if user is not admin to minimize confusion * Also display lock icon for username field since it's readonly * Fix up naming consistency issues and edit migration accordingly * Apply suggestions from code review * Add space between placeholder property and ternary operator
This commit is contained in:
parent
a316c866c5
commit
be5a29d3c9
10 changed files with 83 additions and 19 deletions
|
@ -25,10 +25,16 @@
|
|||
<a href="~/user/@Model.UserId">@Model.Username</a>
|
||||
@if (Model.IsModerator)
|
||||
{
|
||||
<span class="permissionBadge" style="background-color: @Model.PermissionLevel.ToHtmlColor();">
|
||||
<span class="profile-tag ui label @Model.PermissionLevel.ToHtmlColor()">
|
||||
@Model.PermissionLevel.ToString()
|
||||
</span>
|
||||
}
|
||||
@if (!string.IsNullOrWhiteSpace(Model.ProfileTag))
|
||||
{
|
||||
<span class="profile-tag ui label">
|
||||
@Model.ProfileTag
|
||||
</span>
|
||||
}
|
||||
</h2>
|
||||
}
|
||||
else
|
||||
|
@ -37,10 +43,16 @@
|
|||
@Model.Username
|
||||
@if (Model.IsModerator)
|
||||
{
|
||||
<span class="permissionBadge" style="background-color: @Model.PermissionLevel.ToHtmlColor();">
|
||||
<span class="profile-tag ui label @Model.PermissionLevel.ToHtmlColor()">
|
||||
@Model.PermissionLevel.ToString()
|
||||
</span>
|
||||
}
|
||||
@if (!string.IsNullOrWhiteSpace(Model.ProfileTag))
|
||||
{
|
||||
<span class="profile-tag ui label">
|
||||
@Model.ProfileTag
|
||||
</span>
|
||||
}
|
||||
</h1>
|
||||
}
|
||||
@{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue