Webiant Logo Webiant Logo
  1. No results found.

    Try your search with a different keyword or use * as a wildcard.

_AdminLayout.cshtml

@inject IWebHelper webHelper
@inject IDateTimeHelper dateTimeHelper
@inject IPermissionService permissionService
@inject ICustomerService customerService
@inject IEventPublisher eventPublisher
@inject LocalizationSettings localizationSettings
@inject StoreInformationSettings storeInformationSettings
@inject Nop.Services.Localization.ILanguageService languageService
@using Nop.Core.Domain
@using Nop.Core.Domain.Localization
@using Nop.Services.Customers
@using Nop.Services.Helpers
@using Nop.Services.Security


@{
    var returnUrl = webHelper.GetRawUrl(Context.Request);

    //page title
    string adminPageTitle = !string.IsNullOrWhiteSpace(ViewBag.PageTitle) ? ViewBag.PageTitle + " / " : "";
    adminPageTitle += T("Admin.PageTitle").Text;

    //has "Manage Maintenance" permission?
    var canManageMaintenance = await permissionService.AuthorizeAsync(StandardPermissionProvider.ManageMaintenance);

    //avatar
    var currentCustomer = await workContext.GetCurrentCustomerAsync();

    //event
    await eventPublisher.PublishAsync(new PageRenderingEvent(NopHtml));

    //info: we specify "Admin" area for actions and widgets here for cases when we use this layout in a plugin that is running in a different area than "admin"
}



    @adminPageTitle
    
    
    @NopHtml.GenerateHeadCustom()

    @* CSS & Script resources *@
    @{
        await Html.RenderPartialAsync("_AdminScripts");
    }

    @*Insert favicon and app icons head code*@
    @await Component.InvokeAsync(typeof(FaviconViewComponent))


    

@T("Common.Wait")

 
@if (IsSectionDefined("header")) { @RenderSection("header") } else { @await Component.InvokeAsync(typeof(AdminWidgetViewComponent), new { widgetZone = AdminWidgetZones.HeaderBefore }) @await Component.InvokeAsync(typeof(AdminWidgetViewComponent), new { widgetZone = AdminWidgetZones.HeaderAfter }) } @if (IsSectionDefined("headermenu")) { @RenderSection("headermenu") } else { }
@await Html.PartialAsync("Notifications") @RenderBody()
@{ //scroll to a selected card (if specified) var selectedCardName = Html.GetSelectedCardName(); if (!String.IsNullOrEmpty(selectedCardName)) { } } @NopHtml.GenerateScripts(ResourceLocation.Footer) @NopHtml.GenerateInlineScripts(ResourceLocation.Footer)