Browse Source

Merge pull request #2566 from abpframework/Change-Blog-folder-name-to-Blogs-

[Blogging module] Change "Blog" folder name to "Blogs"
pull/2571/head
Halil İbrahim Kalkan 7 years ago
committed by GitHub
parent
commit
c9587579c5
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      modules/blogging/src/Volo.Blogging.Web/BloggingWebModule.cs
  2. 319
      modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Posts/Detail.cshtml
  3. 0
      modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/BloggingPage.cs
  4. 0
      modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/BloggingPageModel.cs
  5. 2
      modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Index.cshtml
  6. 0
      modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Index.cshtml.cs
  7. 319
      modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/Detail.cshtml
  8. 0
      modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/Detail.cshtml.cs
  9. 4
      modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/Edit.cshtml
  10. 0
      modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/Edit.cshtml.cs
  11. 10
      modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/Index.cshtml
  12. 0
      modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/Index.cshtml.cs
  13. 0
      modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/Index.css
  14. 0
      modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/Index.min.css
  15. 0
      modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/Index.scss
  16. 4
      modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/New.cshtml
  17. 0
      modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/New.cshtml.cs
  18. 0
      modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/detail.js
  19. 0
      modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/edit.js
  20. 0
      modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/new.css
  21. 0
      modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/new.css.map
  22. 0
      modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/new.js
  23. 0
      modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/new.min.css
  24. 0
      modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/new.scss
  25. 0
      modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Shared/Scripts/blog.js
  26. 0
      modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Shared/Styles/_bootstrap-overwrite.scss
  27. 0
      modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Shared/Styles/_custom.scss
  28. 0
      modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Shared/Styles/_header.scss
  29. 0
      modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Shared/Styles/_home.css
  30. 0
      modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Shared/Styles/_home.min.css
  31. 0
      modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Shared/Styles/_home.scss
  32. 0
      modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Shared/Styles/_post.scss
  33. 0
      modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Shared/Styles/blog.css
  34. 0
      modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Shared/Styles/blog.css.map
  35. 0
      modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Shared/Styles/blog.min.css
  36. 0
      modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Shared/Styles/blog.scss
  37. 0
      modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/_ViewImports.cshtml

8
modules/blogging/src/Volo.Blogging.Web/BloggingWebModule.cs

@ -59,10 +59,10 @@ namespace Volo.Blogging
var routePrefix = urlOptions.RoutePrefix;
options.Conventions.AddPageRoute("/Blog/Posts/Index", routePrefix + "{blogShortName}");
options.Conventions.AddPageRoute("/Blog/Posts/Detail", routePrefix + "{blogShortName}/{postUrl}");
options.Conventions.AddPageRoute("/Blog/Posts/Edit", routePrefix + "{blogShortName}/posts/{postId}/edit");
options.Conventions.AddPageRoute("/Blog/Posts/New", routePrefix + "{blogShortName}/posts/new");
options.Conventions.AddPageRoute("/Blogs/Posts/Index", routePrefix + "{blogShortName}");
options.Conventions.AddPageRoute("/Blogs/Posts/Detail", routePrefix + "{blogShortName}/{postUrl}");
options.Conventions.AddPageRoute("/Blogs/Posts/Edit", routePrefix + "{blogShortName}/posts/{postId}/edit");
options.Conventions.AddPageRoute("/Blogs/Posts/New", routePrefix + "{blogShortName}/posts/new");
});
}
}

319
modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Posts/Detail.cshtml

