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

// @codingStandardsIgnoreFile

?>
<?php /** @var $block \Magento\AdminNotification\Block\System\Messages */ ?>

<?php $lastCritical = $block->getLastCritical();?>
<div id="system_messages" class="message-system<?php if ($lastCritical): ?> message-system-unread<?php endif; ?>">
    <div class="message-system-inner">
        <?php if ($lastCritical): ?>
            <ul class="message-system-list">
                <li class="message message-warning error">
                    <?php /* @escapeNotVerified */ echo $lastCritical->getText();?>
                </li>
            </ul>
        <?php endif; ?>
        <div class="message-system-short">
            <span class="message-system-short-label">
                <?php /* @escapeNotVerified */ echo __('System Messages:')?>
            </span>

            <?php if ($block->getCriticalCount()): ?>
                <div class="message message-warning error">
                    <a class="message-link" href="#" title="<?php echo $block->escapeHtml(__('Critical System Messages'));?>">
                        <?php /* @escapeNotVerified */ echo $block->getCriticalCount();?>
                    </a>
                </div>
            <?php endif;?>

            <?php if ($block->getMajorCount()): ?>
               <div class="message message-warning warning">
                   <a class="message-link" href="#" title="<?php echo $block->escapeHtml(__('Major System Messages'));?>">
                       <?php /* @escapeNotVerified */ echo $block->getMajorCount();?>
                   </a>
               </div>
            <?php endif;?>
        </div>
        <div id="message-system-all" title="<?php echo $block->escapeHtml(__('System messages'));?>" data-mage-init='<?php echo $block->escapeHtml($block->getSystemMessageDialogJson());?>'></div>
    </div>
</div>
