<?php
/* Smarty version 3.1.33, created on 2020-07-06 19:18:55
  from '/Users/codeworldweb.com/websites/uvocorp/content/themes/dashboard/feedback.tpl' */

/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
  'version' => '3.1.33',
  'unifunc' => 'content_5f03791fd2f006_55530272',
  'has_nocache_code' => false,
  'file_dependency' => 
  array (
    'e6c0d3c62d517074d735af17b14273d025fc560a' => 
    array (
      0 => '/Users/codeworldweb.com/websites/uvocorp/content/themes/dashboard/feedback.tpl',
      1 => 1592297058,
      2 => 'file',
    ),
  ),
  'includes' => 
  array (
  ),
),false)) {
function content_5f03791fd2f006_55530272 (Smarty_Internal_Template $_smarty_tpl) {
$_smarty_tpl->_loadInheritance();
$_smarty_tpl->inheritance->init($_smarty_tpl, true);
?>
 

<?php 
$_smarty_tpl->inheritance->instanceBlock($_smarty_tpl, 'Block_11655486125f03791fd1e249_38414005', 'content_wrapper');
$_smarty_tpl->inheritance->endChild($_smarty_tpl, 'dashboard/layout.tpl');
}
/* {block 'content_wrapper'} */
class Block_11655486125f03791fd1e249_38414005 extends Smarty_Internal_Block
{
public $subBlocks = array (
  'content_wrapper' => 
  array (
    0 => 'Block_11655486125f03791fd1e249_38414005',
  ),
);
public function callBlock(Smarty_Internal_Template $_smarty_tpl) {
?>

    <div class="card">
        <div class="card-header with-icon">
            <i class="fa fa-comments-o mr10"></i> 

            <strong>Feedback</strong> 
            
        </div>

        <?php if ($_smarty_tpl->tpl_vars['sub_view']->value == "feedback") {?>

            <div class="card-body">
                <?php if (count($_smarty_tpl->tpl_vars['ratings']->value)) {?>
                    <div class="table-responsive">
                        <table class="table <?php if ($_smarty_tpl->tpl_vars['theme_mode_night']->value) {?>table-dark<?php }?> ratings table-striped table-bordered table-hover js_dataTable">
                            <thead>
                                <tr>
                                    <td>Order ID</td>
                                    <td>Service Rating</td>
                                    <td>Paper Rating</td>
                                    <td>Paper on Time</td>
                                    <td>Date</td>
                                    <td>Actions</td>
                                </tr>
                            </thead>
                            <tbody>
                                <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['ratings']->value, 'rating');
if ($_from !== null) {
foreach ($_from as $_smarty_tpl->tpl_vars['rating']->value) {
?>
                                    <tr>
                                        <td>
                                            <a target="_blank" href="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['base_uri']->value, ENT_QUOTES, 'UTF-8');?>
/order/<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['rating']->value['order_id'], ENT_QUOTES, 'UTF-8');?>
">#<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['rating']->value['order_id'], ENT_QUOTES, 'UTF-8');?>
</a>
                                        </td>
                                        <td>    
                                            <?php echo htmlspecialchars($_smarty_tpl->tpl_vars['rating']->value['service_rating']/2, ENT_QUOTES, 'UTF-8');?>
 <?php echo starRating($_smarty_tpl->tpl_vars['rating']->value['service_rating']);?>

                                        </td>
                                        <td>    
                                            <?php echo htmlspecialchars($_smarty_tpl->tpl_vars['rating']->value['paper_rating']/2, ENT_QUOTES, 'UTF-8');?>
 <?php echo starRating($_smarty_tpl->tpl_vars['rating']->value['paper_rating']);?>

                                        </td>
                                        <td>
                                            <?php if ($_smarty_tpl->tpl_vars['rating']->value['paper_on_time']) {?>
                                                <span class="label label-success">Yes</span>
                                            <?php } else { ?>
                                                <span class="label label-danger">No</span>
                                            <?php }?>
                                        </td>
                                        <td>
                                            <span class="js_moment" data-time="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['rating']->value['date'], ENT_QUOTES, 'UTF-8');?>
"><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['rating']->value['date'], ENT_QUOTES, 'UTF-8');?>
</span>
                                        </td>
                                        <td>
                                            <button data-toggle="tooltip" data-placement="top" title="Delete" class="btn btn-xs btn-danger js_admin-deleter" data-handle="rating" data-id="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['rating']->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');?>
/feedback/<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['rating']->value['id'], ENT_QUOTES, 'UTF-8');?>
" class="btn btn-xs btn-info">
                                                <i class="fa fa-eye"></i>
                                            </a>
                                        </td>
                                    </tr>
                                <?php
}
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
                            </tbody>
                        </table>

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

                    </div>
                <?php } else { ?>
                    <div class="text-center x-muted"> <i class="fa fa-envelope fa-4x"></i>
                        <p class="mb10"><strong>No ratings to show</strong></p>
                    </div>
                <?php }?>
            </div>

        <?php } elseif ($_smarty_tpl->tpl_vars['sub_view']->value == "view") {?>
            <div class="card-body">
                <table width="100%" cellspacing="0" cellpadding="0" border="0" class="table_info ratings">
                    <tbody>
                        <tr class="first">
                            <th>Order ID:</th>
                            <td>
                                <a target="_blank" href="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['base_uri']->value, ENT_QUOTES, 'UTF-8');?>
/order/<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['feedback']->value['order_id'], ENT_QUOTES, 'UTF-8');?>
">#<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['feedback']->value['order_id'], ENT_QUOTES, 'UTF-8');?>
</a>
                            </td>
                        </tr>
                        <tr class="first">
                            <th>Customer ID:</th>
                            <td>
                                <a target="_blank" href="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['base_uri']->value, ENT_QUOTES, 'UTF-8');?>
/customers/edit/<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['feedback']->value['order']['customer']['id'], ENT_QUOTES, 'UTF-8');?>
">#<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['feedback']->value['order']['customer']['id'], ENT_QUOTES, 'UTF-8');?>
</a>
                            </td>
                        </tr>
                        <tr>
                            <th>Service Rating:</th>
                            <td><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['feedback']->value['paper_rating']/2, ENT_QUOTES, 'UTF-8');?>
 <?php echo starRating($_smarty_tpl->tpl_vars['feedback']->value['paper_rating']);?>
</td>
                        </tr>
                        <tr>
                            <th>Paper Rating:</th>
                            <td><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['feedback']->value['service_rating']/2, ENT_QUOTES, 'UTF-8');?>
 <?php echo starRating($_smarty_tpl->tpl_vars['feedback']->value['service_rating']);?>
</td>
                        </tr>
                        <tr>
                            <th>Paper on Time:</th>
                            <td>
                                <?php if ($_smarty_tpl->tpl_vars['feedback']->value['paper_on_time']) {?>
                                    <span class="label label-success">Yes</span>
                                <?php } else { ?>
                                    <span class="label label-danger">No</span>
                                <?php }?>
                            </td>
                        </tr>
                        <tr>
                            <th>Comments:</th>
                            <td><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['feedback']->value['comment'], ENT_QUOTES, 'UTF-8');?>
</td>
                        </tr>
                    </tbody>
                </table>
                <button type="button" data-toggle="modal" data-url="#modal-feedback" data-options='{"feedback_id":<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['feedback']->value['id'], ENT_QUOTES, 'UTF-8');?>
}' class="btn btn-info">Reply</button>
            </div>
            
        <?php }?>

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