@ -1,319 +0,0 @@
@page
@inherits Volo.Blogging.Pages.Blog.BloggingPage
@using Microsoft.AspNetCore.Authorization
@using Microsoft.AspNetCore.Http.Extensions
@using Volo.Abp.Users
@using Volo.Blogging
@using Volo.Blogging.Pages.Blog.Posts
@using Volo.Blogging.Areas.Blog.Helpers.TagHelpers
@inject IAuthorizationService Authorization
@model DetailModel
@{
ViewBag.PageTitle = "Blog";
var hasCommentingPermission = CurrentUser.IsAuthenticated; //TODO: Apply real policy!
}
@section scripts {
<abp-script-bundle name="@typeof(DetailModel).FullName">
<abp-script src="/Pages/Blog/Posts/detail.js" />
</abp-script-bundle>
}
@section styles {
<abp-style-bundle name="@typeof(DetailModel).FullName">
<abp-style src="/Pages/Blog/Shared/Styles/blog.css" />
</abp-style-bundle>
}
<div class="vs-blog vs-blog-detail">
<abp-input asp-for="FocusCommentId" class="m-0" />
<div class="container">
<div class="row">
<div class="col-md-8 col-lg-8 mx-auto">
<section class="hero-section">
<div class="hero-articles">
<div class="hero-content">
<h1 class="mb-3">
<a asp-page="./Detail" asp-route-postUrl="@Model.Post.Url" asp-route-blogShortName="@Model.BlogShortName">@Model.Post.Title</a>
</h1>
<div class="article-owner">
<div class="article-infos">
<div class="user-card mt-3 mb-4">
<div class="row">
<div class="col-auto pr-1">
@if (Model.Post.Writer != null)
{
<img gravatar-email="@Model.Post.Writer.Email" default-image="Identicon" class="article-avatar" />
}
</div>
<div class="col pl-1">
@if (Model.Post.Writer != null)
{
<h5 class="mt-2 mb-1">@(Model.Post.Writer.UserName) <span>@ConvertDatetimeToTimeAgo(Model.Post.CreationTime)</span></h5>
}
<i class="fa fa-eye"></i> @L["WiewsWithCount", @Model.Post.ReadCount]
<span class="vs-seperator">|</span>
<i class="fa fa-comment"></i> @L["CommentWithCount", @Model.CommentCount]
@if (await Authorization.IsGrantedAsync(BloggingPermissions.Posts.Update))
{
<span class="seperator">|</span>
<a asp-page="./Edit" asp-route-postId="@Model.Post.Id" asp-route-blogShortName="@Model.BlogShortName">
<i class="fa fa-pencil"></i> @L["Edit"]
</a>
}
@if (await Authorization.IsGrantedAsync(BloggingPermissions.Posts.Delete) || (CurrentUser.Id.HasValue && CurrentUser.Id == Model.Post.CreatorId))
{
<span class="seperator">|</span>
<a href="#" id="DeletePostLink" data-postid="@Model.Post.Id" data-blogShortName="@Model.BlogShortName">
<i class="fa fa-trash"></i> @L["Delete"]
</a>
}
</div>
</div>
</div>
</div>
</div>
</div>
<div class="img-container mb-3">
<img src="@Model.Post.CoverImage" />
</div>
</div>
</section>
</div>
</div>
<div class="row">
<div class="col-md-8 col-lg-8 mx-auto">
<section class="post-content">
<p>
@Html.Raw(RenderMarkdownToHtml(Model.Post.Content))
</p>
</section>
</div>
</div>
<div class="row">
<div class="col-md-8 col-lg-8 mx-auto">
@if (Model.Post.Tags.Count > 0)
{
<div class="tags">
<h5>@L["TagsInThisArticle"]</h5>
@foreach (var tag in Model.Post.Tags)
{
<a asp-page="/Blog/Posts/Index" asp-route-blogShortName="@Model.BlogShortName" asp-route-tagName="@tag.Name" class="tag">@tag.Name</a>
}
</div>
}
@if (Model.CommentsWithReplies.Count > 0)
{
<abp-row v-align="Start">
<abp-column size-sm="_12">
<p class="float-left"><i class="fa fa-comment"></i> @L["CommentWithCount", @Model.CommentCount]</p>
@if (hasCommentingPermission)
{
<a abp-button="Primary" class="btn-rounded float-right active" href="#LeaveComment">@L["LeaveComment"]</a>
}
else
{
<a abp-button="Primary" class="btn-rounded float-right active" href="/Account/Login?returnUrl=@Request.GetEncodedPathAndQuery()">@L["LeaveComment"]</a>
}
</abp-column>
</abp-row>
}
<div class="comment-area">
@foreach (var commentWithRepliesDto in Model.CommentsWithReplies)
{
<div class="media">
<img gravatar-email="@commentWithRepliesDto.Comment.Writer.Email" default-image="Identicon" class="d-flex mr-3 rounded-circle comment-avatar" />
<div class="media-body">
<h5 class="comment-owner">
@(commentWithRepliesDto.Comment.Writer == null ? "" : commentWithRepliesDto.Comment.Writer.UserName)
<span>@ConvertDatetimeToTimeAgo(commentWithRepliesDto.Comment.CreationTime)</span>
</h5>
<p id="@commentWithRepliesDto.Comment.Id">
@commentWithRepliesDto.Comment.Text
</p>
<div class="comment-buttons">
@if (hasCommentingPermission)
{
<a href="#" class="tag replyLink" data-relpyid="@commentWithRepliesDto.Comment.Id">
<i class="fa fa-reply" aria-hidden="true"></i> @L["Reply"]
</a>
}
@if (await Authorization.IsGrantedAsync(BloggingPermissions.Comments.Delete))
{
<span class="seperator">|</span>
<a href="#" class="tag deleteLink" data-deleteid="@commentWithRepliesDto.Comment.Id">
<i class="fa fa-trash" aria-hidden="true"></i> @L["Delete"]
</a>
}
@if (await Authorization.IsGrantedAsync(BloggingPermissions.Comments.Update) || (CurrentUser.Id == commentWithRepliesDto.Comment.CreatorId))
{
<span class="seperator">|</span>
<a href="#" class="tag updateLink" data-updateid="@commentWithRepliesDto.Comment.Id">
<i class="fa fa-pencil" aria-hidden="true"></i> @L["Edit"]
</a>
}
</div>
@if (hasCommentingPermission)
{
<div class="comment-form mt-4 replyForm">
<div class="clearfix p-4">
<h3 class="mt-0">
@L["ReplyTo", commentWithRepliesDto.Comment.Writer == null ? "" : commentWithRepliesDto.Comment.Writer.UserName]
</h3>
<div>
<form method="post">
<input name="postId" value="@Model.Post.Id" hidden />
<input name="repliedCommentId" value="@commentWithRepliesDto.Comment.Id" hidden />
<div class="form-group">
<textarea class="form-control no-border" name="text" id="textBoxId" rows="4"></textarea>
</div>
<abp-button button-type="Primary" class="btn-rounded float-right" type="submit" text="@L["Comment"].Value" />
<abp-button button-type="Danger" class="btn-rounded float-right replyCancelButton" text="@L["Cancel"].Value" />
</form>
</div>
</div>
</div>
}
@if (await Authorization.IsGrantedAsync(BloggingPermissions.Comments.Update) || (CurrentUser.Id == commentWithRepliesDto.Comment.CreatorId))
{
<div class="comment-form mt-4 editForm">
<div class="clearfix p-4">
<div>
<form class="editFormClass">
<input name="commentId" value="@commentWithRepliesDto.Comment.Id" hidden />
<div class="form-group">
<textarea class="form-control no-border" name="text" id="textBoxId" rows="4">@commentWithRepliesDto.Comment.Text</textarea>
</div>
<abp-button button-type="Primary" class="btn-rounded float-right" type="submit" text="@L["Submit"].Value" />
<abp-button button-type="Danger" class="btn-rounded float-right editCancelButton" text="@L["Cancel"].Value" />
</form>
</div>
</div>
</div>
}
@foreach (var reply in commentWithRepliesDto.Replies)
{
<div class="media">
<img gravatar-email="@reply.Writer.Email" default-image="Identicon" class="d-flex mr-3 rounded-circle comment-avatar" />
<div class="media-body">
<h5 class="comment-owner">
@(reply.Writer == null ? "" : reply.Writer.UserName)
<span>@ConvertDatetimeToTimeAgo(reply.CreationTime)</span>
</h5>
<p id="@reply.Id">
@reply.Text
</p>
<div class="comment-buttons">
@if (hasCommentingPermission)
{
<a href="#" class="tag replyLink" data-relpyid="@commentWithRepliesDto.Comment.Id">
<i class="fa fa-reply" aria-hidden="true"></i> @L["Reply"]
</a>
}
@if (await Authorization.IsGrantedAsync(BloggingPermissions.Comments.Delete) || (CurrentUser.Id == commentWithRepliesDto.Comment.CreatorId))
{
<span class="seperator">|</span>
<a href="#" class="tag deleteLink" data-deleteid="@reply.Id">
<i class="fa fa-trash" aria-hidden="true"></i> @L["Delete"]
</a>
}
@if (await Authorization.IsGrantedAsync(BloggingPermissions.Comments.Update) || (CurrentUser.Id == commentWithRepliesDto.Comment.CreatorId))
{
<span class="seperator">|</span>
<a href="#" class="tag updateLink" data-updateid="@reply.Id">
<i class="fa fa-pencil" aria-hidden="true"></i> @L["Edit"]
</a>
}
</div>
@if (hasCommentingPermission)
{
<div class="comment-form mt-4 replyForm">
<div class="clearfix bg-light p-4">
<h3 class="mt-0">
@L["ReplyTo", commentWithRepliesDto.Comment.Writer == null ? "" : commentWithRepliesDto.Comment.Writer.UserName]
</h3>
<div>
<form method="post">
<input name="postId" value="@Model.Post.Id" hidden />
<input name="repliedCommentId" value="@commentWithRepliesDto.Comment.Id" hidden />
<div class="form-group">
<textarea class="form-control no-border" name="text" id="textBoxId" rows="4"></textarea>
</div>
<abp-button button-type="Primary" class="btn-rounded float-right" type="submit" text="@L["Submit"].Value" />
<abp-button button-type="Danger" class="btn-rounded float-right replyCancelButton" text="@L["Cancel"].Value" />
</form>
</div>
</div>
</div>
}
@if (await Authorization.IsGrantedAsync(BloggingPermissions.Comments.Update) || (CurrentUser.Id == commentWithRepliesDto.Comment.CreatorId))
{
<div class="comment-form mt-4 editForm">
<div class="clearfix bg-light p-4">
<div>
<form class="editFormClass">
<input name="commentId" value="@reply.Id" hidden />
<div class="form-group">
<textarea class="form-control no-border" name="text" id="textBoxId" rows="4">@reply.Text</textarea>
</div>
<abp-button button-type="Primary" class="btn-rounded float-right" type="submit" text="@L["Submit"].Value" />
<abp-button button-type="Danger" class="btn-rounded float-right editCancelButton" text="@L["Cancel"].Value" />
</form>
</div>
</div>
</div>
}
</div>
</div>
}
</div>
</div>
}
</div>
@if (hasCommentingPermission)
{
<div class="comment-form mt-4" id="LeaveComment">
<div class="vs-blog-title mb-0">
<h3>@L["LeaveComment"]</h3>
</div>
<div class="clearfix bg-light p-4">
<div>
<form method="post">
<input name="postId" value="@Model.Post.Id" hidden />
<input name="repliedCommentId" id="repliedCommentId" hidden />
<div class="form-group">
<textarea class="form-control no-border" name="text" id="textBoxId" rows="4"></textarea>
</div>
<abp-button button-type="Primary" class="btn-rounded float-right" type="submit" text="@L["Submit"].Value" />
</form>
</div>
</div>
</div>
}
else
{
<a abp-button="Primary" class="btn-rounded float-right active mt-3" href="/Account/Login?returnUrl=@Request.GetEncodedPathAndQuery()">@L["LeaveComment"]</a>
}
</div>
</div>
</div>
</div>

