<header class="admin-nav">
    <a class="nav-back" ng-click="$ctrl.back()"> <i class="fa fa-chevron-left"></i> Back</a>
    <p class="nav-title">LINKED REVIEWS</p>
</header>
<alert class="navbar-alert alert-ok" ng-show="activeOps>0">SAVING</alert>

<div class="sub-navbar sub-navbar">
    <div class="container">
        <div class="row insight-item">
            <div class="col-sm-1 col-md-1">
                <a class="btn btn-xs wide-side-button pale w-number-of-linked-reviews"  tooltip="Number of linked reviews">{{$ctrl.insight.reviewIds.length}}</a>
                <a class="btn btn-xs wide-side-button" ng-click="$ctrl.insight.published = !$ctrl.insight.published">PUBLISH</a>
            </div>
            <div class="col-sm-10 col-md-10">
                <p class="w-insight-text insight-text-input"> {{$ctrl.insight.text}}</p>
            </div>
        </div>
    </div>
</div>

<div class="container insights-container">

    <div class="row linked-review-item w-linked-review-item linked" ng-repeat="review in $ctrl.linkedReviews">
        <div class="col-sm-1 col-md-1">
            <a class="btn btn-xs wide-side-button w-unlink-linked-review" ng-click="$ctrl.unlinkReviewFromInsight(review, $ctrl.insight)">Linked</a>
        </div>
        <div class="col-sm-10 col-md-10">
            <h3 class="linked-review-title w-linked-review-title">{{review.review.subtitle||'Review Title'}}</h3><h3 class="review-id small">#{{$index+1}}</h3>
            <p ng-bind-html="review.review.html|unsafe" class="linked-review-body">
            </p>

            <h4 ng-show="review.review.pros && review.review.pros!=='' ">Pros</h4>
            <p  ng-show="review.review.pros && review.review.pros!=='' " ng-bind-html="review.review.pros|unsafe"></p>
            <h4 ng-show="review.review.cons && review.review.cons!=='' ">Cons</h4>
            <p  ng-show="review.review.cons && review.review.cons!=='' " ng-bind-html="review.review.cons|unsafe"></p>
            
        </div>
    </div>
    <div class="pagination-footer text-center" ng-hide="$ctrl.areReviewsFinished">
        <a class="btn w-go-to-next-page" ng-click="$ctrl.nextPage()">LOAD MORE REVIEW</a>
    </div>
    
</div>