site group improvements
This commit is contained in:
@@ -97,6 +97,7 @@
|
||||
Alias = PageState.Alias,
|
||||
Site = new Site
|
||||
{
|
||||
SiteId = PageState.Site.SiteId,
|
||||
DefaultContainerType = PageState.Site.DefaultContainerType,
|
||||
Settings = PageState.Site.Settings,
|
||||
Themes = PageState.Site.Themes
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
<button type="button" data-bs-dismiss="offcanvas" class="btn btn-primary col-12" @onclick=@(async () => Navigate("Admin"))>@Localizer["AdminDash"]</button>
|
||||
</div>
|
||||
</div>
|
||||
@if (_siteGroups.Any(item => item.Type == SiteGroupTypes.Synchronization || item.Type == SiteGroupTypes.Comparison))
|
||||
@if (_siteGroups.Any(item => (item.Type == SiteGroupTypes.Synchronization || item.Type == SiteGroupTypes.Comparison) && item.PrimarySiteId == PageState.Site.SiteId))
|
||||
{
|
||||
<hr class="app-rule" />
|
||||
<button type="button" class="btn btn-secondary col-12 mt-1" @onclick="SynchronizeSite">@Localizer["Synchronize"]</button>
|
||||
@@ -642,7 +642,7 @@
|
||||
|
||||
private async Task SynchronizeSite()
|
||||
{
|
||||
foreach (var group in _siteGroups.Where(item => item.Type == SiteGroupTypes.Synchronization || item.Type == SiteGroupTypes.Comparison))
|
||||
foreach (var group in _siteGroups.Where(item => (item.Type == SiteGroupTypes.Synchronization || item.Type == SiteGroupTypes.Comparison) && item.PrimarySiteId == PageState.Site.SiteId))
|
||||
{
|
||||
group.Synchronize = true;
|
||||
await SiteGroupService.UpdateSiteGroupAsync(group);
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
{
|
||||
@if (_contentLocalization)
|
||||
{
|
||||
<a class="dropdown-item" href="@(PageState.Alias.Protocol + language.AliasName)">@language.Name</a>
|
||||
<a class="dropdown-item @(PageState.Site.CultureCode == language.Code ? "active" : String.Empty)" href="@(PageState.Alias.Protocol + language.AliasName)" data-enhance-nav="false">@language.Name</a>
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user