docs: #292 adding new cat fields to poet pages
This commit is contained in:
parent
a7029a19dd
commit
10977f9368
@ -128,7 +128,7 @@
|
||||
</tr>
|
||||
}
|
||||
|
||||
@if (Model.PageInformation.GanjoorPageType == RMuseum.Models.Ganjoor.GanjoorPageType.CatPage || Model.PageInformation.GanjoorPageType == RMuseum.Models.Ganjoor.GanjoorPageType.PoemPage)
|
||||
@if (Model.PageInformation.GanjoorPageType == RMuseum.Models.Ganjoor.GanjoorPageType.CatPage || Model.PageInformation.GanjoorPageType == RMuseum.Models.Ganjoor.GanjoorPageType.PoetPage || Model.PageInformation.GanjoorPageType == RMuseum.Models.Ganjoor.GanjoorPageType.PoemPage)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@ -149,7 +149,7 @@
|
||||
}
|
||||
|
||||
|
||||
@if (Model.PageInformation.GanjoorPageType == RMuseum.Models.Ganjoor.GanjoorPageType.CatPage)
|
||||
@if (Model.PageInformation.GanjoorPageType == RMuseum.Models.Ganjoor.GanjoorPageType.CatPage || Model.PageInformation.GanjoorPageType == RMuseum.Models.Ganjoor.GanjoorPageType.PoetPage )
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
@ -135,12 +135,12 @@ namespace GanjooRazor.Areas.Admin.Pages
|
||||
NoIndex = PageInformation.NoIndex,
|
||||
RedirectFromFullUrl = PageInformation.RedirectFromFullUrl,
|
||||
Language = PageInformation.Poem == null ? null : PageInformation.Poem.Language,
|
||||
MixedModeOrder = PageInformation.Poem == null ? (PageInformation.GanjoorPageType == GanjoorPageType.CatPage ? PageInformation.PoetOrCat.Cat.MixedModeOrder : 0) : PageInformation.Poem.MixedModeOrder,
|
||||
Published = PageInformation.Poem == null ? (PageInformation.GanjoorPageType == GanjoorPageType.CatPage ? PageInformation.PoetOrCat.Cat.Published : true) : PageInformation.Poem.Published,
|
||||
TableOfContentsStyle = PageInformation.GanjoorPageType == GanjoorPageType.CatPage ? PageInformation.PoetOrCat.Cat.TableOfContentsStyle : GanjoorTOC.Analyse,
|
||||
CatType = PageInformation.GanjoorPageType == GanjoorPageType.CatPage ? PageInformation.PoetOrCat.Cat.CatType : GanjoorCatType.Default,
|
||||
Description = PageInformation.GanjoorPageType == GanjoorPageType.CatPage ? PageInformation.PoetOrCat.Cat.Description : "",
|
||||
DescriptionHtml = PageInformation.GanjoorPageType == GanjoorPageType.CatPage ? PageInformation.PoetOrCat.Cat.DescriptionHtml : ""
|
||||
MixedModeOrder = PageInformation.Poem == null ? (PageInformation.GanjoorPageType == GanjoorPageType.CatPage || PageInformation.GanjoorPageType == GanjoorPageType.PoetPage ? PageInformation.PoetOrCat.Cat.MixedModeOrder : 0) : PageInformation.Poem.MixedModeOrder,
|
||||
Published = PageInformation.Poem == null ? (PageInformation.GanjoorPageType == GanjoorPageType.CatPage || PageInformation.GanjoorPageType == GanjoorPageType.PoetPage ? PageInformation.PoetOrCat.Cat.Published : true) : PageInformation.Poem.Published,
|
||||
TableOfContentsStyle = PageInformation.GanjoorPageType == GanjoorPageType.CatPage || PageInformation.GanjoorPageType == GanjoorPageType.PoetPage ? PageInformation.PoetOrCat.Cat.TableOfContentsStyle : GanjoorTOC.Analyse,
|
||||
CatType = PageInformation.GanjoorPageType == GanjoorPageType.CatPage || PageInformation.GanjoorPageType == GanjoorPageType.PoetPage ? PageInformation.PoetOrCat.Cat.CatType : GanjoorCatType.Default,
|
||||
Description = PageInformation.GanjoorPageType == GanjoorPageType.CatPage || PageInformation.GanjoorPageType == GanjoorPageType.PoetPage ? PageInformation.PoetOrCat.Cat.Description : "",
|
||||
DescriptionHtml = PageInformation.GanjoorPageType == GanjoorPageType.CatPage || PageInformation.GanjoorPageType == GanjoorPageType.PoetPage ? PageInformation.PoetOrCat.Cat.DescriptionHtml : ""
|
||||
};
|
||||
GanjoorTOC = ModifyModel.TableOfContentsStyle;
|
||||
return true;
|
||||
|
||||
@ -2672,7 +2672,7 @@ namespace RMuseum.Services.Implementation
|
||||
bool messWithTitles = dbPage.Title != pageData.Title;
|
||||
bool messWithUrls = dbPage.UrlSlug != pageData.UrlSlug;
|
||||
|
||||
if(dbPage.GanjoorPageType == GanjoorPageType.CatPage)
|
||||
if(dbPage.GanjoorPageType == GanjoorPageType.CatPage || dbPage.GanjoorPageType == GanjoorPageType.PoetPage)
|
||||
{
|
||||
GanjoorCat cat = await _context.GanjoorCategories.Where(c => c.Id == dbPage.CatId).SingleAsync();
|
||||
cat.Published = pageData.Published;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user