<?php
// Copyright 1999-2023. Plesk International GmbH. All rights reserved.
?>
<div class="apps-box clearfix">
    <div class="package-content">
        <div class="package-block">
<?php if ($this->updateInfo && (count($this->updateInfo) > 0)): ?>
    <p><?php echo $this->lmsg('whatsNew') ?></p>
    <div class="package-block-area">
        <?php foreach ($this->updateInfo as $changeLog): ?>
            <p><?php if (isset($changeLog['date'])) {
                echo $this->lmsg('changeLogDate',
                    array(
                        'version' => $this->escape($changeLog['version']),
                        'release' => $this->escape($changeLog['release']),
                        'date' => $this->escape($changeLog['date']),
                    ));
            } else {
                echo $this->lmsg('changeLog',
                    array(
                        'version' => $this->escape($changeLog['version']),
                        'release' => $this->escape($changeLog['release']),
                    ));
            }
            ?></p>
            <ul>
                <?php foreach ($changeLog['description'] as $description): ?>
                    <li><?php echo $this->escape($description) ?></li>
                <?php endforeach; ?>
            </ul>
        <?php endforeach; ?>
    </div>
<?php else: ?>
    <p><?php echo $this->lmsg('noUpdateDescriptionFound') ?></p>
<?php endif; ?>
<p><?php
echo $this->lmsg('moreInfo',  array(
    'appHomePage' => '<a href="' . $this->appHomePageUrl . '">' .
        $this->lmsg('appHomePage') . '</a>',
));
?></p>
        </div>
    </div>
</div>
<?php if ($this->showButtons): ?>
<div class="btns-box">
    <div class="box-area">
        <div class="form-row">
            <div class="field-name">&nbsp;</div>
            <div class="field-value">
                <button class="btn action" value="" type="submit" onclick="Jsw.redirectPost(<?php echo $this->jsEscape($this->updateUrl); ?>)">
                    <?php echo $this->lmsg('updateNow') ?>
                </button>
                <button class="btn" value="" type="submit" onclick="Jsw.redirect(<?php echo $this->jsEscape($this->cancelUrl); ?>)">
                    <?php echo $this->lmsg('components.buttons.cancel') ?>
                </button>
            </div>
        </div>
    </div>
</div>
<?php endif; ?>
