<?php
/* Smarty version 3.1.33, created on 2020-08-20 07:38:09
  from '/home/superior/public_html/constantwriters.com/content/themes/dashboard/orders/orders.user.tpl' */

/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
  'version' => '3.1.33',
  'unifunc' => 'content_5f3e2861e98ac0_48875301',
  'has_nocache_code' => false,
  'file_dependency' => 
  array (
    'b53006d4c63e412186cdaa61e575010c7e4aae7a' => 
    array (
      0 => '/home/superior/public_html/constantwriters.com/content/themes/dashboard/orders/orders.user.tpl',
      1 => 1594274176,
      2 => 'file',
    ),
  ),
  'includes' => 
  array (
  ),
),false)) {
function content_5f3e2861e98ac0_48875301 (Smarty_Internal_Template $_smarty_tpl) {
$_smarty_tpl->_loadInheritance();
$_smarty_tpl->inheritance->init($_smarty_tpl, true);
?>
 

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

<?php $_smarty_tpl->inheritance->endChild($_smarty_tpl, 'dashboard/layout.tpl');
}
/* {block 'content_wrapper'} */
class Block_18709630545f3e2861e819a1_62455199 extends Smarty_Internal_Block
{
public $subBlocks = array (
  'content_wrapper' => 
  array (
    0 => 'Block_18709630545f3e2861e819a1_62455199',
  ),
);
public function callBlock(Smarty_Internal_Template $_smarty_tpl) {
$_smarty_tpl->_checkPlugins(array(0=>array('file'=>'/home/superior/public_html/constantwriters.com/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><?php echo htmlspecialchars(smarty_modifier_capitalize($_smarty_tpl->tpl_vars['sub_view']->value), ENT_QUOTES, 'UTF-8');?>
</strong> 
            &rsaquo; <strong><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['user_id']->value, ENT_QUOTES, 'UTF-8');?>
</strong>
            &rsaquo; <strong>Orders</strong> 
            &rsaquo; (<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['total_orders']->value, ENT_QUOTES, 'UTF-8');?>
)</strong>

            <div class="pull-right flip">
                <?php if ($_smarty_tpl->tpl_vars['user_group']->value == 'customer') {?>
                    <a href="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['base_uri']->value, ENT_QUOTES, 'UTF-8');?>
/customers/edit/<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['user_id']->value, ENT_QUOTES, 'UTF-8');?>
" class="btn btn-secondary">
                        <i class="fa fa-arrow-left fa-fw mr5"></i> Go Back
                    </a>
                <?php } else { ?>
                    <a href="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['base_uri']->value, ENT_QUOTES, 'UTF-8');?>
/employees/edit/<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['user_id']->value, ENT_QUOTES, 'UTF-8');?>
" class="btn btn-secondary">
                        <i class="fa fa-arrow-left fa-fw mr5"></i> Go Back
                    </a>
                <?php }?>
            </div>
        </div>

        <div class="card-body">

            <div class="mb20">
                <form method="GET" id="filter_form" autocomplete="off">
                    <div class="row mb10">
                        <div class="col-md-3">
                            <label>Status ID:</label>
                            <select class="form-control input-sm" name="status_id">
                                <option value="all" selected="selected">All</option>
                                <option value="13" <?php if ($_smarty_tpl->tpl_vars['status_id']->value == "13") {?> selected=""<?php }?>>Free Inquiry</option>
                                <option value="0" <?php if ($_smarty_tpl->tpl_vars['status_id']->value == "0") {?> selected=""<?php }?>>Waiting for Payment</option>
                                <option value="12" <?php if ($_smarty_tpl->tpl_vars['status_id']->value == "12") {?> selected=""<?php }?>>New Paid</option>
                                <option value="19" <?php if ($_smarty_tpl->tpl_vars['status_id']->value == "19") {?> selected=""<?php }?>>Available</option>
                                <option value="6" <?php if ($_smarty_tpl->tpl_vars['status_id']->value == "6") {?> selected=""<?php }?>>Writer Assigned</option>
                                <?php if ($_smarty_tpl->tpl_vars['editor_account_enabled']->value) {?>
                                    <option value="8" <?php if ($_smarty_tpl->tpl_vars['status_id']->value == "8") {?> selected=""<?php }?>>Done/Editing</option>
                                <?php }?>
                                <option value="11" <?php if ($_smarty_tpl->tpl_vars['status_id']->value == "11") {?> selected=""<?php }?>>Delivered</option>
                                <option value="10" <?php if ($_smarty_tpl->tpl_vars['status_id']->value == "10") {?> selected=""<?php }?>>Finished</option>
                                <option value="14" <?php if ($_smarty_tpl->tpl_vars['status_id']->value == "14") {?> selected=""<?php }?>>Revision</option>
                                <option value="9" <?php if ($_smarty_tpl->tpl_vars['status_id']->value == "9") {?> selected=""<?php }?>>Cancelled</option>
                                <option value="1" <?php if ($_smarty_tpl->tpl_vars['status_id']->value == "1") {?> selected=""<?php }?>>Dispute</option>
                            </select>
                        </div>
                        <div class="col-md-3">
                            <label for="toptitle">Topic Title:</label>
                            <input class="form-control input-sm" type="text" name="toptitle" placeholder="Topic Title" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['toptitle']->value, ENT_QUOTES, 'UTF-8');?>
" />
                        </div>
                        <div class="col-md-3">
                            <label for="order_id">Order ID:</label>
                            <input class="form-control input-sm force-integer" type="text" name="order_id" placeholder="Order Id" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['order_id']->value, ENT_QUOTES, 'UTF-8');?>