0
modules/blogging/src/Volo.Blogging.Web/Pages/Blog/BloggingPage.cs → modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/BloggingPage.cs

0
modules/blogging/src/Volo.Blogging.Web/Pages/Blog/BloggingPageModel.cs → modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/BloggingPageModel.cs

2
modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Index.cshtml → modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Index.cshtml

@ -3,7 +3,7 @@
@inherits BloggingPage
@model IndexModel
@{
ViewBag.PageTitle = "Blog";
ViewBag.PageTitle = "Blogs";
}
<h2>
@L["Blogs"]

0
modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Index.cshtml.cs → modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Index.cshtml.cs

319
modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/Detail.cshtml

@ -0,0 +1,319 @@
@page
@inherits Volo.Blogging.Pages.Blog.BloggingPage
@using Microsoft.AspNetCore.Authorization
@using Microsoft.AspNetCore.Http.Extensions
@using Volo.Abp.Users
@using Volo.Blogging
@using Volo.Blogging.Pages.Blog.Posts
@using Volo.Blogging.Areas.Blog.Helpers.TagHelpers
@inject IAuthorizationService Authorization
@model DetailModel
@{
ViewBag.PageTitle = Model.Post.Title;
var hasCommentingPermission = CurrentUser.IsAuthenticated; //TODO: Apply real policy!
}
@section scripts {
<abp-script-bundle name="@typeof(DetailModel).FullName">
<abp-script src="/Pages/Blogs/Posts/detail.js" />
</abp-script-bundle>
}
@section styles {
<abp-style-bundle name="@typeof(DetailModel).FullName">
<abp-style src="/Pages/Blogs/Shared/Styles/blog.css" />
</abp-style-bundle>
}
<div class="vs-blog vs-blog-detail">
<abp-input asp-for="FocusCommentId" class="m-0" />
<div class="container">
<div class="row">
<div class="col-md-8 col-lg-8 mx-auto">
<section class="hero-section">
<div class="hero-articles">
<div class="hero-content">
<h1 class="mb-3">
<a asp-page="./Detail" asp-route-postUrl="@Model.Post.Url" asp-route-blogShortName="@Model.BlogShortName">@Model.Post.Title</a>
</h1>
<div class="article-owner">
<div class="article-infos">
<div class="user-card mt-3 mb-4">
<div class="row">
<div class="col-auto pr-1">
@if (Model.Post.Writer != null)
{
<img gravatar-email="@Model.Post.Writer.Email" default-image="Identicon" class="article-avatar" />
}
</div>
<div class="col pl-1">
@if (Model.Post.Writer != null)
{
<h5 class="mt-2 mb-1">@(Model.Post.Writer.UserName) <span>@ConvertDatetimeToTimeAgo(Model.Post.CreationTime)</span></h5>
}
<i class="fa fa-eye"></i> @L["WiewsWithCount", @Model.Post.ReadCount]
<span class="vs-seperator">|</span>
<i class="fa fa-comment"></i> @L["CommentWithCount", @Model.CommentCount]
@if (await Authorization.IsGrantedAsync(BloggingPermissions.Posts.Update))
{
<span class="seperator">|</span>
<a asp-page="./Edit" asp-route-postId="@Model.Post.Id" asp-route-blogShortName="@Model.BlogShortName">
<i class="fa fa-pencil"></i> @L["Edit"]
</a>
}
@if (await Authorization.IsGrantedAsync(BloggingPermissions.Posts.Delete) || (CurrentUser.Id.HasValue && CurrentUser.Id == Model.Post.CreatorId))
{
<span class="seperator">|</span>
<a href="#" id="DeletePostLink" data-postid="@Model.Post.Id" data-blogShortName="@Model.BlogShortName">
<i class="fa fa-trash"></i> @L["Delete"]
</a>
}
</div>
</div>
</div>
</div>
</div>
</div>
<div class="img-container mb-3">
<img src="@Model.Post.CoverImage" />
</div>
</div>
</section>
</div>
</div>
<div class="row">
<div class="col-md-8 col-lg-8 mx-auto">
<section class="post-content">
<p>
@Html.Raw(RenderMarkdownToHtml(Model.Post.Content))
</p>
</section>
</div>
</div>
<div class="row">
<div class="col-md-8 col-lg-8 mx-auto">
@if (Model.Post.Tags.Count > 0)
{
<div class="tags">
<h5>@L["TagsInThisArticle"]</h5>
@foreach (var tag in Model.Post.Tags)
{
<a asp-page="/Blog/Posts/Index" asp-route-blogShortName="@Model.BlogShortName" asp-route-tagName="@tag.Name" class="tag">@tag.Name</a>
}
</div>
}
@if (Model.CommentsWithReplies.Count > 0)
{
<abp-row v-align="Start">
<abp-column size-sm="_12">
<p class="float-left"><i class="fa fa-comment"></i> @L["CommentWithCount", @Model.CommentCount]</p>
@if (hasCommentingPermission)
{
<a abp-button="Primary" class="btn-rounded float-right active" href="#LeaveComment">@L["LeaveComment"]</a>
}
else
{
<a abp-button="Primary" class="btn-rounded float-right active" href="/Account/Login?returnUrl=@Request.GetEncodedPathAndQuery()">@L["LeaveComment"]</a>
}
</abp-column>
</abp-row>
<div class="comment-area">
@foreach (var commentWithRepliesDto in Model.CommentsWithReplies)
{
<div class="media">
<img gravatar-email="@commentWithRepliesDto.Comment.Writer.Email" default-image="Identicon" class="d-flex mr-3 rounded-circle comment-avatar" />
<div class="media-body">
<h5 class="comment-owner">
@(commentWithRepliesDto.Comment.Writer == null ? "" : commentWithRepliesDto.Comment.Writer.UserName)
<span>@ConvertDatetimeToTimeAgo(commentWithRepliesDto.Comment.CreationTime)</span>
</h5>
<p id="@commentWithRepliesDto.Comment.Id">
@commentWithRepliesDto.Comment.Text
</p>
<div class="comment-buttons">
@if (hasCommentingPermission)
{
<a href="#" class="tag replyLink" data-relpyid="@commentWithRepliesDto.Comment.Id">
<i class="fa fa-reply" aria-hidden="true"></i> @L["Reply"]
</a>
}
@if (await Authorization.IsGrantedAsync(BloggingPermissions.Comments.Delete))
{
<span class="seperator">|</span>
<a href="#" class="tag deleteLink" data-deleteid="@commentWithRepliesDto.Comment.Id">
<i class="fa fa-trash" aria-hidden="true"></i> @L["Delete"]
</a>
}
@if (await Authorization.IsGrantedAsync(BloggingPermissions.Comments.Update) || (CurrentUser.Id == commentWithRepliesDto.Comment.CreatorId))
{
<span class="seperator">|</span>
<a href="#" class="tag updateLink" data-updateid="@commentWithRepliesDto.Comment.Id">
<i class="fa fa-pencil" aria-hidden="true"></i> @L["Edit"]
</a>
}
</div>
@if (hasCommentingPermission)
{
<div class="comment-form mt-4 replyForm">
<div class="clearfix p-4">
<h3 class="mt-0">
@L["ReplyTo", commentWithRepliesDto.Comment.Writer == null ? "" : commentWithRepliesDto.Comment.Writer.UserName]
</h3>
<div>
<form method="post">
<input name="postId" value="@Model.Post.Id" hidden />
<input name="repliedCommentId" value="@commentWithRepliesDto.Comment.Id" hidden />
<div class="form-group">
<textarea class="form-control no-border" name="text" id="textBoxId" rows="4"></textarea>
</div>
<abp-button button-type="Primary" class="btn-rounded float-right" type="submit" text="@L["Comment"].Value" />
<abp-button button-type="Danger" class="btn-rounded float-right replyCancelButton" text="@L["Cancel"].Value" />
</form>
</div>
</div>
</div>
}
@if (await Authorization.IsGrantedAsync(BloggingPermissions.Comments.Update) || (CurrentUser.Id == commentWithRepliesDto.Comment.CreatorId))
{
<div class="comment-form mt-4 editForm">
<div class="clearfix p-4">
<div>
<form class="editFormClass">
<input name="commentId" value="@commentWithRepliesDto.Comment.Id" hidden />
<div class="form-group">
<textarea class="form-control no-border" name="text" id="textBoxId" rows="4">@commentWithRepliesDto.Comment.Text</textarea>
</div>
<abp-button button-type="Primary" class="btn-rounded float-right" type="submit" text="@L["Submit"].Value" />
<abp-button button-type="Danger" class="btn-rounded float-right editCancelButton" text="@L["Cancel"].Value" />
</form>
</div>
</div>
</div>
}
@foreach (var reply in commentWithRepliesDto.Replies)
{
<div class="media">
<img gravatar-email="@reply.Writer.Email" default-image="Identicon" class="d-flex mr-3 rounded-circle comment-avatar" />
<div class="media-body">
<h5 class="comment-owner">
@(reply.Writer == null ? "" : reply.Writer.UserName)
<span>@ConvertDatetimeToTimeAgo(reply.CreationTime)</span>
</h5>
<p id="@reply.Id">
@reply.Text
</p>
<div class="comment-buttons">
@if (hasCommentingPermission)
{
<a href="#" class="tag replyLink" data-relpyid="@commentWithRepliesDto.Comment.Id">
<i class="fa fa-reply" aria-hidden="true"></i> @L["Reply"]
</a>
}
@if (await Authorization.IsGrantedAsync(BloggingPermissions.Comments.Delete) || (CurrentUser.Id == commentWithRepliesDto.Comment.CreatorId))
{
<span class="seperator">|</span>
<a href="#" class="tag deleteLink" data-deleteid="@reply.Id">
<i class="fa fa-trash" aria-hidden="true"></i> @L["Delete"]
</a>
}
@if (await Authorization.IsGrantedAsync(BloggingPermissions.Comments.Update) || (CurrentUser.Id == commentWithRepliesDto.Comment.CreatorId))
{
<span class="seperator">|</span>
<a href="#" class="tag updateLink" data-updateid="@reply.Id">
<i class="fa fa-pencil" aria-hidden="true"></i> @L["Edit"]
</a>
}
</div>
@if (hasCommentingPermission)
{
<div class="comment-form mt-4 replyForm">
<div class="clearfix bg-light p-4">
<h3 class="mt-0">
@L["ReplyTo", commentWithRepliesDto.Comment.Writer == null ? "" : commentWithRepliesDto.Comment.Writer.UserName]
</h3>
<div>
<form method="post">
<input name="postId" value="@Model.Post.Id" hidden />
<input name="repliedCommentId" value="@commentWithRepliesDto.Comment.Id" hidden />
<div class="form-group">
<textarea class="form-control no-border" name="text" id="textBoxId" rows="4"></textarea>
</div>
<abp-button button-type="Primary" class="btn-rounded float-right" type="submit" text="@L["Submit"].Value" />
<abp-button button-type="Danger" class="btn-rounded float-right replyCancelButton" text="@L["Cancel"].Value" />
</form>
</div>
</div>
</div>
}
@if (await Authorization.IsGrantedAsync(BloggingPermissions.Comments.Update) || (CurrentUser.Id == commentWithRepliesDto.Comment.CreatorId))
{
<div class="comment-form mt-4 editForm">
<div class="clearfix bg-light p-4">
<div>
<form class="editFormClass">
<input name="commentId" value="@reply.Id" hidden />
<div class="form-group">
<textarea class="form-control no-border" name="text" id="textBoxId" rows="4">@reply.Text</textarea>
</div>
<abp-button button-type="Primary" class="btn-rounded float-right" type="submit" text="@L["Submit"].Value" />
<abp-button button-type="Danger" class="btn-rounded float-right editCancelButton" text="@L["Cancel"].Value" />
</form>
</div>
</div>
</div>
}
</div>
</div>
}
</div>
</div>
}
</div>
}
@if (hasCommentingPermission)
{
<div class="comment-form mt-4" id="LeaveComment">
<div class="vs-blog-title mb-0">
<h3>@L["LeaveComment"]</h3>
</div>
<div class="clearfix bg-light p-4">
<div>
<form method="post">
<input name="postId" value="@Model.Post.Id" hidden />
<input name="repliedCommentId" id="repliedCommentId" hidden />
<div class="form-group">
<textarea class="form-control no-border" name="text" id="textBoxId" rows="4"></textarea>
</div>
<abp-button button-type="Primary" class="btn-rounded float-right" type="submit" text="@L["Submit"].Value" />
</form>
</div>
</div>
</div>
}
else
{
<a abp-button="Primary" class="btn-rounded float-right active mt-3" href="/Account/Login?returnUrl=@Request.GetEncodedPathAndQuery()">@L["LeaveComment"]</a>
}
</div>
</div>
</div>
</div>

