<?php
/**
 * Copyright © 2016 maijindou.com All rights reserved.
 * See COPYING.txt for license details.
 */

// @codingStandardsIgnoreFile

/** @var  $block \Magento\Sales\Block\Order\Item\Renderer\DefaultRenderer */
$_item = $block->getItem();
?>
<tr id="order-item-row-<?php /* @escapeNotVerified */ echo $_item->getId() ?>">
    <td class="col name" data-th="<?php echo $block->escapeHtml(__('Product Name')); ?>">
        <strong class="product name product-item-name"><?php echo $block->escapeHtml($_item->getName()) ?></strong>
        <?php if ($_options = $block->getItemOptions()): ?>
        <dl class="item-options">
        <?php foreach ($_options as $_option) : ?>
            <dt><?php echo $block->escapeHtml($_option['label']) ?></dt>
            <?php if (!$block->getPrintStatus()): ?>
                <?php $_formatedOptionValue = $block->getFormatedOptionValue($_option) ?>
                <dd>
                    <?php if (isset($_formatedOptionValue['full_view'])): ?>
                        <?php /* @escapeNotVerified */ echo $_formatedOptionValue['full_view'] ?>
                    <?php else: ?>
                        <?php /* @escapeNotVerified */ echo $_formatedOptionValue['value'] ?>
                    <?php endif; ?>
                </dd>
            <?php else: ?>
                <dd>
                    <?php echo nl2br($block->escapeHtml((isset($_option['print_value']) ? $_option['print_value'] : $_option['value']))) ?>
                </dd>
            <?php endif; ?>
        <?php endforeach; ?>
        </dl>
        <?php endif; ?>
        <?php $addtInfoBlock = $block->getProductAdditionalInformationBlock(); ?>
        <?php if ($addtInfoBlock) :?>
            <?php echo $addtInfoBlock->setItem($_item)->toHtml(); ?>
        <?php endif; ?>
        <?php echo $block->escapeHtml($_item->getDescription()) ?>
    </td>
    <td class="col sku" data-th="<?php echo $block->escapeHtml(__('SKU')); ?>"><?php /* @escapeNotVerified */ echo $block->prepareSku($block->getSku()) ?></td>
    <td class="col price" data-th="<?php echo $block->escapeHtml(__('Price')); ?>">
        <?php echo $block->getItemPriceHtml(); ?>
    </td>
    <td class="col qty" data-th="<?php echo $block->escapeHtml(__('Qty')); ?>">
        <ul class="items-qty">
        <?php if ($block->getItem()->getQtyOrdered() > 0): ?>
            <li class="item">
                <span class="title"><?php /* @escapeNotVerified */ echo __('Ordered'); ?></span>
                <span class="content"><?php /* @escapeNotVerified */ echo $block->getItem()->getQtyOrdered()*1 ?></span>
            </li>
        <?php endif; ?>
        <?php if ($block->getItem()->getQtyShipped() > 0): ?>
            <li class="item">
                <span class="title"><?php /* @escapeNotVerified */ echo __('Shipped'); ?></span>
                <span class="content"><?php /* @escapeNotVerified */ echo $block->getItem()->getQtyShipped()*1 ?></span>
            </li>
        <?php endif; ?>
        <?php if ($block->getItem()->getQtyCanceled() > 0): ?>
            <li class="item">
                <span class="title"><?php /* @escapeNotVerified */ echo __('Canceled'); ?></span>
                <span class="content"><?php /* @escapeNotVerified */ echo $block->getItem()->getQtyCanceled()*1 ?></span>
            </li>
        <?php endif; ?>
        <?php if ($block->getItem()->getQtyRefunded() > 0): ?>
            <li class="item">
                <span class="title"><?php /* @escapeNotVerified */ echo __('Refunded'); ?></span>
                <span class="content"><?php /* @escapeNotVerified */ echo $block->getItem()->getQtyRefunded()*1 ?></span>
            </li>
        <?php endif; ?>
        </ul>
    </td>
    <td class="col subtotal" data-th="<?php echo $block->escapeHtml(__('Subtotal')); ?>">
        <?php echo $block->getItemRowTotalHtml(); ?>
    </td>
</tr>
