<?php
// Copyright 1999-2024. WebPros International GmbH. All rights reserved.
?>
<?php echo $this->partial('partials/tabs.phtml', ['tabs' => $this->tabs, 'renderTo' => 'main', 'renderMode' => 'top']); ?>

<p><?php echo $this->logList->lmsg('pageHint'); ?></p>

<script type="text/javascript">
    //<![CDATA[
        new Jsw.Panel({
            cls: 'list-box',
            renderTo: 'main',
            items: [
                new Jsw.List({
                    id: 'log-list',
                    data: <?php echo Zend_Json::encode($this->logList->fetchData()); ?>,
                    dataUrl: '/server-protection/log-list-data',
                    operations: [],
                    columns: [
                        {
                            header: <?php echo $this->logList->jsLmsg('name');?>,
                            sortable: true,
                            dataIndex: 'name',
                            renderer: function(item) {
                                var url = Jsw.prepareUrl('/server-protection/log-view/id/' + item.id);
                                return '<span class="tooltipData">' + <?php echo $this->logList->jsLmsg('viewHint');?> + '</span>' +
                                    '<a href="#" onclick="window.open(\'' + url + '\', \'_blank\', \'toolbar=yes,scrollbars=yes,resizable=yes,width=600,height=500,innerWidth=1000,innerHeight=500\'); return false;">' + Jsw.escapeHtml(item.name) + '</a>';
                            }
                        }, {
                            header: '',
                            sortable: false,
                            cls: 'min',
                            renderer: function(item) {
                                return '<span class="tooltipData">' + <?php echo $this->logList->jsLmsg('buttonDownloadHint');?> + '</span>' +
                                    '<a target="_blank" href=' + Jsw.prepareUrl('/server-protection/log-download/id/' + item.id) +' class="s-btn sb-download"><span></span></a>';
                            }
                        }
                    ]
                })
            ]
        });
    //]]>
</script>
