blog admin separation: fixes & enhancements

pull/4236/head
Yunus Emre Kalkan 5 years ago
parent 61dbb7c139
commit 589960e529

@ -33,6 +33,7 @@ using Volo.Abp.Threading;
using Volo.Abp.UI;
using Volo.Abp.VirtualFileSystem;
using Volo.Blogging;
using Volo.Blogging.Admin;
using Volo.Blogging.Files;
using Volo.BloggingTestApp.EntityFrameworkCore;
using Volo.BloggingTestApp.MongoDB;
@ -42,6 +43,8 @@ namespace Volo.BloggingTestApp
[DependsOn(
typeof(BloggingWebModule),
typeof(BloggingApplicationModule),
typeof(BloggingAdminWebModule),
typeof(BloggingAdminApplicationModule),
#if MONGODB
typeof(BloggingTestAppMongoDbModule),
#else
@ -105,12 +108,12 @@ namespace Volo.BloggingTestApp
options.CustomSchemaIds(type => type.FullName);
});
var cultures = new List<CultureInfo>
{
new CultureInfo("cs"),
new CultureInfo("en"),
new CultureInfo("tr"),
new CultureInfo("zh-Hans")
var cultures = new List<CultureInfo>
{
new CultureInfo("cs"),
new CultureInfo("en"),
new CultureInfo("tr"),
new CultureInfo("zh-Hans")
};
Configure<RequestLocalizationOptions>(options =>

@ -26,6 +26,8 @@
<ProjectReference Include="..\Volo.BloggingTestApp.EntityFrameworkCore\Volo.BloggingTestApp.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\src\Volo.Blogging.Application\Volo.Blogging.Application.csproj" />
<ProjectReference Include="..\..\src\Volo.Blogging.Web\Volo.Blogging.Web.csproj" />
<ProjectReference Include="..\..\src\Volo.Blogging.Admin.Application\Volo.Blogging.Admin.Application.csproj" />
<ProjectReference Include="..\..\src\Volo.Blogging.Admin.Web\Volo.Blogging.Admin.Web.csproj" />
<ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.Autofac\Volo.Abp.Autofac.csproj" />
<ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic\Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.csproj" />
<ProjectReference Include="..\..\..\..\modules\identity\src\Volo.Abp.Identity.Application\Volo.Abp.Identity.Application.csproj" />

@ -18,7 +18,7 @@ namespace Volo.Blogging.Admin
{
options.Resources
.Get<BloggingResource>()
.AddVirtualJson("Volo/Blogging/Localization/Resources/Blogging/Admin/ApplicationContracts");
.AddVirtualJson("Volo/Blogging/Admin/Localization/Resources/Blogging/Admin/ApplicationContracts");
});
}
}

@ -1,7 +1,7 @@
{
"culture": "en",
"texts": {
"Permission:BloggingAdmin": "Blog",
"Permission:BloggingAdmin": "Blogging",
"Permission:Blogs": "Blogs",
"Permission:Management": "Management",
"Permission:Edit": "Edit",

@ -28,7 +28,7 @@ namespace Volo.Blogging.Admin
managementRootMenuItem.AddItem(new ApplicationMenuItem("BlogManagement.Blogs", l["Menu:Blogs"], "~/Blogging/Admin/Blogs"));
}
context.Menu.AddItem(managementRootMenuItem);
context.Menu.GetAdministration().AddItem(managementRootMenuItem);
}
}
}

@ -40,7 +40,7 @@ namespace Volo.Blogging.Admin
Configure<AbpVirtualFileSystemOptions>(options =>
{
options.FileSets.AddEmbedded<BloggingAdminWebModule>("Volo.Blogging");
options.FileSets.AddEmbedded<BloggingAdminWebModule>("Volo.Blogging.Admin");
});
context.Services.AddAutoMapperObjectMapper<BloggingAdminWebModule>();

@ -7,7 +7,7 @@
}
<abp-dynamic-form submit-button="false" abp-model="Blog" asp-page="/Admin/Blogs/Create">
<abp-dynamic-form submit-button="false" abp-model="Blog" asp-page="/Blogging/Admin/Blogs/Create">
<abp-modal size="@(AbpModalSize.Large)">
<abp-modal-header title="@L["Create"].Value"></abp-modal-header>
<abp-modal-body>

@ -6,7 +6,7 @@
Layout = null;
}
<abp-dynamic-form abp-model="Blog" asp-page="/Admin/Blogs/Edit">
<abp-dynamic-form abp-model="Blog" asp-page="/Blogging/Admin/Blogs/Edit">
<abp-modal size="@(AbpModalSize.Large)">
<abp-modal-header title="@L["Edit"].Value"></abp-modal-header>
<abp-modal-body>

@ -1,17 +1,20 @@
@page
@using Microsoft.AspNetCore.Authorization
@using Volo.Blogging.Admin
@using Volo.Blogging.Admin.Pages.Blogging.Admin.Blogs
@inherits Volo.Blogging.Admin.Pages.Blogging.BloggingAdminPage
@model Volo.Blogging.Admin.Pages.Blogging.Admin.Blogs.IndexModel
@model IndexModel
@inject IAuthorizationService Authorization
@{
ViewBag.PageTitle = "Blogs";
}
@section scripts {
<abp-script src="/Pages/Blogging/Admin/Blogs/index.js" />
<abp-script src="/Pages/Blogging/Admin/Blogs/create.js" />
<abp-script src="/Pages/Blogging/Admin/Blogs/edit.js" />
<abp-script-bundle name="@typeof(IndexModel).FullName">
<abp-script src="/Pages/Blogging/Admin/Blogs/index.js"/>
<abp-script src="/Pages/Blogging/Admin/Blogs/create.js"/>
<abp-script src="/Pages/Blogging/Admin/Blogs/edit.js"/>
</abp-script-bundle>
}
<abp-card>
@ -31,13 +34,13 @@
<abp-card-body>
<abp-table striped-rows="true" id="BlogsTable" class="nowrap">
<thead>
<tr>
<th>@L["Actions"]</th>
<th>@L["Name"]</th>
<th>@L["ShortName"]</th>
<th>@L["CreationTime"]</th>
<th>@L["Description"]</th>
</tr>
<tr>
<th>@L["Actions"]</th>
<th>@L["Name"]</th>
<th>@L["ShortName"]</th>
<th>@L["CreationTime"]</th>
<th>@L["Description"]</th>
</tr>
</thead>
</abp-table>
</abp-card-body>