" />
                        </div>
                        <div class="col-md-2">
                            <button name="search" class="btn btn-info mt20">Search</button>
                        </div>
                    </div>
                </form>
            </div>

            <?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>Status</th>
                                <th>Pages</th>
                                <th>COST</th>
                                <?php if ($_smarty_tpl->tpl_vars['user_group']->value == "writer" || $_smarty_tpl->tpl_vars['user_group']->value == "editor") {?>
                                    <th>Paid</th>
                                <?php }?>
                                <th>Actions</th>
                            </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 htmlspecialchars($_smarty_tpl->tpl_vars['order']->value['statusTitle'], ENT_QUOTES, 'UTF-8');?>
</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>
                                    <?php if ($_smarty_tpl->tpl_vars['user_group']->value == "writer") {?>
                                        <td>
                                            <?php echo htmlspecialchars(formatPrice($_smarty_tpl->tpl_vars['order']->value['writerPay']), ENT_QUOTES, 'UTF-8');?>

                                        </td>
                                        <td>
                                            <?php if ($_smarty_tpl->tpl_vars['order']->value['isWriterPaid']) {?>
                                                <span class="label label-success">Yes</span>
                                            <?php } else { ?>
                                                <span class="label label-danger">No</span>
                                            <?php }?>
                                        </td>
                                    <?php } elseif ($_smarty_tpl->tpl_vars['user_group']->value == "editor") {?>
                                        <td>
                                            <?php echo htmlspecialchars(formatPrice($_smarty_tpl->tpl_vars['order']->value['editorPay']), ENT_QUOTES, 'UTF-8');?>

                                        </td>
                                        <td>
                                            <?php if ($_smarty_tpl->tpl_vars['order']->value['isEditorPaid']) {?>
                                                <span class="label label-success">Yes</span>
                                            <?php } else { ?>
                                                <span class="label label-danger">No</span>
                                            <?php }?>
                                        </td>
                                    <?php } else { ?>
                                        <td>
                                            <?php echo htmlspecialchars(formatPrice($_smarty_tpl->tpl_vars['order']->value['price']), ENT_QUOTES, 'UTF-8');?>

                                        </td>
                                    <?php }?>
                                    <td>
                                        <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> View
                                        </a>
                                    </td>
                                </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'} */
}
