<?php
/**
 * The manage privilege view of group module of ZDOO.
 *
 * @copyright   Copyright 2009-2018 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
 * @license     ZPL (http://zpl.pub/page/zplv12.html)
 * @author      Xiying Guan <guanxiying@xirangit.com>
 * @package     group
 * @version     $Id: managepriv.html.php 4129 2013-01-18 01:58:14Z wwccss $
 * @link        http://www.zdoo.com
 */
?>
<?php include '../../common/view/header.html.php';?>
<div id='mainTitle' class='clearfix'>
  <div class='btn-toolbar pull-left'>
    <?php if(!isonlybody()):?>
    <?php echo html::a(inlink('browse'), '<i class="icon icon-back icon-sm"></i> ' . $lang->goback, "class='btn btn-back'");?>
    <div class="divider"></div>
    <?php endif;?>
    <div class="page-title">
      <span class="text"><?php echo $lang->group->managePriv . $lang->minus . $group->name;?> <i class='icon icon-angle-right'></i></span>
    </div>
    <?php
    $class = $currentApp ? '' : 'btn-active-text';
    echo html::a(inlink('managePriv', "type=byGroup&param={$group->id}"), "<span class='text'>{$lang->group->all}</span>", "class='btn btn-link {$class}'");
    foreach($this->lang->apps as $app => $appName)
    {
        if($app != 'sys' && !isset($groupPrivs['apppriv'][$app])) continue;
        $class = ($app == $currentApp ? 'btn-active-text' : '');
        echo html::a(helper::createLink('group', 'managePriv', "type=byGroup&param={$group->id}&app={$app}&menu="), "<span class='text'>" . zget($apps, $app) . '</span>', "class='btn btn-link {$class}'");
    }
    ?>
  </div>
</div>
<?php
if($type == 'byGroup')  include 'privbygroup.html.php';
if($type == 'byModule') include 'privbymodule.html.php';
include '../../common/view/footer.html.php';
?>