0
modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Posts/Detail.cshtml.cs → modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/Detail.cshtml.cs

4
modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Posts/Edit.cshtml → modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/Edit.cshtml

@ -9,13 +9,13 @@
@section styles {
<abp-style-bundle name="@typeof(EditModel).FullName">
<abp-style type="@typeof(TuiEditorStyleContributor)" />
<abp-style src="/Pages/Blog/Posts/new.css" />
<abp-style src="/Pages/Blogs/Posts/new.css" />
</abp-style-bundle>
}
@section scripts {
<abp-script-bundle name="@typeof(EditModel).FullName">
<abp-script type="@typeof(TuiEditorScriptContributor)" />
<abp-script src="/Pages/Blog/Posts/edit.js" />
<abp-script src="/Pages/Blogs/Posts/edit.js" />
</abp-script-bundle>
}

0
modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Posts/Edit.cshtml.cs → modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/Edit.cshtml.cs

10
modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Posts/Index.cshtml → modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/Index.cshtml

@ -12,13 +12,13 @@
@section scripts {
<abp-script-bundle name="@typeof(IndexModel).FullName">
<abp-script type="@typeof(OwlCarouselScriptContributor)" />
<abp-script src="/Pages/Blog/Shared/Scripts/blog.js" />
<abp-script src="/Pages/Blogs/Shared/Scripts/blog.js" />
</abp-script-bundle>
}
@section styles {
<abp-style-bundle name="@typeof(IndexModel).FullName">
<abp-script type="@typeof(OwlCarouselStyleContributor)" />
<abp-style src="/Pages/Blog/Shared/Styles/blog.css" />
<abp-style src="/Pages/Blogs/Shared/Styles/blog.css" />
</abp-style-bundle>
}
@ -69,7 +69,7 @@
<p class="tags">
@foreach (var tag in post.Tags)
{
<a asp-page="/Blog/Posts/Index" asp-route-blogShortName="@Model.BlogShortName" asp-route-tagName="@tag.Name" class="tag">@tag.Name</a>
<a asp-page="/Blogs/Posts/Index" asp-route-blogShortName="@Model.BlogShortName" asp-route-tagName="@tag.Name" class="tag">@tag.Name</a>
}
</p>
@ -178,7 +178,7 @@
<p class="tags">
@foreach (var tag in post.Tags)
{
<a asp-page="/Blog/Posts/Index" asp-route-blogShortName="@Model.BlogShortName" asp-route-tagName="@tag.Name" class="tag">@tag.Name</a>
<a asp-page="/Blogs/Posts/Index" asp-route-blogShortName="@Model.BlogShortName" asp-route-tagName="@tag.Name" class="tag">@tag.Name</a>
}
</p>
</div>
@ -200,7 +200,7 @@
@foreach (var popularTag in Model.PopularTags)
{
<div class="list-group-item">
<a asp-page="/Blog/Posts/Index" asp-route-blogShortName="@Model.BlogShortName" asp-route-tagName="@popularTag.Name">@popularTag.Name <span>(@popularTag.UsageCount @L["Posts"])</span></a>
<a asp-page="/Blogs/Posts/Index" asp-route-blogShortName="@Model.BlogShortName" asp-route-tagName="@popularTag.Name">@popularTag.Name <span>(@popularTag.UsageCount @L["Posts"])</span></a>
</div>
}

