<?php

use WpBookingEventAdmin\app\Html\HtmlBackend;
use WpBookingEvent\Utilities\Utility as UtilityAlias;

$item = $this->item;
?>
<tr data-id="<?php esc_html_e($item->id) ?>" class="list-rate-title">
    <td class="sorting_1"><?php echo (HtmlBackend::render_checkbox($item->id)) ?></td>
    <td class="name nowrap"><?php esc_html_e($item->name) ?></td>
    <td class="name nowrap"><?php esc_html_e(round($item->total_order/2)) ?></td>
    <td class="nowrap"><?php esc_html_e($item->min_allowed_person) ?>-<?php esc_html_e($item->max_allowed_person) ?></td>
    <td class="open_date nowrap"><?php echo(HtmlBackend::render_date(isset($item->open_date)?$item->open_date:"","Y-m-d")); ?></td>
    <td class="close_date nowrap"><?php echo(HtmlBackend::render_date(isset($item->close_date)?$item->close_date:"","Y-m-d")); ?></td>
    <td class="published">
        <?php if(isset($item->published)) {?>
            <span class="label label-success"><?php esc_attr_e('Open','wpbookingevent')?></span>
        <?php } else {?>
            <span class="label label-danger"><?php esc_attr_e('Close','wpbookingevent')?></span>
        <?php }?>
    </td>
    <td class="item-id nowrap"><?php esc_html_e($item->id) ?></td>
    <td>
        <a href="<?php echo(UtilityAlias::getBackendGoToLink("event.form",array("id"=>$item->id))) ?>" class="btn-edit" title="<?php esc_attr_e('Edit','wpbookingevent')?>"><i class="fas fa-edit"></i></a>
        <a href="<?php echo(UtilityAlias::goToTaskByView("event",'event.delete',array("id"=>$item->id))) ?>" class="btn-delete" title="<?php esc_attr_e('Delete','wpbookingevent')?>"><i class="fas fa-trash-alt"></i></a>
    </td>
</tr>
