<?php
/* Smarty version 3.1.33, created on 2024-01-08 13:05:29
  from '/home/excellentwriting/dashboard.topgradewriters.org/content/themes/dashboard/orders/orders.progress.tpl' */

/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
  'version' => '3.1.33',
  'unifunc' => 'content_659bf319034464_82109965',
  'has_nocache_code' => false,
  'file_dependency' => 
  array (
    'c8b5b41fdc28931a0467ecee8a7dfb00ff161a53' => 
    array (
      0 => '/home/excellentwriting/dashboard.topgradewriters.org/content/themes/dashboard/orders/orders.progress.tpl',
      1 => 1656689818,
      2 => 'file',
    ),
  ),
  'includes' => 
  array (
    'file:dashboard/orders/_filters.orders.tpl' => 1,
  ),
),false)) {
function content_659bf319034464_82109965 (Smarty_Internal_Template $_smarty_tpl) {
$_smarty_tpl->_loadInheritance();
$_smarty_tpl->inheritance->init($_smarty_tpl, true);
?>
 

<?php 
$_smarty_tpl->inheritance->instanceBlock($_smarty_tpl, 'Block_165546564659bf318f29cc0_04616212', 'content_wrapper');
?>

<?php $_smarty_tpl->inheritance->endChild($_smarty_tpl, 'dashboard/layout.tpl');
}
/* {block 'content_wrapper'} */
class Block_165546564659bf318f29cc0_04616212 extends Smarty_Internal_Block
{
public $subBlocks = array (
  'content_wrapper' => 
  array (
    0 => 'Block_165546564659bf318f29cc0_04616212',
  ),
);
public function callBlock(Smarty_Internal_Template $_smarty_tpl) {
$_smarty_tpl->_checkPlugins(array(0=>array('file'=>'/home/excellentwriting/dashboard.topgradewriters.org/vendor/smarty/smarty/libs/plugins/modifier.capitalize.php','function'=>'smarty_modifier_capitalize',),));
?>

    <div class="card">
        <div class="card-header with-icon">
            <i class="fa fa-flag mr10"></i>
            <strong>Orders</strong>
            <?php if ($_smarty_tpl->tpl_vars['sub_view']->value != '') {?>
                &rsaquo; <strong><?php echo htmlspecialchars(smarty_modifier_capitalize($_smarty_tpl->tpl_vars['sub_view']->value), ENT_QUOTES, 'UTF-8');?>
 (<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['total_orders']->value, ENT_QUOTES, 'UTF-8');?>
)</strong>
            <?php }?>
        </div>

        <div class="card-body">

            <?php if ($_smarty_tpl->tpl_vars['user']->value['is_admin'] || $_smarty_tpl->tpl_vars['user']->value['is_sub_admin']) {?>
                <?php $_smarty_tpl->_subTemplateRender('file:dashboard/orders/_filters.orders.tpl', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), 0, false);
?>
            <?php }?>

            <?php if (count($_smarty_tpl->tpl_vars['orders']->value)) {?>
                <div class="table-responsive">
                    <table class="table <?php if ($_smarty_tpl->tpl_vars['theme_mode_night']->value) {?>table-dark<?php }?> table-striped table-bordered table-hover js_dataTable">
                        <thead>
                            <tr>
                                <th>Order ID</th>
                                <th>Topic Title</th>
                                <th>Discipline</th>
                                <th>Deadline</th>
                                <th>Pages</th>
                                <th>COST</th>
                                <?php if ($_smarty_tpl->tpl_vars['user']->value['is_admin'] || $_smarty_tpl->tpl_vars['user']->value['is_sub_admin']) {?>
                                    <th>Writer</th>
                                    <th>Actions</th>
                                <?php }?>
                            </tr>
                        </thead>
                        <tbody>
                            <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['orders']->value, 'order');
if ($_from !== null) {
foreach ($_from as $_smarty_tpl->tpl_vars['order']->value) {
?>
                                <tr>
                                    <td>
                                        <?php if ($_smarty_tpl->tpl_vars['user']->value['is_admin'] || $_smarty_tpl->tpl_vars['user']->value['is_sub_admin']) {?>
                                            <div class="custom-control custom-checkbox"> 
                                                <input type="checkbox" class="custom-control-input" name="bulk_action" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['order']->value['id'], ENT_QUOTES, 'UTF-8');?>
" id="check-<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['order']->value['id'], ENT_QUOTES, 'UTF-8');?>
"> 
                                                <label class="custom-control-label" for="check-<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['order']->value['id'], ENT_QUOTES, 'UTF-8');?>
"><a class="fw-bold" href="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['base_uri']->value, ENT_QUOTES, 'UTF-8');?>
/order/<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['order']->value['id'], ENT_QUOTES, 'UTF-8');?>
">#<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['order']->value['id'], ENT_QUOTES, 'UTF-8');?>
</a></label>
                                            </div>
                                        <?php } else { ?>
                                            <strong><a href="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['base_uri']->value, ENT_QUOTES, 'UTF-8');?>
/order/<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['order']->value['id'], ENT_QUOTES, 'UTF-8');?>
">#<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['order']->value['id'], ENT_QUOTES, 'UTF-8');?>
</a></strong>
                                        <?php }?>
                                    </td>
                                    <td>
                                        <span data-toggle="tooltip" data-title="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['order']->value['title'], ENT_QUOTES, 'UTF-8');?>
