<main class="group-page" ng-if="groupExists">
    <?=  $this->load->view('/partials/top') ?>
    <div>
        <div ng-if="shared">
            </div>
            <?php if (!isSuperHub()) { ?>
                <div ng-if="groupId" class="margin-top">
                    <div
                        id="cmdb-root"
                        data-props='{"displayShowJson": false, "identifier": {{groupId}}, "cmdbServiceUrl": "/groups_app/SharedGroupsCmdb"}'>
                    </div>
                    <script src="/scripts/dist/cmdb.bundle.js"></script>
                </div>
            <?php } ?>
        </div>
        <div class="help-message" ng-if="!shared">
            <div>
                Group data can be used to make changes to the hosts in the group.
                This functionality is only available in shared groups and to users with the appropriate access rights.
            </div>
            <?php if (isActionAllowed('host-groups-shared.post')) { ?>
                <div>

                    Click the toggle button for "Shared group" in the top right to make this a shared group and enable
                    data.
                </div>
            <?php } else { ?>
                <div>
                    You don’t have access to create shared groups, ask an administrator for assistance.
                </div>
            <?php } ?>
            <?php if (!isActionAllowed('shared-group-cmdb.get')) { ?>
                <div>
                    You don’t have access to view the group data, ask an administrator for assistance.
                </div>
            <?php } ?>
        </div>
    </div>
</main>
<div class="flex flex--middle margin-top-large" ng-if="!groupExists">
    <div>
        <?=  $this->load->view('error'); ?>
    </div>
</div>
