<?php
/* Smarty version 4.5.3, created on 2026-05-21 04:22:24
  from '/var/www/html/billing/system/plugin/ui/support_tickets_list.tpl' */

/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
  'version' => '4.5.3',
  'unifunc' => 'content_6a0e8880cae836_03581341',
  'has_nocache_code' => false,
  'file_dependency' => 
  array (
    'b5f92d5e104fff9c0f495984592bc1bb1745a008' => 
    array (
      0 => '/var/www/html/billing/system/plugin/ui/support_tickets_list.tpl',
      1 => 1765065916,
      2 => 'file',
    ),
  ),
  'includes' => 
  array (
    'file:sections/header.tpl' => 1,
    'file:sections/footer.tpl' => 1,
  ),
),false)) {
function content_6a0e8880cae836_03581341 (Smarty_Internal_Template $_smarty_tpl) {
$_smarty_tpl->_subTemplateRender("file:sections/header.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), 0, false);
?>

<div class="row">
    <div class="col-sm-12">
        <div class="panel panel-hovered mb20 panel-info">
            <div class="panel-heading">
                <div class="btn-group pull-right">
                    <a href="<?php echo $_smarty_tpl->tpl_vars['_url']->value;?>
plugin/support_tickets&action=dashboard" class="btn btn-default btn-xs">
                        <i class="fa fa-dashboard"></i> Dashboard
                    </a>
                    <a href="<?php echo $_smarty_tpl->tpl_vars['_url']->value;?>
plugin/support_tickets&action=add" class="btn btn-success btn-xs">
                        <i class="fa fa-plus"></i> New Ticket
                    </a>
                    <a href="<?php echo $_smarty_tpl->tpl_vars['_url']->value;?>
plugin/support_tickets&action=categories" class="btn btn-warning btn-xs">
                        <i class="fa fa-tags"></i> Categories
                    </a>
                </div>
                All Support Tickets
            </div>
            <div class="panel-body">
                
                <!-- Filters -->
                <form method="post" class="form-horizontal">
                    <div class="row">
                        <div class="col-md-2">
                            <select name="status" class="form-control">
                                <option value="">All Status</option>
                                <option value="Open" <?php if ($_POST['status'] == 'Open') {?>selected<?php }?>>Open</option>
                                <option value="In Progress" <?php if ($_POST['status'] == 'In Progress') {?>selected<?php }?>>In Progress</option>
                                <option value="Pending" <?php if ($_POST['status'] == 'Pending') {?>selected<?php }?>>Pending</option>
                                <option value="Closed" <?php if ($_POST['status'] == 'Closed') {?>selected<?php }?>>Closed</option>
                            </select>
                        </div>
                        <div class="col-md-2">
                            <select name="priority" class="form-control">
                                <option value="">All Priorities</option>
                                <option value="Low" <?php if ($_POST['priority'] == 'Low') {?>selected<?php }?>>Low</option>
                                <option value="Normal" <?php if ($_POST['priority'] == 'Normal') {?>selected<?php }?>>Normal</option>
                                <option value="High" <?php if ($_POST['priority'] == 'High') {?>selected<?php }?>>High</option>
                                <option value="Urgent" <?php if ($_POST['priority'] == 'Urgent') {?>selected<?php }?>>Urgent</option>
                            </select>
                        </div>
                        <div class="col-md-2">
                            <select name="category" class="form-control">
                                <option value="">All Categories</option>
                                <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['categories']->value, 'cat');
$_smarty_tpl->tpl_vars['cat']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['cat']->value) {
$_smarty_tpl->tpl_vars['cat']->do_else = false;
?>
                                    <option value="<?php echo $_smarty_tpl->tpl_vars['cat']->value->id;?>
" <?php if ($_POST['category'] == $_smarty_tpl->tpl_vars['cat']->value->id) {?>selected<?php }?>><?php echo $_smarty_tpl->tpl_vars['cat']->value->name;?>
</option>
                                <?php
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
                            </select>
                        </div>
                        <div class="col-md-2">
                            <select name="assigned" class="form-control">
                                <option value="">All Assignments</option>
                                <option value="me" <?php if ($_POST['assigned'] == 'me') {?>selected<?php }?>>Assigned to Me</option>
                                <option value="unassigned" <?php if ($_POST['assigned'] == 'unassigned') {?>selected<?php }?>>Unassigned</option>
                            </select>
                        </div>
                        <div class="col-md-3">
                            <input type="text" name="search" class="form-control" placeholder="Search..." value="<?php echo $_POST['search'];?>
">
                        </div>
                        <div class="col-md-1">
                            <button type="submit" class="btn btn-primary btn-block">
                                <i class="fa fa-filter"></i>
                            </button>
                        </div>
                    </div>
                </form>

                <hr>

                <!-- Tickets Table -->
                <div class="table-responsive">
                    <table class="table table-bordered table-striped table-hover" id="ticketsTable">
                        <thead>
                            <tr>
                                <th>Ticket #</th>
                                <th>Customer</th>
                                <th>Subject</th>
                                <th>Category</th>
                                <th>Priority</th>
                                <th>Status</th>
                                <th>Assigned To</th>
                                <th>Created</th>
                                <th>Actions</th>
                            </tr>
                        </thead>
                        <tbody>
                            <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['tickets']->value, 'ticket');
$_smarty_tpl->tpl_vars['ticket']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['ticket']->value) {
$_smarty_tpl->tpl_vars['ticket']->do_else = false;
?>
                            <tr>
                                <td><strong><?php echo $_smarty_tpl->tpl_vars['ticket']->value->ticket_number;?>
</strong></td>
                                <td>
                                    <strong><?php echo $_smarty_tpl->tpl_vars['ticket']->value->customer_name;?>
</strong><br>
                                    <small><?php echo $_smarty_tpl->tpl_vars['ticket']->value->customer_username;?>
</small><br>
                                    <small><?php echo $_smarty_tpl->tpl_vars['ticket']->value->customer_phone;?>
</small>
                                </td>
                                <td><?php echo $_smarty_tpl->tpl_vars['ticket']->value->subject;?>
</td>
                                <td><span class="label label-default"><?php echo $_smarty_tpl->tpl_vars['ticket']->value->category_name;?>
</span></td>
                                <td>
                                    <?php if ($_smarty_tpl->tpl_vars['ticket']->value->priority == 'Urgent') {?>
                                        <span class="label label-danger"><?php echo $_smarty_tpl->tpl_vars['ticket']->value->priority;?>
</span>
                                    <?php } elseif ($_smarty_tpl->tpl_vars['ticket']->value->priority == 'High') {?>
                                        <span class="label label-warning"><?php echo $_smarty_tpl->tpl_vars['ticket']->value->priority;?>
</span>
                                    <?php } elseif ($_smarty_tpl->tpl_vars['ticket']->value->priority == 'Low') {?>
                                        <span class="label label-default"><?php echo $_smarty_tpl->tpl_vars['ticket']->value->priority;?>
</span>
                                    <?php } else { ?>
                                        <span class="label label-info"><?php echo $_smarty_tpl->tpl_vars['ticket']->value->priority;?>
</span>
                                    <?php }?>
                                </td>
                                <td>
                                    <?php if ($_smarty_tpl->tpl_vars['ticket']->value->status == 'Closed') {?>
                                        <span class="label label-success"><?php echo $_smarty_tpl->tpl_vars['ticket']->value->status;?>
</span>
                                    <?php } elseif ($_smarty_tpl->tpl_vars['ticket']->value->status == 'In Progress') {?>
                                        <span class="label label-primary"><?php echo $_smarty_tpl->tpl_vars['ticket']->value->status;?>
</span>
                                    <?php } elseif ($_smarty_tpl->tpl_vars['ticket']->value->status == 'Pending') {?>
                                        <span class="label label-warning"><?php echo $_smarty_tpl->tpl_vars['ticket']->value->status;?>
</span>
                                    <?php } else { ?>
                                        <span class="label label-warning"><?php echo $_smarty_tpl->tpl_vars['ticket']->value->status;?>
</span>
                                    <?php }?>
                                </td>
                                <td>
                                    <?php if ($_smarty_tpl->tpl_vars['ticket']->value->assigned_to) {?>
                                        <span class="label label-info"><?php echo $_smarty_tpl->tpl_vars['ticket']->value->assigned_to;?>
</span>
                                    <?php } else { ?>
                                        <span class="label label-default">Unassigned</span>
                                    <?php }?>
                                </td>
                                <td><small><?php echo $_smarty_tpl->tpl_vars['ticket']->value->created_at;?>
</small></td>
                                <td>
                                    <div class="btn-group">
                                        <a href="<?php echo $_smarty_tpl->tpl_vars['_url']->value;?>
plugin/support_tickets&action=view&id=<?php echo $_smarty_tpl->tpl_vars['ticket']->value->id;?>
" 
                                           class="btn btn-info btn-xs" title="View">
                                            <i class="fa fa-eye"></i>
                                        </a>
                                        <a href="<?php echo $_smarty_tpl->tpl_vars['_url']->value;?>
plugin/support_tickets&action=delete&id=<?php echo $_smarty_tpl->tpl_vars['ticket']->value->id;?>
" 
                                           onclick="return confirm('Delete this ticket?')" 
                                           class="btn btn-danger btn-xs" title="Delete">
                                            <i class="fa fa-trash"></i>
                                        </a>
                                    </div>
                                </td>
                            </tr>
                            <?php
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
                        </tbody>
                    </table>
                </div>

            </div>
        </div>
    </div>
</div>

<?php echo '<script'; ?>
>
$(document).ready(function() {
    $('#ticketsTable').DataTable({
        "order": [[7, "desc"]],
        "pageLength": 25
    });
});
<?php echo '</script'; ?>
>

<?php $_smarty_tpl->_subTemplateRender("file:sections/footer.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), 0, false);
}
}
