
<div id='popover-content-div'><div id='line'><p>Order Status: <span><?php echo ($order->order_status_id==HoaOrderStatus::COMPLETED)?'Completed':'Pending'; ?></span></p></div>
<div id='line'><p><!--Lien ETA is between <span><?php /*$order->getEstimatedCompletedDateMin()*/ ?></span> and <span><?php /*$order->getEstimatedCompletedDateMax()*/ ?></span>.--></p></div>
    <div id='line'>
        <?php if($order->Details->count()==0): ?>
        <table width='300' border='0'>
            <tr>
                <th class='col-top-table-popover' scope='col'>Comp MGMT 1</th>
                <th class='col-top-table-popover' scope='col'></th>
            </tr>
            <tr>
                <th class='col-top-table-popover' scope='col'>Response Obtained</th>
                <th class='col-top-table-popover' scope='col'>Data Received</th>
            </tr>
            <tr>
                <td class='col-body-table-popover' scope='col'>Estoppel</td>
                <td class='col-body-table-popover' scope='col'></td>
            </tr>
            <tr>
                <td class='col-body-table-popover' scope='col'>Ledger</td>
                <td class='col-body-table-popover' scope='col'></td>
            </tr>
            <tr>
                <td class='col-body-table-popover' scope='col'>W9</td>
                <td class='col-body-table-popover' scope='col'></td>
            </tr>
        </table>
        <?php else: ?>
        <table width='300' border='0'>
            <?php foreach($order->getInformationForPopup() as $detail): ?>
            <tr>
                <th class='col-top-table-popover' scope='col'></th>
                <th class='col-top-table-popover' scope='col' <?php echo ($detail['hoa']['IsViolation'])?"style='color:red;'":""; ?>><?php echo $detail['hoa']['title']; ?></th>
                <th class='col-top-table-popover' scope='col'></th>
            </tr>
            <tr>
                <th class='col-top-table-popover' scope='col'></th>
                <th class='col-top-table-popover' scope='col'>Response Obtained</th>
                <th class='col-top-table-popover' scope='col'>Data Received</th>
            </tr>
            <?php foreach($detail['hoa']['documents'] as $document): ?>
            <tr>
                <td class='col-popover-table-popover'>
                    <?php if(!is_null($document['completedOn'])): ?>
                    <input id='popover-checkbox' type='checkbox' name='received' id='received' checked/>
                    <?php endif; ?>
                </td>
                <td class='col-body-table-popover' scope='col'><?php echo $document['title']; ?></td>
                <td class='col-body-table-popover' scope='col'><?php echo $document['completedOn']; ?></td>
            </tr>
            <?php endforeach; ?>

            <?php if(!is_null($detail['collector'])): ?>
            <tr><th class='col-top-table-popover' scope='col'></th>
                <th class='col-top-table-popover' scope='col' <?php echo ($detail['hoa']['IsViolation'])?"style='color:red;'":""; ?>><?php echo $detail['collector']['title']; ?></th>
                <th class='col-top-table-popover' scope='col'></th>
            </tr>
            <tr>
                <th class='col-top-table-popover' scope='col'></th>
                <th class='col-top-table-popover' scope='col'>Response Obtained</th>
                <th class='col-top-table-popover' scope='col'>Data Received</th>
            </tr>
            <?php foreach($detail['collector']['documents'] as $document): ?>
            <tr>
                <td class='col-popover-table-popover'>
                    <?php if(!is_null($document['completedOn'])): ?>
                    <input id='popover-checkbox' type='checkbox' name='received' id='received' checked/>
                    <?php endif; ?>
                </td>
                <td class='col-body-table-popover' scope='col'><?php echo $document['title']; ?></td>
                <td class='col-body-table-popover' scope='col'><?php echo $document['completedOn']; ?></td>
            </tr>
            <?php endforeach; ?>
            <?php endif; ?>
            <?php endforeach; ?>
        </table>
        <?php endif; ?>
    </div>
    <div id='line'><input id='popover-checkbox' type='checkbox' name='received' id='received' checked/> <p>= Received <span id='text-red-popover' >Red</span>= Dues/Violat/Liens</p></div> 
    <div id='popover-contact'><p>If you would like futher information you may contact our office</p>
    </div>
</div>