<?php
/**
 * Copyright © 2013-2017 Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */

// @codingStandardsIgnoreFile

?>
<section class="admin__page-section edit-order-comments">
    <ul class="note-list">
    <?php foreach ($block->getFullHistory() as $_item): ?>
        <li class="note-list-item">
            <span class="note-list-date"><?php /* @escapeNotVerified */ echo $block->getItemCreatedAt($_item) ?></span>
            <span class="note-list-time"><?php /* @escapeNotVerified */ echo $block->getItemCreatedAt($_item, 'time') ?></span>
            <span class="note-list-status"><?php /* @escapeNotVerified */ echo $block->getItemTitle($_item) ?></span>
            <?php if ($block->isItemNotified($_item, false)): ?>
                <span class="note-list-customer">
                    <?php /* @escapeNotVerified */ echo __('Customer') ?>
                    <?php if ($block->isCustomerNotificationNotApplicable($_item)): ?>
                        <span class="note-list-customer-notapplicable"><?php /* @escapeNotVerified */ echo __('Notification Not Applicable') ?></span>
                    <?php elseif ($block->isItemNotified($_item)): ?>
                        <span class="note-list-customer-notified"><?php /* @escapeNotVerified */ echo __('Notified') ?></span>
                    <?php else: ?>
                        <span class="note-list-customer-not-notified"><?php /* @escapeNotVerified */ echo __('Not Notified') ?></span>
                    <?php endif; ?>
                </span>
            <?php endif; ?>
        </li>
    <?php endforeach; ?>
    </ul>
    <div class="edit-order-comments-block">
        <div class="edit-order-comments-block-title">
            <?php /* @escapeNotVerified */ echo __('Notes for this Order') ?>
        </div>
        <?php foreach ($block->getFullHistory() as $_item): ?>
            <?php if ($_comment = $block->getItemComment($_item)): ?>
                <div class="comments-block-item">
                    <div class="comments-block-item-comment">
                        <?php /* @escapeNotVerified */ echo $_comment ?>
                    </div>
                    <span class="comments-block-item-date-time">
                        <?php /* @escapeNotVerified */ echo __('Comment added') ?>
                        <?php /* @escapeNotVerified */ echo $block->getItemCreatedAt($_item) ?>
                        <?php /* @escapeNotVerified */ echo $block->getItemCreatedAt($_item, 'time') ?>
                    </span>
                </div>
            <?php endif; ?>
        <?php endforeach; ?>
    </div>
</section>
