|
|
|
@ -1,27 +1,35 @@ |
|
|
|
@page "/products/{id:guid}" |
|
|
|
@using EShopOnAbp.Localization |
|
|
|
@using EShopOnAbp.PublicWeb.Components.Basket |
|
|
|
@using Microsoft.Extensions.Localization |
|
|
|
@using System.Globalization |
|
|
|
@using Microsoft.Extensions.Options |
|
|
|
@using Volo.Abp.GlobalFeatures |
|
|
|
@using Volo.Abp.Http.Client |
|
|
|
@using Volo.Abp.Users |
|
|
|
@using Volo.CmsKit.GlobalFeatures |
|
|
|
@using Volo.CmsKit.Public.Comments |
|
|
|
@using Volo.CmsKit.Public.Web.Pages.CmsKit.Shared.Components.Commenting |
|
|
|
@using Volo.CmsKit.Public.Web.Pages.CmsKit.Shared.Components.Rating |
|
|
|
@model EShopOnAbp.PublicWeb.Pages.ProductDetailModel |
|
|
|
@inject IStringLocalizer<EShopOnAbpResource> L |
|
|
|
@inject IOptions<AbpRemoteServiceOptions> options |
|
|
|
@inject ICurrentUser CurrentUser |
|
|
|
|
|
|
|
@section styles{ |
|
|
|
<abp-style src="/Pages/index.css" /> |
|
|
|
} |
|
|
|
|
|
|
|
@section scripts { |
|
|
|
@section scripts { |
|
|
|
<abp-script src="/client-proxies/basket-proxy.js" /> |
|
|
|
<abp-script src="/Pages/index.js" /> |
|
|
|
} |
|
|
|
|
|
|
|
<div class="container"> |
|
|
|
<div class="row justify-content-center"> |
|
|
|
<div class="col-lg-6 col-md-6 col-sm-6 "> |
|
|
|
<div class="product-list"> |
|
|
|
@{ |
|
|
|
<div class="container"> |
|
|
|
<div class="row justify-content-center"> |
|
|
|
<div class="col-lg-6 col-md-6 col-sm-6 "> |
|
|
|
<div class="product-list"> |
|
|
|
@{ |
|
|
|
var product = Model.Product; |
|
|
|
var productPrice = product.Price.ToString("C", new CultureInfo("en-US")); |
|
|
|
string productImage = !product.ImageName.IsNullOrEmpty() ? $"{options.Value.RemoteServices.Default.BaseUrl}product-images/{product.ImageName}" : $"{options.Value.RemoteServices.Default.BaseUrl}product-images/@product.ImageName"; |
|
|
|
@ -48,8 +56,24 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
} |
|
|
|
} |
|
|
|
</div> |
|
|
|
|
|
|
|
<abp-row> |
|
|
|
<abp-column size-md="_6"> |
|
|
|
@if (GlobalFeatureManager.Instance.IsEnabled<RatingsFeature>()) |
|
|
|
{ |
|
|
|
@*@await Component.InvokeAsync(typeof(RatingViewComponent), new {entityType = "quote", entityId = "2"})*@ |
|
|
|
} |
|
|
|
</abp-column> |
|
|
|
<abp-column size-md="_12"> |
|
|
|
@if (GlobalFeatureManager.Instance.IsEnabled<CommentsFeature>()) |
|
|
|
{ |
|
|
|
@await Component.InvokeAsync(typeof(CommentingViewComponent), new {entityType = "quote", entityId = @product.Id.ToString()}) |
|
|
|
} |
|
|
|
</abp-column> |
|
|
|
</abp-row> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |