Skip to content

Commit

Permalink
Merge pull request #536 from poppastring/admin-page-updates
Browse files Browse the repository at this point in the history
Admin page updates
  • Loading branch information
poppastring authored Mar 11, 2021
2 parents 2784ec7 + 56642ae commit 4a69ebd
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 12 deletions.
2 changes: 1 addition & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ pool:

variables:
buildConfiguration: 'Release'
version: 2.31
version: 2.32

steps:
- task: UseDotNet@2
Expand Down
3 changes: 2 additions & 1 deletion source/DasBlog.Web.UI/Mappers/ProfilePost.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ public ProfilePost(IDasBlogSettings dasBlogSettings)
.ForMember(dest => dest.CommentId, opt => opt.MapFrom(src => src.EntryId))
.ForMember(dest => dest.SpamState, opt => opt.MapFrom(src => src.SpamState))
.ForMember(dest => dest.IsPublic, opt => opt.MapFrom(src => src.IsPublic))
.ForMember(dest => dest.Email, opt => opt.MapFrom(src => src.AuthorEmail));
.ForMember(dest => dest.Email, opt => opt.MapFrom(src => src.AuthorEmail))
.ForMember(dest => dest.AuthorIPAddress, opt => opt.MapFrom(src => src.AuthorIPAddress));

CreateMap<AddCommentViewModel, Comment>()
.ForMember(dest => dest.Author, opt => opt.MapFrom(src => src.Name))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ public class CommentAdminViewModel : CommentViewModel
{
public string Title { get; set; }
public string Email { get; set; }
public string AuthorIPAddress { get; set; }
}
}
20 changes: 11 additions & 9 deletions source/DasBlog.Web.UI/Views/Admin/ManageComments.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,25 @@
<tr>
<th scope="col">Blog Title</th>
<th scope="col">Name</th>
<th scope="col">IP Address</th>
<th scope="col">Status</th>
<th scope="col">Comment Text</th>
<th scope="col">Approval</th>
<th scope="col">Delete</th>
</tr>
</thead>
<tbody>
<tbody class="dbc-admin-comment-table">
@foreach (var comment in Model)
{
<tr>
<td width="30%"><a href="@dasBlogSettings.GetPermaLinkUrl(comment.BlogPostId)">@comment.Title</a></td>
<td width="10%"><a href="mailto:@[email protected]">@comment.Name</a></td>
<td width="10%">@comment.SpamState</td>
<td width="30%">@comment.Text</td>
<td width="10%"><comment-approval-link comment="@comment" admin="true" /></td>
<td width="10%"><comment-delete-link comment="@comment" admin="true" /></td>
</tr>
<tr>
<td width="20%"><a href="@dasBlogSettings.GetPermaLinkUrl(comment.BlogPostId)">@comment.Title</a></td>
<td width="15%"><a href="mailto:@[email protected]">@comment.Name</a></td>
<td width="5%">@comment.AuthorIPAddress</td>
<td width="10%">@comment.SpamState</td>
<td width="30%">@comment.Text</td>
<td width="10%"><comment-approval-link comment="@comment" admin="true" /></td>
<td width="10%"><comment-delete-link comment="@comment" admin="true" /></td>
</tr>
}
</tbody>
</table>
Expand Down
3 changes: 3 additions & 0 deletions source/DasBlog.Web.UI/wwwroot/css/site.css
Original file line number Diff line number Diff line change
Expand Up @@ -150,3 +150,6 @@
height: 100%;
}

tbody.dbc-admin-comment-table td {
word-break: break-all;
}
2 changes: 1 addition & 1 deletion source/DasBlog.Web.UI/wwwroot/css/site.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4a69ebd

Please sign in to comment.