diff --git a/modules/blogging/src/Volo.Blogging.Web/BloggingWebModule.cs b/modules/blogging/src/Volo.Blogging.Web/BloggingWebModule.cs index dd8d65ea6b..743734911d 100644 --- a/modules/blogging/src/Volo.Blogging.Web/BloggingWebModule.cs +++ b/modules/blogging/src/Volo.Blogging.Web/BloggingWebModule.cs @@ -1,4 +1,5 @@ -using Microsoft.AspNetCore.Mvc.RazorPages; +using System; +using Microsoft.AspNetCore.Mvc.RazorPages; using Microsoft.AspNetCore.Routing; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Options; @@ -79,7 +80,7 @@ namespace Volo.Blogging options.IgnoredPaths.AddRange(new[] { "error", "ApplicationConfigurationScript", "ServiceProxyScript", "Languages/Switch", - "ApplicationLocalizationScript" + "ApplicationLocalizationScript", "members" }); }); @@ -91,11 +92,16 @@ namespace Volo.Blogging var routePrefix = urlOptions.RoutePrefix; + if (!routePrefix.IsNullOrWhiteSpace()) + { + options.Conventions.AddPageRoute("/Blogs/Index", routePrefix); + } + options.Conventions.AddPageRoute("/Blogs/Posts/Index", routePrefix + "{blogShortName:blogNameConstraint}"); options.Conventions.AddPageRoute("/Blogs/Posts/Detail", routePrefix + "{blogShortName:blogNameConstraint}/{postUrl}"); options.Conventions.AddPageRoute("/Blogs/Posts/Edit", routePrefix + "{blogShortName}/posts/{postId}/edit"); options.Conventions.AddPageRoute("/Blogs/Posts/New", routePrefix + "{blogShortName}/posts/new"); - options.Conventions.AddPageRoute("/Members/Index", routePrefix + "members/{userName}"); + options.Conventions.AddPageRoute("/Blogs/Members/Index", routePrefix + "members/{userName}"); }); Configure(options => diff --git a/modules/blogging/src/Volo.Blogging.Web/Pages/Members/Index.cshtml b/modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Members/Index.cshtml similarity index 98% rename from modules/blogging/src/Volo.Blogging.Web/Pages/Members/Index.cshtml rename to modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Members/Index.cshtml index ae68a1561a..e0465ba57a 100644 --- a/modules/blogging/src/Volo.Blogging.Web/Pages/Members/Index.cshtml +++ b/modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Members/Index.cshtml @@ -5,7 +5,7 @@ @using Volo.Abp.Users @using Volo.Blogging.Areas.Blog.Helpers.TagHelpers @using Volo.Blogging.Localization -@model Volo.Blogging.Pages.Members.IndexModel +@model Volo.Blogging.Pages.Blogs.Members.IndexModel @inject IStringLocalizer L @inject ICurrentUser CurrentUser @{ @@ -13,11 +13,11 @@ } @section scripts { - + } @section styles { - + }
diff --git a/modules/blogging/src/Volo.Blogging.Web/Pages/Members/Index.cshtml.cs b/modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Members/Index.cshtml.cs similarity index 97% rename from modules/blogging/src/Volo.Blogging.Web/Pages/Members/Index.cshtml.cs rename to modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Members/Index.cshtml.cs index 43cd31fd4a..acff24cc4f 100644 --- a/modules/blogging/src/Volo.Blogging.Web/Pages/Members/Index.cshtml.cs +++ b/modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Members/Index.cshtml.cs @@ -8,7 +8,7 @@ using Volo.Blogging.Blogs; using Volo.Blogging.Members; using Volo.Blogging.Posts; -namespace Volo.Blogging.Pages.Members; +namespace Volo.Blogging.Pages.Blogs.Members; public class IndexModel : AbpPageModel { diff --git a/modules/blogging/src/Volo.Blogging.Web/Pages/Members/Index.css b/modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Members/Index.css similarity index 100% rename from modules/blogging/src/Volo.Blogging.Web/Pages/Members/Index.css rename to modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Members/Index.css diff --git a/modules/blogging/src/Volo.Blogging.Web/Pages/Members/Index.js b/modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Members/Index.js similarity index 100% rename from modules/blogging/src/Volo.Blogging.Web/Pages/Members/Index.js rename to modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Members/Index.js diff --git a/modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/Detail.cshtml b/modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/Detail.cshtml index 9a65911d3b..20b4ed3dc2 100644 --- a/modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/Detail.cshtml +++ b/modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/Detail.cshtml @@ -67,7 +67,7 @@
@if (Model.Post.Writer != null) { - + User Avatar } @@ -76,7 +76,7 @@ @if (Model.Post.Writer != null) {
- + @(Model.Post.Writer.UserName) @BloggingPageHelper.GetLocalizedTimeAgoText(Model.Post.CreationTime) @@ -141,7 +141,7 @@ @if (Model.LatestPosts.Count > 1) @@ -194,14 +194,14 @@ {
- + @(post.Writer!.UserName)
@@ -456,13 +456,13 @@ else var post = Model.PostsList[index];
- +