Skip to content

Commit 608d81d

Browse files
fix: Improve formatting and readability in Protected Names views and scripts
1 parent b066bd2 commit 608d81d

3 files changed

Lines changed: 12 additions & 9 deletions

File tree

src/XtremeIdiots.Portal.Web/Views/ProtectedNames/Index.cshtml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
<div class="wrapper wrapper-content animated fadeInRight">
99
<div class="page-header">
1010
<h2>Protected Names</h2>
11-
<p class="text-muted">Usernames exclusively owned by specific players. Unauthorized use triggers automatic bans.</p>
11+
<p class="text-muted">Usernames exclusively owned by specific players. Unauthorized use triggers automatic bans.
12+
</p>
1213
<hr />
1314
<div class="mb-3">
1415
<i class="fa-solid fa-fw fa-shield"></i>

src/XtremeIdiots.Portal.Web/Views/Shared/_ProtectedNamesTable.cshtml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
@*
66
Shared Protected Names Table Partial
77
Displays a list of protected names with DataTables responsive support
8-
9-
Usage: Pass IEnumerable<ProtectedNameDto> as model
8+
9+
Usage: Pass IEnumerable<ProtectedNameDto> as model
1010
Must include protected-names-table.js script in parent view
1111
*@
1212

@@ -40,13 +40,15 @@
4040
<td>@protectedName.CreatedByUserProfile?.DisplayName</td>
4141
<td>
4242
<div class="btn-group btn-group-sm" role="group">
43-
<a policy="@AuthPolicies.Players_ProtectedNames_Write" asp-controller="ProtectedNames" asp-action="Report"
44-
asp-route-id="@protectedName.ProtectedNameId" class="btn btn-outline-secondary btn-sm" title="Usage Report" aria-label="Usage Report">
43+
<a policy="@AuthPolicies.Players_ProtectedNames_Write" asp-controller="ProtectedNames"
44+
asp-action="Report" asp-route-id="@protectedName.ProtectedNameId"
45+
class="btn btn-outline-secondary btn-sm" title="Usage Report" aria-label="Usage Report">
4546
<i class="fa-solid fa-fw fa-flag" aria-hidden="true"></i>
4647
</a>
47-
<a policy="@AuthPolicies.Players_ProtectedNames_Write" asp-controller="ProtectedNames" asp-action="Delete"
48-
asp-route-id="@protectedName.ProtectedNameId" class="btn btn-outline-danger btn-sm" aria-label="Delete"
49-
data-confirm="Are you sure you want to delete this protected name?" title="Delete">
48+
<a policy="@AuthPolicies.Players_ProtectedNames_Write" asp-controller="ProtectedNames"
49+
asp-action="Delete" asp-route-id="@protectedName.ProtectedNameId"
50+
class="btn btn-outline-danger btn-sm" aria-label="Delete"
51+
data-confirm="Are you sure you want to delete this protected name?" title="Delete">
5052
<i class="fa-solid fa-fw fa-trash" aria-hidden="true"></i>
5153
</a>
5254
</div>

src/XtremeIdiots.Portal.Web/wwwroot/js/protected-names-table.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Protected Names tables - Initialize DataTables with responsive
22
$(document).ready(function () {
33
const protectedNamesTable = $('#protectedNamesTable');
4-
4+
55
if (protectedNamesTable.length && protectedNamesTable.find('tbody tr').length > 0) {
66
const table = protectedNamesTable.DataTable({
77
responsive: {

0 commit comments

Comments
 (0)