@using MrCMS.Web.Apps.Ecommerce.Helpers
@using MrCMS.Web.Apps.Ecommerce.Models
@model MrCMS.Web.Apps.Ecommerce.Entities.ProductReviews.ProductReview
           
@{
    var unhelpfulcount = ViewData["unhelpful-count"] is int ? (int) ViewData["unhelpful-count"] : 0;
    var helpfulcount = ViewData["helpful-count"] is int ? (int)ViewData["helpful-count"] : 0;
}
<div class="margin-top-10">
    <div class="pull-left">
        <strong>Is this helpful?</strong>
    </div>
    <div class="pull-right">
        <span class="glyphicon glyphicon-thumbs-up" aria-hidden="true"></span>
        @Model.Upvotes()
        |
        <span class="glyphicon glyphicon-thumbs-down" aria-hidden="true"></span>
        @Model.Downvotes()
    </div>
    <div class="clearfix">
    </div>
</div>





<div class="pull-left">
    @using (Html.BeginForm("HelpfulnessVotes", "ProductReview", new { ProductReviewId = Model.Id }, FormMethod.Post))
    {
        <button type="submit" class="btn btn-default"><span class="glyphicon glyphicon-thumbs-up" aria-hidden="true"></span></button>
    }
</div>
<div class="pull-left">
    @using (Html.BeginForm("UnhelpfulnessVotes", "ProductReview", new { ProductReviewId = Model.Id }, FormMethod.Post))
    {
        <button type="submit" class="btn btn-default"><span class="glyphicon glyphicon-thumbs-down" aria-hidden="true"></span></button>
    }
</div>
<div class="clearfix">
</div>

