-
Notifications
You must be signed in to change notification settings - Fork 136
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #748 from EdiWang/admin-design-update
Admin design update
- Loading branch information
Showing
25 changed files
with
1,156 additions
and
1,120 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,20 +12,20 @@ | |
<script type="module"> | ||
import * as utils from '/js/app/utils.module.js' | ||
$(".btn-delete").click(function() { | ||
$(".btn-delete").click(function () { | ||
var cid = $(this).data("commentid"); | ||
callApi('/api/comment', 'DELETE', [cid], | ||
(success) => { | ||
document.querySelector(`#panel-comment-${cid}`).remove(); | ||
}); | ||
}); | ||
$(".btn-reply").click(function() { | ||
$(".btn-reply").click(function () { | ||
var cid = $(this).data("commentid"); | ||
$(`#panel-comment-${cid} .reply-ui`).show(); | ||
}); | ||
$(".btn-reply-post").click(function() { | ||
$(".btn-reply-post").click(function () { | ||
var cid = $(this).data("commentid"); | ||
var replyContent = $(`#replycontent-${cid}`).val(); | ||
|
@@ -39,7 +39,7 @@ | |
}); | ||
}); | ||
$(".btn-approve").click(function() { | ||
$(".btn-approve").click(function () { | ||
callApi(`/api/comment/${$(this).data("commentid")}/approval/toggle`, 'PUT', {}, | ||
async (resp) => { | ||
var data = await resp.json(); | ||
|
@@ -48,7 +48,7 @@ | |
}); | ||
}); | ||
window.deleteSelectedComments = function() { | ||
window.deleteSelectedComments = function () { | ||
var cids = []; | ||
$('.chk-cid:checked').each(function () { | ||
cids.push($(this).data('cid')); | ||
|
@@ -66,7 +66,7 @@ | |
</script> | ||
} | ||
|
||
@section head{ | ||
@section head{ | ||
<style> | ||
.mdrendered-comment-content img { | ||
max-width: 720px; | ||
|
@@ -78,15 +78,16 @@ | |
} | ||
</style> | ||
} | ||
|
||
<div class="admin-toolbar ps-4 pe-4 pt-2 pb-2 border-bottom mb-3 shadow-sm"> | ||
@section admintoolbar{ | ||
<div class="admin-toolbar pb-2 border-bottom mb-3"> | ||
<a href="javascript:window.deleteSelectedComments();" class="btn btn-outline-danger btn-delete-selected"> | ||
<i class="bi-trash"></i> @SharedLocalizer["Delete selected"] | ||
</a> | ||
</div> | ||
} | ||
|
||
<div class="ps-4 pe-4"> | ||
@if (Model.CommentDetailedItems.Count == 0) | ||
<div> | ||
@if (Model.CommentDetailedItems.Count == 0) | ||
{ | ||
<div class="alert alert-info"> | ||
@SharedLocalizer["No Comments"] | ||
|
@@ -96,7 +97,7 @@ | |
{ | ||
foreach (var item in Model.CommentDetailedItems) | ||
{ | ||
<div id="[email protected]" class="mb-4 row g-1"> | ||
<div id="[email protected]" class="p-3 mb-2 rounded-3 shadow-sm border bg-white row g-1"> | ||
<div class="form-check col-auto"> | ||
<input type="checkbox" class="form-check-input chk-cid" id="[email protected]" data-cid="@item.Id" /> | ||
<label class="form-check-label" for="[email protected]"></label> | ||
|
@@ -122,17 +123,17 @@ | |
<small class="text-muted"> | ||
<span> | ||
<time data-utc-label="@item.CreateTimeUtc.ToString("u")">@item.CreateTimeUtc</time> | ||
</span> | ||
</span> | ||
<span class="text-muted d-none d-sm-inline">(@item.IpAddress)</span> | ||
</small> | ||
|
||
<div class="reply-ui mt-3" style="display: none;"> | ||
<form> | ||
<div class="mb-2"> | ||
<textarea class="form-control" | ||
id="[email protected]" | ||
name="ReplyContent" | ||
placeholder="Content" type="text"></textarea> | ||
id="[email protected]" | ||
name="ReplyContent" | ||
placeholder="Content" type="text"></textarea> | ||
</div> | ||
|
||
<a class="btn btn-outline-success btn-reply-post" href="#" data-commentid="@item.Id"> | ||
|
@@ -168,8 +169,6 @@ | |
</button> | ||
</div> | ||
</div> | ||
|
||
<hr /> | ||
} | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,16 +31,18 @@ | |
</script> | ||
} | ||
|
||
<partial name="_PostManageHeader" /> | ||
@section admintoolbar{ | ||
<partial name="_PostManageHeader" /> | ||
} | ||
|
||
<div class="ps-4 pe-4"> | ||
<div> | ||
@if (posts.Any()) | ||
{ | ||
@Html.AntiForgeryToken() | ||
|
||
@foreach (var post in posts.OrderByDescending(p => p.LastModifiedUtc)) | ||
{ | ||
<div id="[email protected]"> | ||
<div id="[email protected]" class="p-3 mb-2 rounded-3 shadow-sm border bg-white"> | ||
<div class="d-flex"> | ||
<div class="flex-grow-1"> | ||
<a asp-page="./EditPost" asp-route-id="@post.Id"> | ||
|
@@ -63,7 +65,6 @@ | |
</a> | ||
</div> | ||
</div> | ||
<hr /> | ||
</div> | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -158,7 +158,7 @@ | |
</style> | ||
} | ||
|
||
<div class="p-4"> | ||
<div> | ||
|
||
<form id="page-edit-form" method="post"> | ||
<div class="row g-2"> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.