<?php $dataVendorFile = $data->vendorFilePublished;
if(!empty($dataVendorFile)): 
?>
<tr>
    <td class="text-left">
        <?php echo $dataVendorFile->id ?: ''; ?>
    </td>
    <td>
        <?php echo $dataVendorFile->vendor->name ?: ''; ?>
    </td>
    <td>
        <small><?php echo $dataVendorFile->fileupload->original_filename ?: ''; ?></small>
    </td>
    <td class="text-left">
        <span class="badge"><?php echo ($dataVendorFile->total_product != '' ? (int) $dataVendorFile->total_product : ''); ?></span>
    </td>
    <td class="text-left">
        <?php echo ($data->status != '' ? VendorFile::getStatusLabelWithColor($dataVendorFile->status) : ''); ?>
    </td>
    <td class="text-left">
        <small><?php echo (isset($dataVendorFile->date_published) ? ZCommon::formatDate($dataVendorFile->date_published).' (EST)' : ''); ?></small>
    </td>
    <td class="text-left">
        <?php 
            echo CHtml::link('<span class="glyphicon glyphicon-cloud-upload"></span> Republish', 
            ['uploadVendorSpreadsheet/republish', 
                'id' => $dataVendorFile->id, 
                'toggleGoogle' => 'true'
            ], 
            ['class' => 'btn btn-success btn-sm republish-file text-left', 'data-id' => $dataVendorFile->id]);
        ?>
    </td>
</tr>

<?php endif; ?>