<?php
// Copyright 1999-2023. Plesk International GmbH. All rights reserved.
?>
<script type="text/javascript">
//<![CDATA[
    new Jsw.Container({
        renderTo: 'main',
        renderMode: 'top',
        items: [
        	new Jsw.Panel({
                cls: 'list-box',
                items: [
                    new Jsw.Hint({
                        hint: <?php echo $this->jsLmsg('hint'); ?>
                    }),
                    new Jsw.List({
                        id: 'conflicts-list',
                        data: {
                            "pager":{"pageCount":1,"itemCountPerPage":Jsw.list.ITEMS_UNLIMITED,"first":1,"current":1,"last":1,"pagesInRange":{"1":1},"firstPageInRange":1,"lastPageInRange":1,"currentItemCount":2,"totalItemCount":2,"firstItemNumber":1,"lastItemNumber":2},
                            "data": <?php echo Zend_Json::encode($this->problems) ?>,
                            "state":{},
                            "locale":{}
                        },
                        pageable: false,
                        columns: [
                            {
                                header: <?php echo $this->jsLmsg('propertyDescription');?>,
                                sortable: false,
                                dataIndex: 'description'
                            }, <?php if ($this->subscriptionType == Db_Table_Row_Subscription::OBJECT_TYPE_DOMAIN) : ?> {
                                header: <?php echo $this->jsLmsg('currentValue');?>,
                                sortable: false,
                                dataIndex: 'current'
                            }, <?php endif; ?> {
                                header: <?php echo $this->jsLmsg('requestedValue');?>,
                                sortable: false,
                                dataIndex: 'requested'
                            }, {
                                header: <?php echo $this->jsLmsg('availableValue');?>,
                                sortable: false,
                                dataIndex: 'available'
                            } <?php if ($this->subscriptionType == Db_Table_Row_Subscription::OBJECT_TYPE_DOMAIN) : ?>, {
                                header: <?php echo $this->jsLmsg('affectedSites');?>,
                                sortable: false,
                                dataIndex: 'domains',
                                renderer: function(item) {
                                    return item.domains.join("<br>");
                                }
                            } <?php endif; ?>
                        ]
                    })
                ]
            })
        ]
    });
//]]>
</script>