0
modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Posts/Index.cshtml.cs → modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/Index.cshtml.cs

0
modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Posts/Index.css → modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/Index.css

0
modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Posts/Index.min.css → modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/Index.min.css

0
modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Posts/Index.scss → modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/Index.scss

4
modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Posts/New.cshtml → modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/New.cshtml

@ -9,13 +9,13 @@
@section styles {
<abp-style-bundle name="@typeof(NewModel).FullName">
<abp-style type="@typeof(TuiEditorStyleContributor)" />
<abp-style src="/Pages/Blog/Posts/new.css" />
<abp-style src="/Pages/Blogs/Posts/new.css" />
</abp-style-bundle>
}
@section scripts {
<abp-script-bundle name="@typeof(NewModel).FullName">
<abp-script type="@typeof(TuiEditorScriptContributor)" />
<abp-script src="/Pages/Blog/Posts/new.js" />
<abp-script src="/Pages/Blogs/Posts/new.js" />
</abp-script-bundle>
}
<main>

0
modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Posts/New.cshtml.cs → modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/New.cshtml.cs

0
modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Posts/detail.js → modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/detail.js

0
modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Posts/edit.js → modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/edit.js

0
modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Posts/new.css → modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/new.css

0
modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Posts/new.css.map → modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/new.css.map

