<style>
    .TreeItem{
        display:inline-block;
        cursor:default();
    }
    .dynatree-exp-cd span.dynatree-expander,.dynatree-exp-cdl span.dynatree-expander {
        background-position: 0 !important ;
        margin-top:-4px;
    }
</style>
<script src=" <?php echo THEME_PATH; ?>/plugins/jquery-ui/jquery-ui.min.js" type="text/javascript"></script>
<script src="<?php echo THEME_PATH; ?>/plugins/jquery-dynatree/jquery.dynatree.min.js" type="text/javascript"></script>
<link href="<?php echo THEME_PATH; ?>/plugins/jquery-dynatree/skin/ui.dynatree.css" rel="stylesheet" type="text/css" media="screen"/>
<div class="container-fluid container-fixed-lg bg-white">
    <div class="panel panel-transparent">
        <div class="panel-heading">
            <div class="panel-title"><?php print CommonLanguage::getMessage('roles_permissions'); ?></div>
            <?php if ($permissions->hasPermission('add_role_permissions') && smc_session()['default_setting']['sync_type'] != 2) {?>
            <div class="col-xs-12 p-0 m-b-10">
                <div class="floatingContainer ">
                    <a href="" id="add-role-permissions" data-target="#add-edit-role-permissions-modal" data-toggle="modal" >
                        <div class="actionButton bg-info-light" >
                            <p class="floatingText"><span class="floatingTextBG"><?php echo CommonLanguage::getMessage('add_role_permissions');?></span></p>
                        </div>
                    </a>
                </div>
            </div>
            <?php }?>
        </div>
        <div class="panel-body">
            <div class="row">
                <div class="col-md-12">
                    <div class="table-responsive">
                        <table class="table table-bordered setting-table" id="tableWithSearch">
                            <thead>
                                <tr>
                                    <th class="text-center"><?php print CommonLanguage::getMessage('role'); ?></th>
                                    <th class="text-center"><?php print CommonLanguage::getMessage('parent'); ?></th>
                                    <th class="text-center"><?php print CommonLanguage::getMessage('Action'); ?></th>
                                </tr>
                            </thead>
                            <tbody>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script>
    $(function(){
        RebuildDataTable($('.panel-heading .panel-title').html(), [0, 1, 2], 'SettingsAjax/getRoles');
    });
</script>
<?php 
include 'Views/Settings/role-permissions-modal.php';