"> <?php echo htmlspecialchars($_smarty_tpl->tpl_vars['order']->value['titleTruncated'], ENT_QUOTES, 'UTF-8');?>
</span>
                                    </td>
                                    <td>
                                        <small class="btn-block"><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['order']->value['topcat'], ENT_QUOTES, 'UTF-8');?>
</small>
                                        <small class="btn-block text-secondary"><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['order']->value['academicLevelTitle'], ENT_QUOTES, 'UTF-8');?>
</small>
                                    </td>
                                    <td><?php echo $_smarty_tpl->tpl_vars['order']->value['timeLeftHtml'];?>
</td>
                                    <td><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['order']->value['pages'], ENT_QUOTES, 'UTF-8');?>
 <?php if ($_smarty_tpl->tpl_vars['order']->value['slides']) {?>, <?php echo htmlspecialchars($_smarty_tpl->tpl_vars['order']->value['slides'], ENT_QUOTES, 'UTF-8');?>
 Slides <?php }?> </td>
                                    <td>
                                        <?php if ($_smarty_tpl->tpl_vars['user']->value['is_admin'] || $_smarty_tpl->tpl_vars['user']->value['is_sub_admin']) {?>
                                            <?php echo htmlspecialchars(formatPrice($_smarty_tpl->tpl_vars['order']->value['price']), ENT_QUOTES, 'UTF-8');?>

                                        <?php } elseif ($_smarty_tpl->tpl_vars['user']->value['is_writer']) {?>
                                            <?php echo htmlspecialchars(formatPrice($_smarty_tpl->tpl_vars['order']->value['writerPay']), ENT_QUOTES, 'UTF-8');?>

                                        <?php } elseif ($_smarty_tpl->tpl_vars['user']->value['is_editor']) {?>
                                            <?php echo htmlspecialchars(formatPrice($_smarty_tpl->tpl_vars['order']->value['editorPay']), ENT_QUOTES, 'UTF-8');?>

                                        <?php }?>
                                    </td>
                                    <?php if ($_smarty_tpl->tpl_vars['user']->value['is_admin'] || $_smarty_tpl->tpl_vars['user']->value['is_sub_admin']) {?>
                                        <td>
                                            <?php if ($_smarty_tpl->tpl_vars['order']->value['writer']['id']) {?>
                                                <strong><a class="text-capitalize" href="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['base_uri']->value, ENT_QUOTES, 'UTF-8');?>
/employees/edit/<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['order']->value['writer']['id'], ENT_QUOTES, 'UTF-8');?>
"><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['order']->value['writer']['first_name'], ENT_QUOTES, 'UTF-8');?>
 <?php echo htmlspecialchars($_smarty_tpl->tpl_vars['order']->value['writer']['last_name'], ENT_QUOTES, 'UTF-8');?>
</a></strong>
                                            <?php } else { ?>
                                                N/A
                                            <?php }?>
                                        </td>
                                        <td>
                                            <button data-toggle="tooltip" data-placement="top" title="Delete" class="btn btn-xs btn-danger js_admin-deleter" data-handle="order" data-id="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['order']->value['id'], ENT_QUOTES, 'UTF-8');?>
">
                                                <i class="fa fa-trash-alt"></i>
                                            </button>
                                            <a data-toggle="tooltip" data-placement="top" title="View" href="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['base_uri']->value, ENT_QUOTES, 'UTF-8');?>
/order/<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['order']->value['id'], ENT_QUOTES, 'UTF-8');?>
" class="btn btn-xs btn-info">
                                                <i class="fa fa-eye"></i>
                                            </a>
                                        </td>
                                    <?php }?>
                                </tr>
                            <?php
}
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
                        </tbody>
                    </table>

                    <?php if ($_smarty_tpl->tpl_vars['user']->value['is_admin'] || $_smarty_tpl->tpl_vars['user']->value['is_sub_admin']) {?>
                        <div class="mb-1">
                            <button class="btn btn-success btn-sm js_bulk-actions float-left">Bulk Actions</button>
                        </div>
                    <?php }?>

                    <?php echo $_smarty_tpl->tpl_vars['pager']->value;?>

                </div>
            <?php } else { ?>
                <div class="text-center x-muted"> <img class="mb20" width="15%" src="/static/images/no_results.png">
                    <p class="mb10"><strong>No orders to show</strong></p>
                </div>
            <?php }?>

        </div>
    </div>
<?php
}
}
/* {/block 'content_wrapper'} */
}
