docs: #292 adding GanjoorCategory.Published field to ModifyPage editor
This commit is contained in:
parent
3c9d380ee2
commit
44cd564566
@ -129,7 +129,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span class="inputlabel">منتشر شده (فقط شعر - فعلا استفاده نشده)</span>
|
||||
<span class="inputlabel">منت شر شده (فقط شعر یا دسته - فعلا استفاده نشده)</span>
|
||||
</td>
|
||||
<td>
|
||||
<input type="checkbox" asp-for="ModifyModel.Published" />
|
||||
|
||||
@ -136,7 +136,7 @@ namespace GanjooRazor.Areas.Admin.Pages
|
||||
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 ? true : PageInformation.Poem.Published,
|
||||
Published = PageInformation.Poem == null ? (PageInformation.GanjoorPageType == GanjoorPageType.CatPage ? PageInformation.PoetOrCat.Cat.Published : true) : PageInformation.Poem.Published,
|
||||
};
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -32,6 +32,11 @@ namespace RMuseum.Models.Ganjoor.ViewModels
|
||||
/// </summary>
|
||||
public int MixedModeOrder { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// published
|
||||
/// </summary>
|
||||
public bool Published { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Next Category without Ancestors/Children/Poems info
|
||||
/// </summary>
|
||||
|
||||
@ -7398,6 +7398,11 @@
|
||||
order when mixed with poems
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:RMuseum.Models.Ganjoor.ViewModels.GanjoorCatViewModel.Published">
|
||||
<summary>
|
||||
published
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:RMuseum.Models.Ganjoor.ViewModels.GanjoorCatViewModel.Next">
|
||||
<summary>
|
||||
Next Category without Ancestors/Children/Poems info
|
||||
|
||||
@ -192,6 +192,7 @@ namespace RMuseum.Services.Implementation
|
||||
UrlSlug = parent.UrlSlug,
|
||||
FullUrl = parent.FullUrl,
|
||||
MixedModeOrder = parent.MixedModeOrder,
|
||||
Published = parent.Published,
|
||||
});
|
||||
|
||||
parent = await _context.GanjoorCategories.Where(c => c.Id == parent.ParentId).AsNoTracking().FirstOrDefaultAsync();
|
||||
@ -216,6 +217,7 @@ namespace RMuseum.Services.Implementation
|
||||
UrlSlug = c.UrlSlug,
|
||||
FullUrl = c.FullUrl,
|
||||
MixedModeOrder = c.MixedModeOrder,
|
||||
Published = c.Published,
|
||||
//other fields null
|
||||
}
|
||||
).AsNoTracking().SingleOrDefaultAsync();
|
||||
@ -238,6 +240,7 @@ namespace RMuseum.Services.Implementation
|
||||
UrlSlug = c.UrlSlug,
|
||||
FullUrl = c.FullUrl,
|
||||
MixedModeOrder = c.MixedModeOrder,
|
||||
Published = c.Published,
|
||||
//other fields null
|
||||
}
|
||||
).AsNoTracking().SingleOrDefaultAsync();
|
||||
@ -249,6 +252,7 @@ namespace RMuseum.Services.Implementation
|
||||
UrlSlug = cat.UrlSlug,
|
||||
FullUrl = cat.FullUrl,
|
||||
MixedModeOrder = cat.MixedModeOrder,
|
||||
Published = cat.Published,
|
||||
Next = nextCat,
|
||||
Previous = preCat,
|
||||
Ancestors = ancetors,
|
||||
@ -261,6 +265,7 @@ namespace RMuseum.Services.Implementation
|
||||
UrlSlug = c.UrlSlug,
|
||||
FullUrl = c.FullUrl,
|
||||
MixedModeOrder = c.MixedModeOrder,
|
||||
Published = c.Published,
|
||||
}
|
||||
).AsNoTracking().ToListAsync(),
|
||||
Poems = poems ? await _context.GanjoorPoems.Include(p => p.GanjoorMetre)
|
||||
@ -2696,6 +2701,7 @@ namespace RMuseum.Services.Implementation
|
||||
cat.FullUrl = dbPage.FullUrl;
|
||||
}
|
||||
|
||||
cat.Published = pageData.Published;
|
||||
cat.MixedModeOrder = pageData.MixedModeOrder;
|
||||
|
||||
_context.GanjoorCategories.Update(cat);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user