@ -22,7 +22,7 @@
[
{
text: l('Edit'),
visible: abp.auth.isGranted('Blogging.Blog.Update'),
visible: abp.auth.isGranted('Blogging.Admin.Blog.Update'),
action: function (data) {
_editModal.open({
blogId: data.record.id
@ -31,10 +31,10 @@
},
{
text: l('Delete'),
visible: abp.auth.isGranted('Blogging.Blog.Delete'),
visible: abp.auth.isGranted('Blogging.Admin.Blog.Delete'),
confirmMessage: function (data) { return l('BlogDeletionWarningMessage') },
action: function (data) {
volo.blogging.blogs
volo.blogging.admin.blogManagement
.delete(data.record.id)
.then(function () {
_dataTable.ajax.reload();

@ -29,57 +29,6 @@
<Content Remove="Pages\**\*.css" />
<Content Remove="compilerconfig.json" />
<Content Remove="Properties\launchSettings.json" />
<Content Update="Pages\Admin\Blogs\Create.cshtml">
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
</Content>
<Content Update="Pages\Admin\Blogs\Edit.cshtml">
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
</Content>
<Content Update="Pages\Admin\Blogs\Index.cshtml">
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
</Content>
<EmbeddedResource Update="Pages\Blogs\Posts\Index.min.css">
<DependentUpon>Index.css</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Update="Pages\Blogs\Posts\new.min.css">
<DependentUpon>new.css</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Update="Pages\Blogs\Shared\Styles\blog.min.css">
<DependentUpon>blog.css</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Update="Pages\Blogs\Shared\Styles\_home.min.css">
<DependentUpon>_home.css</DependentUpon>
</EmbeddedResource>
<Content Update="Pages\_ViewImports.cshtml">
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<None Include="compilerconfig.json" />
<None Include="Properties\launchSettings.json" />
<None Update="Pages\Blogs\Posts\new.css.map">
<DependentUpon>new.css</DependentUpon>
</None>
<None Update="Pages\Blogs\Shared\Styles\blog.css.map">
<DependentUpon>blog.css</DependentUpon>
</None>
</ItemGroup>
<ItemGroup>
<Compile Update="Pages\Admin\Blogs\Create.cshtml.cs">
<DependentUpon>Create.cshtml</DependentUpon>
</Compile>
<Compile Update="Pages\Admin\Blogs\Edit.cshtml.cs">
<DependentUpon>Edit.cshtml</DependentUpon>
</Compile>
<Compile Update="Pages\Admin\Blogs\Index.cshtml.cs">
<DependentUpon>Index.cshtml</DependentUpon>
</Compile>
</ItemGroup>
</Project>

@ -6,4 +6,5 @@
"Permission:Posts": "Objave",
"Permission:Tags": "Oznake",
"Permission:Comments": "Komentarji"
}
}

@ -1,10 +1,10 @@
{
"culture": "zh-Hans",
"texts": {
"Permission:Blogging": "博客",
"Permission:Blogs": "博客",
"Permission:Posts": "帖子",
"Permission:Tags": "标签",
"Permission:Comments": "评论"
}
"culture": "zh-Hans",
"texts": {
"Permission:Blogging": "博客",
"Permission:Blogs": "博客",
"Permission:Posts": "帖子",
"Permission:Tags": "标签",
"Permission:Comments": "评论"
}
}

@ -1,10 +1,10 @@
{
"culture": "zh-Hant",
"texts": {
"Permission:Blogging": "部落格",
"Permission:Blogs": "部落格",
"Permission:Posts": "文章",
"Permission:Tags": "標籤",
"Permission:Comments": "評論"
}
"culture": "zh-Hant",
"texts": {
"Permission:Blogging": "部落格",
"Permission:Blogs": "部落格",
"Permission:Posts": "文章",
"Permission:Tags": "標籤",
"Permission:Comments": "評論"
}
}

@ -2,7 +2,7 @@
"culture": "en",
"texts": {
"Menu:Blogs": "Blogs",
"Menu:BlogManagement": "Blog Management",
"Menu:BlogManagement": "Blogging",
"Title": "Title",
"Delete": "Delete",
"Reply": "Reply",
@ -46,4 +46,4 @@
"ShareOn": "Share on",
"TitleLengthWarning": "Keep your title size under 60 characters to be SEO friendly!"
}
}
}

@ -33,10 +33,4 @@
<None Include="Properties\launchSettings.json" />
</ItemGroup>
<ItemGroup>
<_ContentIncludedByDefault Remove="Pages\Admin\Blogs\Create.cshtml" />
<_ContentIncludedByDefault Remove="Pages\Admin\Blogs\Edit.cshtml" />
<_ContentIncludedByDefault Remove="Pages\Admin\Blogs\Index.cshtml" />
</ItemGroup>
</Project>

Loading…
Cancel
Save