<div>
    <?php if (empty($data ['orders'])):?>
        <div class="ulp-additional-message"><?php _e('You have no Orders yet!', 'ulp');?></div>
    <?php else : ?>
        <table class="ulp-table-general ulp-list-orders">
            <thead>
                <tr>
                    <th><?php _e('Course', 'ulp');?></th>
                    <th><?php _e('Amount', 'ulp');?></th>
                    <th><?php _e('Date', 'ulp');?></th>
                    <?php if ($data ['show_invoices']):?>
                        <th><?php _e('Invoices', 'ulp');?></th>
                    <?php endif;?>
                    <th><?php _e('Status', 'ulp');?></th>
                </tr>
            </thead>
            <tbody>
                <?php foreach ($data ['orders'] as $object):?>
                    <tr>
                        <td class="ulp-special-column"><a href="<?php echo Ulp_Permalinks::getForCourse($object->metas['course_id']);?>" target="_blank"><?php echo $object->metas['course_label'];?></a></td>
                        <td><?php echo ulp_format_price($object->metas['amount']);?></td>
                        <td><?php echo ulp_print_date_like_wp($object->post_date);?></td>
                        <?php if ($data ['show_invoices']):?>
                            <td><i class="fa-ulp fa-invoice-preview-ulp ulp-pointer" onclick="ulpOpenInvoice(<?php echo $object->ID;?>);"></i></td>
                        <?php endif;?>
                        <td><strong><?php echo ulp_convert_order_status_to_readable_str($object->post_status);?></strong></td>
                    </tr>
                <?php endforeach;?>
            </tbody>
        </table>
    <?php endif;?>
</div>
