FruitBank/Presentation/Nop.Web/Views/Shared/Components/Footer/Default.cshtml

170 lines
7.5 KiB
Plaintext

@model FooterModel
@using Nop.Core
@using Nop.Core.Domain.Tax
@using Nop.Core.Domain.Topics
@inject IWorkContext workContext
<div class="footer">
<div class="footer-upper">
<div class="footer-block information">
<div class="title">
<strong>@T("Footer.Information")</strong>
</div>
<ul class="list">
@if (Model.SitemapEnabled && Model.DisplaySitemapFooterItem)
{
<li><a href="@Url.RouteUrl("Sitemap")">@T("Sitemap")</a></li>
}
@foreach (var topic in Model.Topics.Where(x => x.IncludeInFooterColumn1).ToList())
{
<li><a href="@(Url.RouteUrl<Topic>(new { SeName = topic.SeName }))">@topic.Name</a></li>
}
@if (Model.DisplayContactUsFooterItem)
{
<li><a href="@Url.RouteUrl("ContactUs")">@T("ContactUs")</a></li>
}
</ul>
</div>
<div class="footer-block customer-service">
<div class="title">
<strong>@T("Footer.CustomerService")</strong>
</div>
<ul class="list">
@if (Model.SearchEnabled && Model.DisplayProductSearchFooterItem)
{
<li><a href="@Url.RouteUrl("ProductSearch")">@T("Search")</a> </li>
}
@if (Model.NewsEnabled && Model.DisplayNewsFooterItem)
{
<li><a href="@Url.RouteUrl("NewsArchive")">@T("News")</a></li>
}
@if (Model.BlogEnabled && Model.DisplayBlogFooterItem)
{
<li><a href="@Url.RouteUrl("Blog")">@T("Blog")</a></li>
}
@if (Model.ForumEnabled && Model.DisplayForumsFooterItem)
{
<li><a href="@Url.RouteUrl("Boards")">@T("Forum.Forums")</a></li>
}
@if (Model.RecentlyViewedProductsEnabled && Model.DisplayRecentlyViewedProductsFooterItem)
{
<li><a href="@Url.RouteUrl("RecentlyViewedProducts")">@T("Products.RecentlyViewedProducts")</a></li>
}
@if (Model.CompareProductsEnabled && Model.DisplayCompareProductsFooterItem)
{
<li><a href="@Url.RouteUrl("CompareProducts")">@T("Products.Compare.List")</a></li>
}
@if (Model.NewProductsEnabled && Model.DisplayNewProductsFooterItem)
{
<li><a href="@Url.RouteUrl("NewProducts")">@T("Products.NewProducts")</a></li>
}
@foreach (var topic in Model.Topics.Where(x => x.IncludeInFooterColumn2).ToList())
{
<li><a href="@(Url.RouteUrl<Topic>(new { SeName = topic.SeName }))">@topic.Name</a></li>
}
@if (Model.AllowCustomersToCheckGiftCardBalance)
{
<li><a href="@Url.RouteUrl("CheckGiftCardBalance")">@T("CheckGiftCardBalance")</a></li>
}
</ul>
</div>
<div class="footer-block my-account">
<div class="title">
<strong>@T("Footer.MyAccount")</strong>
</div>
<ul class="list">
@if (Model.DisplayCustomerInfoFooterItem)
{
<li><a href="@Url.RouteUrl("CustomerInfo")">@T("Account.MyAccount")</a></li>
}
@if (Model.DisplayCustomerOrdersFooterItem)
{
<li><a href="@Url.RouteUrl("CustomerOrders")">@T("Account.CustomerOrders")</a></li>
}
@if (Model.DisplayCustomerAddressesFooterItem)
{
<li><a href="@Url.RouteUrl("CustomerAddresses")">@T("Account.CustomerAddresses")</a></li>
}
@if (Model.ShoppingCartEnabled && Model.DisplayShoppingCartFooterItem)
{
<li><a href="@Url.RouteUrl("ShoppingCart")">@T("ShoppingCart")</a></li>
}
@if (Model.WishlistEnabled && Model.DisplayWishlistFooterItem)
{
<li><a href="@Url.RouteUrl("Wishlist")">@T("Wishlist")</a></li>
}
@if (Model.AllowCustomersToApplyForVendorAccount && Model.DisplayApplyVendorAccountFooterItem)
{
<li><a href="@Url.RouteUrl("ApplyVendorAccount")">@T("Vendors.ApplyAccount")</a></li>
}
@foreach (var topic in Model.Topics.Where(x => x.IncludeInFooterColumn3).ToList())
{
<li><a href="@(Url.RouteUrl<Topic>(new { SeName = topic.SeName }))">@topic.Name</a></li>
}
</ul>
</div>
<div class="footer-block follow-us">
<div class="social">
<div class="title">
<strong>@T("Footer.FollowUs")</strong>
</div>
@await Component.InvokeAsync(typeof(SocialButtonsViewComponent))
</div>
@await Component.InvokeAsync(typeof(NewsletterBoxViewComponent))
</div>
</div>
<div class="footer-lower">
<div class="footer-info">
<span class="footer-disclaimer">@T("Content.CopyrightNotice", DateTime.Now.Year, Model.StoreName)</span>
@if (Model.DisplayTaxShippingInfoFooter)
{
var inclTax = await workContext.GetTaxDisplayTypeAsync() == TaxDisplayType.IncludingTax;
<span class="footer-tax-shipping">
@T(inclTax ? "Footer.TaxShipping.InclTax" : "Footer.TaxShipping.ExclTax", Url.RouteTopicUrl("shippinginfo"))
</span>
}
</div>
@if (!Model.HidePoweredByNopCommerce)
{
<div class="footer-powered-by">
@*Would you like to remove the "Powered by nopCommerce" link in the bottom of the footer?
Please find more info at https://www.nopcommerce.com/nopcommerce-copyright-removal-key*@
Powered by <a href="@(OfficialSite.Main)" target="_blank" @(Model.IsHomePage ? string.Empty : "rel=nofollow")>nopCommerce</a>
</div>
}
@await Component.InvokeAsync(typeof(StoreThemeSelectorViewComponent))
</div>
@await Component.InvokeAsync(typeof(WidgetViewComponent), new { widgetZone = PublicWidgetZones.Footer, additionalData = Model })
</div>
<script asp-location="Footer">
$(function() {
$('.footer-block .title').on('click', function () {
var e = window, a = 'inner';
if (!('innerWidth' in window)) {
a = 'client';
e = document.documentElement || document.body;
}
var result = { width: e[a + 'Width'], height: e[a + 'Height'] };
if (result.width < 769) {
$(this).siblings('.list').slideToggle('slow');
}
});
});
</script>
<script asp-location="Footer">
$(function() {
$('.block .title').on('click', function () {
var e = window, a = 'inner';
if (!('innerWidth' in window)) {
a = 'client';
e = document.documentElement || document.body;
}
var result = { width: e[a + 'Width'], height: e[a + 'Height'] };
if (result.width < 1001) {
$(this).siblings('.listbox').slideToggle('slow');
}
});
});
</script>