Re-recording 03_03
This commit is contained in:
@ -34,7 +34,7 @@
|
||||
}
|
||||
</p>
|
||||
<p>
|
||||
@Html.Rating(rating)
|
||||
@Html.Rating(rating)
|
||||
</p>
|
||||
<p>
|
||||
<a class="btn btn-sm btn-warning" href="@Url.Action("Add", "Cart", new { product.SKU })">
|
||||
|
||||
@ -1,10 +1,17 @@
|
||||
@model ProductRating
|
||||
@model HPlusSports.Models.ProductRating
|
||||
|
||||
<span title="@Model.Rating.GetValueOrDefault().ToString("N1")">
|
||||
@for (var i = 1; i <= 5; i++)
|
||||
{
|
||||
var starClass = (Model.Rating >= i) ? "star" : "star-empty";
|
||||
<span class="rating-star glyphicon glyphicon-@starClass"></span>
|
||||
}
|
||||
</span>
|
||||
<span>(@Model.ReviewCount)</span>
|
||||
@if (Model == null || Model.ReviewCount == 0)
|
||||
{
|
||||
<span><em>No Rating</em></span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span title="@Model.Rating.GetValueOrDefault().ToString("N1")">
|
||||
@for (var i = 1; i <= 5; i++)
|
||||
{
|
||||
var starClass = (Model.Rating >= i) ? "star" : "star-empty";
|
||||
<span class="Model-star glyphicon glyphicon-@starClass"></span>
|
||||
}
|
||||
</span>
|
||||
<span>(@Model.ReviewCount)</span>
|
||||
}
|
||||
Reference in New Issue
Block a user