0
modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Posts/new.js → modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/new.js

0
modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Posts/new.min.css → modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/new.min.css

0
modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Posts/new.scss → modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/new.scss

0
modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Shared/Scripts/blog.js → modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Shared/Scripts/blog.js

0
modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Shared/Styles/_bootstrap-overwrite.scss → modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Shared/Styles/_bootstrap-overwrite.scss

0
modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Shared/Styles/_custom.scss → modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Shared/Styles/_custom.scss

0
modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Shared/Styles/_header.scss → modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Shared/Styles/_header.scss

0
modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Shared/Styles/_home.css → modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Shared/Styles/_home.css

0
modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Shared/Styles/_home.min.css → modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Shared/Styles/_home.min.css

0
modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Shared/Styles/_home.scss → modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Shared/Styles/_home.scss

0
modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Shared/Styles/_post.scss → modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Shared/Styles/_post.scss

0
modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Shared/Styles/blog.css → modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Shared/Styles/blog.css

0
modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Shared/Styles/blog.css.map → modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Shared/Styles/blog.css.map

0
modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Shared/Styles/blog.min.css → modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Shared/Styles/blog.min.css

0
modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Shared/Styles/blog.scss → modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Shared/Styles/blog.scss

0
modules/blogging/src/Volo.Blogging.Web/Pages/Blog/_ViewImports.cshtml → modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/_ViewImports.cshtml

Loading…
Cancel
Save