<?php
// Copyright 1999-2021. Plesk International GmbH. All rights reserved.
?>
<div class="package-block" id="details">
    <h3 class="package-name">
        <?php echo $this->escape($this->name); ?> <?php echo $this->escape($this->version); ?> <span>(<?php echo $this->escape($this->lmsg('smb.components.aps.package.release', array('release' => $this->release))); ?>)</span>
    </h3>
    <p><?php echo $this->escape($this->summary); ?></p>
    <p><?php echo $this->escape($this->description); ?></p>
    <p>
        <?php echo $this->lmsg('smb.components.aps.package.producedBy'); ?>
        <a href="<?php echo $this->escape($this->links['base']['vendorHomePage']['href']); ?>" target="_blank">
            <?php echo $this->escape($this->links['base']['vendorHomePage']['label']); ?>
        </a>
    </p>
</div>
<div class="package-block<?php echo $this->hidden ? ' hide' : ''; ?>" id="more-links">
    <p class="package-more"><?php echo $this->lmsg('smb.components.aps.package.moreInfo'); ?></p>
    <ul>
        <li><a href="<?php echo $this->escape($this->links['base']['applicationHomePage']['href']); ?>" target="_blank">
            <?php echo $this->escape($this->links['base']['applicationHomePage']['label']); ?>
        </a></li>
        <?php
        foreach ($this->infoLinks as $link) {
            ?><li><a href="<?php echo $this->escape($link['href']); ?>" target="_blank">
                <?php echo $this->escape($link['label']); ?>
            </a></li><?php
        }
        ?>
    </ul>
<script type="text/javascript">
//<![CDATA[
(function () {
    document.getElementById('more-links').querySelectorAll('h4 span').forEach(function (element) {
        element.addEventListener('click', function () {
            document.getElementById('more-links').classList.toggle('hide');
        });
    });
})();
////]]>
</script>
</div>
