<?php

use WpBookingEvent\Factory as FactoryAlias;
use WpBookingEvent\Html\ToolBar;
use WpBookingEvent\Html\WpBookingEventHtmlBackend as WpBookingEventHtmlBackendAlias;
use WpBookingEvent\Utilities\Utility as UtilityAlias;

$doc = FactoryAlias::getDocument();
WpBookingEventHtmlBackendAlias::load_jquery_library('icheck');
ToolBar::setTitle("List package");
WpBookingEventHtmlBackendAlias::load_jquery_library('datatables');
?>
<?php ?>
    <form action="<?php echo(UtilityAlias::getBackendGoToLink("package.form")) ?>" name="admin-form" method="post">
        <div class="view-list-package">
            <table id="example" class="display table">
                <thead>
                    <tr>
                        <th class="nowrap"></th>
                        <th class="nowrap"><?php esc_attr_e('Name','wpbookingevent') ?> </th>
                        <th class="nowrap"><?php esc_attr_e('Event','wpbookingevent') ?> </th>
                        <th ><?php esc_attr_e('Access','wpbookingevent')?></th>
                        <th class="nowrap"></th>
                    </tr>
                </thead>
                <tbody>
                    <?php $i = 0; ?>
                    <?php foreach ($this->list as $item) { ?>
                        <?php
                            $item->index = $i;
                            $this->item = $item;
                            $this->loadTemplate('list_item');
                            $i++;
                        ?>
                    <?php } ?>
                </tbody>
            </table>
        </div>
        <input type="hidden" name="task" value="">
    </form>
<?php
$doc->addLessStyleSheet('admin/app/assets/less/view_list_package.less');
$doc->addScriptApplySelector('.view-list-package', 'view_list_package', array(

), "admin/app/assets/js/view_list_package.js");
?>