<?php
// Copyright 1999-2012. Parallels IP Holdings GmbH. All Rights Reserved.
?>
<ul class="system-overview-list">
    <li class="system-overview-item">
        <b><?php echo $this->lmsg('hostname') ?>:</b>
        <?php echo $this->escape($this->hostname) ?>
    </li>
    <li class="system-overview-item">
        <b><?php echo $this->lmsg('ipAddress') ?>:</b>
        <?php echo $this->escape($this->ipAddress) ?>
    </li>
    <li class="system-overview-item">
        <b><?php echo $this->lmsg('os') ?>:</b>
        <?php echo $this->escape($this->os) ?>
    </li>
    <li class="system-overview-item">
        <b><?php echo $this->lmsg('panelVersion') ?>:</b>
        <?php if ($this->isUpdateAllowed): ?>
            <a class="toggler so-panel-version" href="#">
                <?php echo $this->escape($this->panelVersion); ?><?php echo $this->installedPatch ? (' ' . $this->lmsg('installedPatchVersion', array('installed_patch' => $this->installedPatch))) : ''; ?></a>
        <?php else: ?>
            <?php echo $this->escape($this->panelVersion); ?>
            <?php echo $this->installedPatch ? (' ' . $this->lmsg('installedPatchVersion', array('installed_patch' => $this->installedPatch))) : ''; ?>
        <?php endif; ?>
        <?php if ($this->lastUpdate): ?>
            <?php echo ' ' . $this->lmsg('lastUpdateDate', ['br' => '<br/>']) ?>
            <span class="nowrap"><?php echo $this->lastUpdate ?>
        <?php endif ?>
        <?php if ($this->isAutoupdatesDisabled): ?>
            <i class="icon">
                <img src="<?php echo $this->skinUrl('/icons/16/plesk/att.png') ?>" alt="">
                <span class="tooltipData"><?php echo $this->lmsg('autoupdatesIsDisabledHint') ?></span>
            </i>
        <?php endif; ?>
        <?php if ($this->lastUpdate): ?>
            </span>
        <?php endif ?>
    </li>
</ul>

<?php if ($this->isUpdateAllowed): ?>
    <div class="popup-box left pb-panel-version collapsed">
        <table class="popup-wrapper" cellspacing="0"><tbody><tr><td class="popup-container">
            <div class="c1"><div class="c2"><div class="c3"><div class="c4"><div class="c5">
                <div class="popup-heading">
                    <div class="heading-area">
                        <span class="arrow"></span>
                        <span class="close"></span>
                        <h4><span><?php echo $this->lmsg('panelVersion') ?></span></h4>
                    </div>
                </div>
                <div class="popup-content">
                    <div class="popup-content-area">
                        <div class="panel-version-details">
                            <?php if (!$this->isUpdatesAvailable && $this->lastChecked): ?>
                                <p><?php echo $this->lmsg('systemIsUp2date', array('last_checked' => $this->lastChecked)) ?></p>
                            <?php endif; ?>

                            <p>
                                <?php echo $this->lmsg('upgradeNotifications', array('branch' => $this->currentlySelectedBranch)); ?>
                                <a href="<?php echo $this->baseUrl('/settings/tools-proxy?url=/admin/update/settings/') ?>">
                                    <?php echo $this->lmsg('changeBranch') ?>
                                </a>
                            </p>

                            <ul class="panel-ul-simple">
                                <li>
                                    <div class="i-block">
                                        <a href="<?php echo $this->changelogUrl ?>" target="_blank">
                                            <i class="icon"><img src="<?php echo $this->skinUrl('/icons/16/plesk/logs.png') ?>"></i>
                                            <?php echo $this->lmsg('seeChangelog') ?>
                                        </a>
                                    </div>
                                </li>
                                <li>
                                    <div class="i-block">
                                        <a href="/admin/update/add-components" target="_blank">
                                            <i class="icon"><img src="<?php echo $this->skinUrl('/icons/16/plesk/components.png') ?>"></i>
                                            <?php echo $this->lmsg('addComponents') ?>
                                        </a>
                                    </div>
                                </li>

                                <?php if ($this->isAutoupdatesDisabled): ?>
                                    <li>
                                        <div class="i-block">
                                            <i class="icon"><img src="<?php echo $this->skinUrl('/icons/16/plesk/att.png') ?>"></i>
                                            <?php echo $this->lmsg('autoupdatesIsDisabled') ?>
                                            <br>
                                            <a href="<?php echo $this->baseUrl('/settings/tools-proxy?url=/admin/update/settings/') ?>">
                                                <?php echo $this->lmsg('enableAutoupdate') ?>
                                            </a>
                                        </div>
                                    </li>
                                <?php endif; ?>

                                <?php if ($this->isUpgradeAvailable): ?>
                                    <li>
                                        <div class="i-block">
                                            <i class="icon"><img src="<?php echo $this->skinUrl('/icons/16/plesk/update.png') ?>"></i>
                                            <?php echo $this->lmsg('upgradeIsAvailable', array('product' => $this->availableUpgrade)) ?>
                                            <br>
                                            <a href="/admin/update/product" target="_blank">
                                                <?php echo $this->lmsg('installNow') ?>
                                            </a>
                                            <br>
                                            <a href="<?php echo $this->upgradeWhatsNewUrl ?>" target="_blank">
                                                <?php echo $this->lmsg('seeWhatsNew') ?>
                                            </a>
                                        </div>
                                    </li>
                                <?php endif; ?>

                                <?php if ($this->isUpdatesAvailable): ?>
                                    <li>
                                        <div class="i-block">
                                            <?php echo $this->escape($this->lmsg('updatesAvailable', array('version' => $this->availablePatch))) ?>
                                            <?php if ($this->totalMissedSecurityUpdates): ?>
                                            <br>
                                            <span class="required">
                                                <?php echo $this->escape($this->lmsg('securityUpdatesAvailable', array('total' => $this->totalMissedSecurityUpdates))) ?>
                                            </span>
                                            <?php endif; ?>
                                            <br>
                                            <a href="#" onclick="Jsw.FormRedirect.redirect('/admin/update/components', 'post');">
                                                <?php echo $this->lmsg('installNow') ?>
                                            </a>
                                            <br>
                                            <a href="/admin/update/" target="_blank">
                                                <?php echo $this->lmsg('installShow') ?>
                                            </a>
                                            <br>
                                            <a href="<?php echo $this->updateWhatsNewUrl ?>" target="_blank">
                                                <?php echo $this->lmsg('seeWhatsNew') ?>
                                            </a>
                                        </div>
                                    </li>
                                <?php endif; ?>
                            </ul>
                        </div>
                    </div>
                </div>
            </div></div></div></div></div>
        </td></tr></tbody></table>
    </div>
<?php endif; ?>

<?php if ($this->isStatisticsAvailable): ?>
    <div class="panel-bottom-actions">
        <a href="<?php echo $this->baseUrl('/settings/tools-proxy?url=/plesk/server/statistics/') ?>">
            <?php echo $this->lmsg('systemMoreLink') ?>
        </a>
    </div>
<?php endif; ?>
