diff --git a/modules/blogging/Volo.Blogging.sln b/modules/blogging/Volo.Blogging.sln
index ef368c71a0..607d2c3b1b 100644
--- a/modules/blogging/Volo.Blogging.sln
+++ b/modules/blogging/Volo.Blogging.sln
@@ -57,6 +57,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Blogging.Admin.HttpApi
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Blogging.Admin.HttpApi.Client", "src\Volo.Blogging.Admin.HttpApi.Client\Volo.Blogging.Admin.HttpApi.Client.csproj", "{58A63CC9-C886-448B-AB4E-068600294D86}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Blogging.Admin.Web", "src\Volo.Blogging.Admin.Web\Volo.Blogging.Admin.Web.csproj", "{DB75CA32-96A5-4D10-8DD0-E62A3D0DDBCB}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -147,6 +149,10 @@ Global
{58A63CC9-C886-448B-AB4E-068600294D86}.Debug|Any CPU.Build.0 = Debug|Any CPU
{58A63CC9-C886-448B-AB4E-068600294D86}.Release|Any CPU.ActiveCfg = Release|Any CPU
{58A63CC9-C886-448B-AB4E-068600294D86}.Release|Any CPU.Build.0 = Release|Any CPU
+ {DB75CA32-96A5-4D10-8DD0-E62A3D0DDBCB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {DB75CA32-96A5-4D10-8DD0-E62A3D0DDBCB}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {DB75CA32-96A5-4D10-8DD0-E62A3D0DDBCB}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {DB75CA32-96A5-4D10-8DD0-E62A3D0DDBCB}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -176,6 +182,7 @@ Global
{CB5DEBB3-5C2E-48E9-AA42-497575BCC7A4} = {BE2A423C-271E-469A-AD90-5640DEBEE9C1}
{59BBAF94-CC8E-4313-9143-F2F5C36A7C45} = {BE2A423C-271E-469A-AD90-5640DEBEE9C1}
{58A63CC9-C886-448B-AB4E-068600294D86} = {BE2A423C-271E-469A-AD90-5640DEBEE9C1}
+ {DB75CA32-96A5-4D10-8DD0-E62A3D0DDBCB} = {BE2A423C-271E-469A-AD90-5640DEBEE9C1}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {F2BAE819-78D4-407A-9201-22473B2850B0}
diff --git a/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/FodyWeavers.xsd b/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/FodyWeavers.xsd
new file mode 100644
index 0000000000..3f3946e282
--- /dev/null
+++ b/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/FodyWeavers.xsd
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.
+
+
+
+
+ A comma-separated list of error codes that can be safely ignored in assembly verification.
+
+
+
+
+ 'false' to turn off automatic generation of the XML Schema file.
+
+
+
+
+
\ No newline at end of file
diff --git a/modules/blogging/src/Volo.Blogging.Admin.HttpApi/FodyWeavers.xsd b/modules/blogging/src/Volo.Blogging.Admin.HttpApi/FodyWeavers.xsd
new file mode 100644
index 0000000000..3f3946e282
--- /dev/null
+++ b/modules/blogging/src/Volo.Blogging.Admin.HttpApi/FodyWeavers.xsd
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.
+
+
+
+
+ A comma-separated list of error codes that can be safely ignored in assembly verification.
+
+
+
+
+ 'false' to turn off automatic generation of the XML Schema file.
+
+
+
+
+
\ No newline at end of file
diff --git a/modules/blogging/src/Volo.Blogging.Admin.Web/AbpBloggingAdminWebAutoMapperProfile.cs b/modules/blogging/src/Volo.Blogging.Admin.Web/AbpBloggingAdminWebAutoMapperProfile.cs
new file mode 100644
index 0000000000..082daf9bae
--- /dev/null
+++ b/modules/blogging/src/Volo.Blogging.Admin.Web/AbpBloggingAdminWebAutoMapperProfile.cs
@@ -0,0 +1,16 @@
+using AutoMapper;
+using Volo.Blogging.Admin.Blogs;
+using Volo.Blogging.Admin.Pages.Blogging.Admin.Blogs;
+using EditModel = Volo.Blogging.Admin.Pages.Blogging.Admin.Blogs.EditModel;
+
+namespace Volo.Blogging.Admin
+{
+ public class AbpBloggingAdminWebAutoMapperProfile : Profile
+ {
+ public AbpBloggingAdminWebAutoMapperProfile()
+ {
+ CreateMap();
+ CreateMap();
+ }
+ }
+}
diff --git a/modules/blogging/src/Volo.Blogging.Web/BloggingMenuContributor.cs b/modules/blogging/src/Volo.Blogging.Admin.Web/BloggingAdminMenuContributor.cs
similarity index 63%
rename from modules/blogging/src/Volo.Blogging.Web/BloggingMenuContributor.cs
rename to modules/blogging/src/Volo.Blogging.Admin.Web/BloggingAdminMenuContributor.cs
index cac26eb312..935a924835 100644
--- a/modules/blogging/src/Volo.Blogging.Web/BloggingMenuContributor.cs
+++ b/modules/blogging/src/Volo.Blogging.Admin.Web/BloggingAdminMenuContributor.cs
@@ -1,13 +1,10 @@
-using Microsoft.AspNetCore.Authorization;
-using Microsoft.Extensions.DependencyInjection;
-using Microsoft.Extensions.Localization;
-using System.Threading.Tasks;
+using System.Threading.Tasks;
using Volo.Abp.UI.Navigation;
using Volo.Blogging.Localization;
-namespace Volo.Blogging
+namespace Volo.Blogging.Admin
{
- public class BloggingMenuContributor : IMenuContributor
+ public class BloggingAdminMenuContributor : IMenuContributor
{
public async Task ConfigureMenuAsync(MenuConfigurationContext context)
{
@@ -21,14 +18,14 @@ namespace Volo.Blogging
{
var l = context.GetLocalizer();
- if (await context.IsGrantedAsync(BloggingPermissions.Blogs.Management))
+ if (await context.IsGrantedAsync(BloggingAdminPermissions.Blogs.Management))
{
var managementRootMenuItem = new ApplicationMenuItem("BlogManagement", l["Menu:BlogManagement"]);
//TODO: Using the same permission. Reconsider.
- if (await context.IsGrantedAsync(BloggingPermissions.Blogs.Management))
+ if (await context.IsGrantedAsync(BloggingAdminPermissions.Blogs.Management))
{
- managementRootMenuItem.AddItem(new ApplicationMenuItem("BlogManagement.Blogs", l["Menu:Blogs"], "~/Admin/Blogs"));
+ managementRootMenuItem.AddItem(new ApplicationMenuItem("BlogManagement.Blogs", l["Menu:Blogs"], "~/Blogging/Admin/Blogs"));
}
context.Menu.AddItem(managementRootMenuItem);
diff --git a/modules/blogging/src/Volo.Blogging.Admin.Web/BloggingAdminWebModule.cs b/modules/blogging/src/Volo.Blogging.Admin.Web/BloggingAdminWebModule.cs
new file mode 100644
index 0000000000..f9fae675cd
--- /dev/null
+++ b/modules/blogging/src/Volo.Blogging.Admin.Web/BloggingAdminWebModule.cs
@@ -0,0 +1,53 @@
+using Microsoft.Extensions.DependencyInjection;
+using Volo.Abp.AspNetCore.Mvc.Localization;
+using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap;
+using Volo.Abp.AspNetCore.Mvc.UI.Bundling;
+using Volo.Abp.AutoMapper;
+using Volo.Abp.Modularity;
+using Volo.Abp.UI.Navigation;
+using Volo.Abp.VirtualFileSystem;
+using Volo.Blogging.Localization;
+
+namespace Volo.Blogging.Admin
+{
+ [DependsOn(
+ typeof(BloggingAdminHttpApiModule),
+ typeof(AbpAspNetCoreMvcUiBootstrapModule),
+ typeof(AbpAspNetCoreMvcUiBundlingModule),
+ typeof(AbpAutoMapperModule)
+ )]
+ public class BloggingAdminWebModule : AbpModule
+ {
+ public override void PreConfigureServices(ServiceConfigurationContext context)
+ {
+ context.Services.PreConfigure(options =>
+ {
+ options.AddAssemblyResource(typeof(BloggingResource), typeof(BloggingAdminWebModule).Assembly);
+ });
+
+ PreConfigure(mvcBuilder =>
+ {
+ mvcBuilder.AddApplicationPartIfNotExists(typeof(BloggingAdminWebModule).Assembly);
+ });
+ }
+
+ public override void ConfigureServices(ServiceConfigurationContext context)
+ {
+ Configure(options =>
+ {
+ options.MenuContributors.Add(new BloggingAdminMenuContributor());
+ });
+
+ Configure(options =>
+ {
+ options.FileSets.AddEmbedded("Volo.Blogging");
+ });
+
+ context.Services.AddAutoMapperObjectMapper();
+ Configure(options =>
+ {
+ options.AddProfile(validate: true);
+ });
+ }
+ }
+}
diff --git a/modules/blogging/src/Volo.Blogging.Admin.Web/FodyWeavers.xml b/modules/blogging/src/Volo.Blogging.Admin.Web/FodyWeavers.xml
new file mode 100644
index 0000000000..be0de3a908
--- /dev/null
+++ b/modules/blogging/src/Volo.Blogging.Admin.Web/FodyWeavers.xml
@@ -0,0 +1,3 @@
+
+
+
\ No newline at end of file
diff --git a/modules/blogging/src/Volo.Blogging.Admin.Web/FodyWeavers.xsd b/modules/blogging/src/Volo.Blogging.Admin.Web/FodyWeavers.xsd
new file mode 100644
index 0000000000..3f3946e282
--- /dev/null
+++ b/modules/blogging/src/Volo.Blogging.Admin.Web/FodyWeavers.xsd
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.
+
+
+
+
+ A comma-separated list of error codes that can be safely ignored in assembly verification.
+
+
+
+
+ 'false' to turn off automatic generation of the XML Schema file.
+
+
+
+
+
\ No newline at end of file
diff --git a/modules/blogging/src/Volo.Blogging.Web/Pages/Admin/Blogs/Create.cshtml b/modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/Create.cshtml
similarity index 80%
rename from modules/blogging/src/Volo.Blogging.Web/Pages/Admin/Blogs/Create.cshtml
rename to modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/Create.cshtml
index d9b2ab6cdf..b338ad3980 100644
--- a/modules/blogging/src/Volo.Blogging.Web/Pages/Admin/Blogs/Create.cshtml
+++ b/modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/Create.cshtml
@@ -1,8 +1,7 @@
@page
@using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Modal
-@using Volo.Blogging.Pages.Blog
-@inherits BloggingPage
-@model Volo.Blogging.Pages.Admin.Blogs.CreateModel
+@inherits Volo.Blogging.Admin.Pages.Blogging.BloggingAdminPage
+@model Volo.Blogging.Admin.Pages.Blogging.Admin.Blogs.CreateModel
@{
Layout = null;
}
diff --git a/modules/blogging/src/Volo.Blogging.Web/Pages/Admin/Blogs/Create.cshtml.cs b/modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/Create.cshtml.cs
similarity index 72%
rename from modules/blogging/src/Volo.Blogging.Web/Pages/Admin/Blogs/Create.cshtml.cs
rename to modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/Create.cshtml.cs
index f8c40a1b01..a24d94932e 100644
--- a/modules/blogging/src/Volo.Blogging.Web/Pages/Admin/Blogs/Create.cshtml.cs
+++ b/modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/Create.cshtml.cs
@@ -2,23 +2,20 @@ using System.ComponentModel.DataAnnotations;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
-using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form;
-using Volo.Abp.AspNetCore.Mvc.UI.RazorPages;
+using Volo.Blogging.Admin.Blogs;
using Volo.Blogging.Blogs;
-using Volo.Blogging.Blogs.Dtos;
-using Volo.Blogging.Pages.Blog;
-namespace Volo.Blogging.Pages.Admin.Blogs
+namespace Volo.Blogging.Admin.Pages.Blogging.Admin.Blogs
{
- public class CreateModel : BloggingPageModel
+ public class CreateModel : BloggingAdminPageModel
{
- private readonly IBlogAppService _blogAppService;
+ private readonly IBlogManagementAppService _blogAppService;
private readonly IAuthorizationService _authorization;
[BindProperty]
public BlogCreateModalView Blog { get; set; } = new BlogCreateModalView();
- public CreateModel(IBlogAppService blogAppService, IAuthorizationService authorization)
+ public CreateModel(IBlogManagementAppService blogAppService, IAuthorizationService authorization)
{
_blogAppService = blogAppService;
_authorization = authorization;
@@ -26,7 +23,7 @@ namespace Volo.Blogging.Pages.Admin.Blogs
public virtual async Task OnGetAsync()
{
- if (!await _authorization.IsGrantedAsync(BloggingPermissions.Blogs.Create))
+ if (!await _authorization.IsGrantedAsync(BloggingAdminPermissions.Blogs.Create))
{
return Redirect("/");
}
@@ -59,4 +56,4 @@ namespace Volo.Blogging.Pages.Admin.Blogs
}
}
-}
\ No newline at end of file
+}
diff --git a/modules/blogging/src/Volo.Blogging.Web/Pages/Admin/Blogs/Edit.cshtml b/modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/Edit.cshtml
similarity index 76%
rename from modules/blogging/src/Volo.Blogging.Web/Pages/Admin/Blogs/Edit.cshtml
rename to modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/Edit.cshtml
index adf10f48ab..73e45d30be 100644
--- a/modules/blogging/src/Volo.Blogging.Web/Pages/Admin/Blogs/Edit.cshtml
+++ b/modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/Edit.cshtml
@@ -1,13 +1,11 @@
@page
@using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Modal
-@using Volo.Blogging.Pages.Blog
-@inherits BloggingPage
-@model Volo.Blogging.Pages.Admin.Blogs.EditModel
+@inherits Volo.Blogging.Admin.Pages.Blogging.BloggingAdminPage
+@model Volo.Blogging.Admin.Pages.Blogging.Admin.Blogs.EditModel
@{
Layout = null;
}
-
@@ -17,4 +15,4 @@
-
\ No newline at end of file
+
diff --git a/modules/blogging/src/Volo.Blogging.Web/Pages/Admin/Blogs/Edit.cshtml.cs b/modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/Edit.cshtml.cs
similarity index 78%
rename from modules/blogging/src/Volo.Blogging.Web/Pages/Admin/Blogs/Edit.cshtml.cs
rename to modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/Edit.cshtml.cs
index 9c40720261..21934d02b9 100644
--- a/modules/blogging/src/Volo.Blogging.Web/Pages/Admin/Blogs/Edit.cshtml.cs
+++ b/modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/Edit.cshtml.cs
@@ -1,20 +1,16 @@
using System;
using System.ComponentModel.DataAnnotations;
-using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
-using Volo.Abp.AspNetCore.Mvc.UI.RazorPages;
+using Volo.Blogging.Admin.Blogs;
using Volo.Blogging.Blogs;
-using Volo.Blogging.Blogs.Dtos;
-using Volo.Blogging.Pages.Blog;
-using Volo.Blogging.Posts;
-namespace Volo.Blogging.Pages.Admin.Blogs
+namespace Volo.Blogging.Admin.Pages.Blogging.Admin.Blogs
{
- public class EditModel : BloggingPageModel
+ public class EditModel : BloggingAdminPageModel
{
- private readonly IBlogAppService _blogAppService;
+ private readonly IBlogManagementAppService _blogAppService;
private readonly IAuthorizationService _authorization;
[BindProperty(SupportsGet = true)]
@@ -23,7 +19,7 @@ namespace Volo.Blogging.Pages.Admin.Blogs
[BindProperty]
public BlogEditViewModel Blog { get; set; } = new BlogEditViewModel();
- public EditModel(IBlogAppService blogAppService, IAuthorizationService authorization)
+ public EditModel(IBlogManagementAppService blogAppService, IAuthorizationService authorization)
{
_blogAppService = blogAppService;
_authorization = authorization;
@@ -31,7 +27,7 @@ namespace Volo.Blogging.Pages.Admin.Blogs
public virtual async Task OnGetAsync()
{
- if (!await _authorization.IsGrantedAsync(BloggingPermissions.Blogs.Update))
+ if (!await _authorization.IsGrantedAsync(BloggingAdminPermissions.Blogs.Update))
{
return Redirect("/");
}
@@ -74,5 +70,5 @@ namespace Volo.Blogging.Pages.Admin.Blogs
}
}
-
-}
\ No newline at end of file
+
+}
diff --git a/modules/blogging/src/Volo.Blogging.Web/Pages/Admin/Blogs/Index.cshtml b/modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/Index.cshtml
similarity index 75%
rename from modules/blogging/src/Volo.Blogging.Web/Pages/Admin/Blogs/Index.cshtml
rename to modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/Index.cshtml
index 375641331c..a52643499b 100644
--- a/modules/blogging/src/Volo.Blogging.Web/Pages/Admin/Blogs/Index.cshtml
+++ b/modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/Index.cshtml
@@ -1,18 +1,17 @@
@page
@using Microsoft.AspNetCore.Authorization
-@using Volo.Blogging
-@using Volo.Blogging.Pages.Blog
-@inherits BloggingPage
-@model Volo.Blogging.Pages.Admin.Blogs.IndexModel
+@using Volo.Blogging.Admin
+@inherits Volo.Blogging.Admin.Pages.Blogging.BloggingAdminPage
+@model Volo.Blogging.Admin.Pages.Blogging.Admin.Blogs.IndexModel
@inject IAuthorizationService Authorization
@{
ViewBag.PageTitle = "Blogs";
}
@section scripts {
-
-
-
+
+
+
}
@@ -22,7 +21,7 @@
@L["Blogs"]
- @if (await Authorization.IsGrantedAsync(BloggingPermissions.Blogs.Create))
+ @if (await Authorization.IsGrantedAsync(BloggingAdminPermissions.Blogs.Create))
{
}
diff --git a/modules/blogging/src/Volo.Blogging.Web/Pages/Admin/Blogs/Index.cshtml.cs b/modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/Index.cshtml.cs
similarity index 65%
rename from modules/blogging/src/Volo.Blogging.Web/Pages/Admin/Blogs/Index.cshtml.cs
rename to modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/Index.cshtml.cs
index 038f2e63f3..22a09389ef 100644
--- a/modules/blogging/src/Volo.Blogging.Web/Pages/Admin/Blogs/Index.cshtml.cs
+++ b/modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/Index.cshtml.cs
@@ -1,12 +1,10 @@
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
-using Volo.Abp.AspNetCore.Mvc.UI.RazorPages;
-using Volo.Blogging.Pages.Blog;
-namespace Volo.Blogging.Pages.Admin.Blogs
+namespace Volo.Blogging.Admin.Pages.Blogging.Admin.Blogs
{
- public class IndexModel : BloggingPageModel
+ public class IndexModel : BloggingAdminPageModel
{
private readonly IAuthorizationService _authorization;
@@ -17,7 +15,7 @@ namespace Volo.Blogging.Pages.Admin.Blogs
public virtual async Task OnGetAsync()
{
- if (!await _authorization.IsGrantedAsync(BloggingPermissions.Blogs.Management))
+ if (!await _authorization.IsGrantedAsync(BloggingAdminPermissions.Blogs.Management))
{
return Redirect("/");
}
@@ -25,4 +23,4 @@ namespace Volo.Blogging.Pages.Admin.Blogs
return Page();
}
}
-}
\ No newline at end of file
+}
diff --git a/modules/blogging/src/Volo.Blogging.Web/Pages/Admin/Blogs/create.js b/modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/create.js
similarity index 100%
rename from modules/blogging/src/Volo.Blogging.Web/Pages/Admin/Blogs/create.js
rename to modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/create.js
diff --git a/modules/blogging/src/Volo.Blogging.Web/Pages/Admin/Blogs/edit.js b/modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/edit.js
similarity index 100%
rename from modules/blogging/src/Volo.Blogging.Web/Pages/Admin/Blogs/edit.js
rename to modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/edit.js
diff --git a/modules/blogging/src/Volo.Blogging.Web/Pages/Admin/Blogs/index.js b/modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/index.js
similarity index 90%
rename from modules/blogging/src/Volo.Blogging.Web/Pages/Admin/Blogs/index.js
rename to modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/index.js
index c2a18e083d..8f97eb761e 100644
--- a/modules/blogging/src/Volo.Blogging.Web/Pages/Admin/Blogs/index.js
+++ b/modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/index.js
@@ -1,8 +1,8 @@
$(function () {
var l = abp.localization.getResource('Blogging');
- var _createModal = new abp.ModalManager(abp.appPath + 'Admin/Blogs/Create');
- var _editModal = new abp.ModalManager(abp.appPath + 'Admin/Blogs/Edit');
+ var _createModal = new abp.ModalManager(abp.appPath + 'Blogging/Admin/Blogs/Create');
+ var _editModal = new abp.ModalManager(abp.appPath + 'Blogging/Admin/Blogs/Edit');
var _dataTable = $('#BlogsTable').DataTable(abp.libs.datatables.normalizeConfiguration({
processing: true,
@@ -14,7 +14,7 @@
autoWidth: false,
scrollCollapse: true,
order: [[3, "desc"]],
- ajax: abp.libs.datatables.createAjax(volo.blogging.blogs.getList),
+ ajax: abp.libs.datatables.createAjax(volo.blogging.admin.blogManagement.getList),
columnDefs: [
{
rowAction: {
@@ -79,4 +79,4 @@
_dataTable.ajax.reload();
});
-});
\ No newline at end of file
+});
diff --git a/modules/blogging/src/Volo.Blogging.Admin.Web/Pages/BloggingAdminPage.cs b/modules/blogging/src/Volo.Blogging.Admin.Web/Pages/BloggingAdminPage.cs
new file mode 100644
index 0000000000..819c3aa3cd
--- /dev/null
+++ b/modules/blogging/src/Volo.Blogging.Admin.Web/Pages/BloggingAdminPage.cs
@@ -0,0 +1,17 @@
+using Microsoft.AspNetCore.Mvc.Localization;
+using Microsoft.AspNetCore.Mvc.Razor.Internal;
+using Volo.Abp.AspNetCore.Mvc.UI.RazorPages;
+using Volo.Blogging.Localization;
+
+namespace Volo.Blogging.Admin.Pages.Blogging
+{
+ public abstract class BloggingAdminPage : AbpPage
+ {
+ [RazorInject]
+ public IHtmlLocalizer L { get; set; }
+
+ public const string DefaultTitle = "Blogging";
+
+ public const int MaxShortContentLength = 200;
+ }
+}
diff --git a/modules/blogging/src/Volo.Blogging.Admin.Web/Pages/BloggingAdminPageModel.cs b/modules/blogging/src/Volo.Blogging.Admin.Web/Pages/BloggingAdminPageModel.cs
new file mode 100644
index 0000000000..67951fc08b
--- /dev/null
+++ b/modules/blogging/src/Volo.Blogging.Admin.Web/Pages/BloggingAdminPageModel.cs
@@ -0,0 +1,12 @@
+using Volo.Abp.AspNetCore.Mvc.UI.RazorPages;
+
+namespace Volo.Blogging.Admin.Pages
+{
+ public abstract class BloggingAdminPageModel : AbpPageModel
+ {
+ public BloggingAdminPageModel()
+ {
+ ObjectMapperContext = typeof(BloggingAdminWebModule);
+ }
+ }
+}
diff --git a/modules/blogging/src/Volo.Blogging.Admin.Web/Pages/_ViewImports.cshtml b/modules/blogging/src/Volo.Blogging.Admin.Web/Pages/_ViewImports.cshtml
new file mode 100644
index 0000000000..caae8c9ac5
--- /dev/null
+++ b/modules/blogging/src/Volo.Blogging.Admin.Web/Pages/_ViewImports.cshtml
@@ -0,0 +1,5 @@
+@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
+@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI
+@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI.Bootstrap
+@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI.Bundling
+@addTagHelper *, Volo.Blogging.Web
\ No newline at end of file
diff --git a/modules/blogging/src/Volo.Blogging.Admin.Web/Properties/launchSettings.json b/modules/blogging/src/Volo.Blogging.Admin.Web/Properties/launchSettings.json
new file mode 100644
index 0000000000..64a5fd912c
--- /dev/null
+++ b/modules/blogging/src/Volo.Blogging.Admin.Web/Properties/launchSettings.json
@@ -0,0 +1,27 @@
+{
+ "iisSettings": {
+ "windowsAuthentication": false,
+ "anonymousAuthentication": true,
+ "iisExpress": {
+ "applicationUrl": "http://localhost:50000/",
+ "sslPort": 0
+ }
+ },
+ "profiles": {
+ "IIS Express": {
+ "commandName": "IISExpress",
+ "launchBrowser": true,
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development"
+ }
+ },
+ "Volo.Blogging.Web": {
+ "commandName": "Project",
+ "launchBrowser": true,
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development"
+ },
+ "applicationUrl": "http://localhost:50014/"
+ }
+ }
+}
\ No newline at end of file
diff --git a/modules/blogging/src/Volo.Blogging.Admin.Web/Volo.Blogging.Admin.Web.csproj b/modules/blogging/src/Volo.Blogging.Admin.Web/Volo.Blogging.Admin.Web.csproj
new file mode 100644
index 0000000000..17898b5ca6
--- /dev/null
+++ b/modules/blogging/src/Volo.Blogging.Admin.Web/Volo.Blogging.Admin.Web.csproj
@@ -0,0 +1,85 @@
+
+
+
+
+
+
+ netcoreapp3.1
+ Volo.Blogging.Admin.Web
+ Volo.Blogging.Admin.Web
+ 2.8
+ Library
+ true
+ Volo.Blogging.Admin
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+ PreserveNewest
+
+
+ true
+ PreserveNewest
+
+
+ true
+ PreserveNewest
+
+
+ Index.css
+
+
+ new.css
+
+
+ blog.css
+
+
+ _home.css
+
+
+ true
+ PreserveNewest
+
+
+
+
+
+
+
+ new.css
+
+
+ blog.css
+
+
+
+
+
+ Create.cshtml
+
+
+ Edit.cshtml
+
+
+ Index.cshtml
+
+
+
+
diff --git a/modules/blogging/src/Volo.Blogging.Admin.Web/compilerconfig.json b/modules/blogging/src/Volo.Blogging.Admin.Web/compilerconfig.json
new file mode 100644
index 0000000000..d8e67fbeca
--- /dev/null
+++ b/modules/blogging/src/Volo.Blogging.Admin.Web/compilerconfig.json
@@ -0,0 +1,18 @@
+[
+ {
+ "outputFile": "Pages/Blog/Shared/Styles/blog.css",
+ "inputFile": "Pages/Blog/Shared/Styles/blog.scss"
+ },
+ {
+ "outputFile": "Pages/Blog/Shared/Styles/_home.css",
+ "inputFile": "Pages/Blog/Shared/Styles/_home.scss"
+ },
+ {
+ "outputFile": "Pages/Blog/Posts/Index.css",
+ "inputFile": "Pages/Blog/Posts/Index.scss"
+ },
+ {
+ "outputFile": "Pages/Blogs/Shared/Styles/blog.css",
+ "inputFile": "Pages/Blogs/Shared/Styles/blog.scss"
+ }
+]
\ No newline at end of file
diff --git a/modules/blogging/src/Volo.Blogging.Admin.Web/compilerconfig.json.defaults b/modules/blogging/src/Volo.Blogging.Admin.Web/compilerconfig.json.defaults
new file mode 100644
index 0000000000..c75eb7d519
--- /dev/null
+++ b/modules/blogging/src/Volo.Blogging.Admin.Web/compilerconfig.json.defaults
@@ -0,0 +1,49 @@
+{
+ "compilers": {
+ "less": {
+ "autoPrefix": "",
+ "cssComb": "none",
+ "ieCompat": true,
+ "strictMath": false,
+ "strictUnits": false,
+ "relativeUrls": true,
+ "rootPath": "",
+ "sourceMapRoot": "",
+ "sourceMapBasePath": "",
+ "sourceMap": false
+ },
+ "sass": {
+ "includePath": "",
+ "indentType": "space",
+ "indentWidth": 2,
+ "outputStyle": "nested",
+ "Precision": 5,
+ "relativeUrls": true,
+ "sourceMapRoot": "",
+ "sourceMap": false
+ },
+ "stylus": {
+ "sourceMap": false
+ },
+ "babel": {
+ "sourceMap": false
+ },
+ "coffeescript": {
+ "bare": false,
+ "runtimeMode": "node",
+ "sourceMap": false
+ }
+ },
+ "minifiers": {
+ "css": {
+ "enabled": true,
+ "termSemicolons": true,
+ "gzip": false
+ },
+ "javascript": {
+ "enabled": true,
+ "termSemicolons": true,
+ "gzip": false
+ }
+ }
+}
\ No newline at end of file
diff --git a/modules/blogging/src/Volo.Blogging.Web/AbpBloggingWebAutoMapperProfile.cs b/modules/blogging/src/Volo.Blogging.Web/AbpBloggingWebAutoMapperProfile.cs
index ccd4a02953..e5d40c6be3 100644
--- a/modules/blogging/src/Volo.Blogging.Web/AbpBloggingWebAutoMapperProfile.cs
+++ b/modules/blogging/src/Volo.Blogging.Web/AbpBloggingWebAutoMapperProfile.cs
@@ -1,12 +1,7 @@
using AutoMapper;
using Volo.Abp.AutoMapper;
-using Volo.Blogging.Blogs;
-using Volo.Blogging.Blogs.Dtos;
-using Volo.Blogging.Pages.Admin.Blogs;
using Volo.Blogging.Pages.Blog.Posts;
using Volo.Blogging.Posts;
-using EditModel = Volo.Blogging.Pages.Admin.Blogs.EditModel;
-using IndexModel = Volo.Blogging.Pages.Blog.IndexModel;
namespace Volo.Blogging
{
@@ -16,8 +11,6 @@ namespace Volo.Blogging
{
CreateMap().Ignore(x=>x.Tags);
CreateMap();
- CreateMap();
- CreateMap();
}
}
}
diff --git a/modules/blogging/src/Volo.Blogging.Web/BloggingWebModule.cs b/modules/blogging/src/Volo.Blogging.Web/BloggingWebModule.cs
index 432857686f..e238f48a37 100644
--- a/modules/blogging/src/Volo.Blogging.Web/BloggingWebModule.cs
+++ b/modules/blogging/src/Volo.Blogging.Web/BloggingWebModule.cs
@@ -37,11 +37,6 @@ namespace Volo.Blogging
public override void ConfigureServices(ServiceConfigurationContext context)
{
- Configure(options =>
- {
- options.MenuContributors.Add(new BloggingMenuContributor());
- });
-
Configure(options =>
{
options.FileSets.AddEmbedded("Volo.Blogging");
diff --git a/modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Index.cshtml.cs b/modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Index.cshtml.cs
index 2835b05dc5..32a451c8be 100644
--- a/modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Index.cshtml.cs
+++ b/modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Index.cshtml.cs
@@ -1,5 +1,4 @@
using System.Collections.Generic;
-using System.ComponentModel.DataAnnotations;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc.UI.RazorPages;
@@ -34,4 +33,4 @@ namespace Volo.Blogging.Pages.Blog
return Page();
}
}
-}
\ No newline at end of file
+}
diff --git a/modules/blogging/src/Volo.Blogging.Web/Volo.Blogging.Web.csproj b/modules/blogging/src/Volo.Blogging.Web/Volo.Blogging.Web.csproj
index 3760fa0539..62978d2a84 100644
--- a/modules/blogging/src/Volo.Blogging.Web/Volo.Blogging.Web.csproj
+++ b/modules/blogging/src/Volo.Blogging.Web/Volo.Blogging.Web.csproj
@@ -33,4 +33,10 @@
+
+ <_ContentIncludedByDefault Remove="Pages\Admin\Blogs\Create.cshtml" />
+ <_ContentIncludedByDefault Remove="Pages\Admin\Blogs\Edit.cshtml" />
+ <_ContentIncludedByDefault Remove="Pages\Admin\Blogs\Index.cshtml" />
+
+