* Name 'other' package.
This commit is contained in:
@@ -231,6 +231,15 @@ class group extends control
|
||||
$subsetCode = $priv->subset;
|
||||
$packageCode = $priv->package;
|
||||
if(!isset($packages[$subsetCode])) $packages[$subsetCode] = array();
|
||||
if(!isset($subsets[$subsetCode]))
|
||||
{
|
||||
$subset = new stdclass();
|
||||
$subset->code = $subsetCode;
|
||||
$subset->allCount = 0;
|
||||
$subset->selectCount = 0;
|
||||
|
||||
$subsets[$subsetCode] = $subset;
|
||||
}
|
||||
|
||||
if(!isset($packages[$subsetCode][$packageCode]))
|
||||
{
|
||||
@@ -322,8 +331,11 @@ class group extends control
|
||||
{
|
||||
if(isset($privs["$module-$method"])) continue;
|
||||
|
||||
if(!isset($subsets[$module])) $subsets[$module] = isset($this->lang->$module) && isset($this->lang->$module->common) ? $this->lang->$module->common : $module;
|
||||
$packages[$subset]['other'] = $this->lang->group->other;
|
||||
if(!isset($subsets[$module]))
|
||||
{
|
||||
$subsets[$module] = isset($this->lang->$module) && isset($this->lang->$module->common) ? $this->lang->$module->common : $module;
|
||||
$packages[$module] = array('other' => $this->lang->group->other);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -82,12 +82,6 @@ $lang->moduleOrder[250] = 'holiday';
|
||||
|
||||
$lang->resource = new stdclass();
|
||||
|
||||
/* Index module. */
|
||||
$lang->resource->index = new stdclass();
|
||||
$lang->resource->index->index = 'index';
|
||||
|
||||
$lang->index->methodOrder[0] = 'index';
|
||||
|
||||
/* My module. */
|
||||
$lang->resource->my = new stdclass();
|
||||
$lang->resource->my->index = 'indexAction';
|
||||
|
||||
@@ -1770,7 +1770,7 @@ class groupModel extends model
|
||||
if(isset($allPrivs["$module-$method"])) continue;
|
||||
|
||||
if(!isset($this->lang->$module->$methodLang)) $this->app->loadLang($module);
|
||||
$priv = (object)array('subset' => $module, 'package' => 'other', 'module' => $module, 'method' => $method, 'selected' => false, 'name' => $this->lang->$moduleName->$methodLang);
|
||||
$priv = (object)array('subset' => $module, 'package' => 'other', 'module' => $module, 'method' => $method, 'selected' => false, 'name' => $this->lang->$module->$methodLang);
|
||||
|
||||
$privList["$module-$method"] = $priv;
|
||||
}
|
||||
@@ -2319,6 +2319,8 @@ class groupModel extends model
|
||||
*/
|
||||
public function getRelatedPrivs($allPrivList, $selectedPrivList, $recommendSelect = array())
|
||||
{
|
||||
foreach($this->lang->resource as $moduleName => $action) $this->app->loadLang($moduleName);
|
||||
|
||||
$privSubsets = array();
|
||||
$relatedPrivs = array('depend' => array(), 'recommend' => array());
|
||||
foreach($this->config->group->package as $packagePage => $package)
|
||||
|
||||
+1343
-2335
File diff suppressed because it is too large
Load Diff
@@ -101,7 +101,7 @@
|
||||
<th class='text-middle text-left module' rowspan="<?php echo $i == 1 ? count($packages[$subsetName]) : 1;?>" data-module='<?php echo $subsetName;?>' all-privs='<?php echo $subset->allCount;?>' select-privs='<?php echo $subset->selectCount;?>'>
|
||||
<div class="checkbox-primary checkbox-inline checkbox-left check-all">
|
||||
<input type='checkbox' id='allChecker<?php echo $subsetName;?>' value='1' <?php if($subset->selectCount != 0 && $subset->selectCount == $subset->allCount) echo 'checked';?>>
|
||||
<?php $subsetTitle = $lang->$subsetName->common;?>
|
||||
<?php $subsetTitle = isset($lang->$subsetName) && isset($lang->$subsetName->common) ? $lang->$subsetName->common : $subsetName;?>
|
||||
<?php if(in_array($subsetName, array('doc', 'api'))) $subsetTitle = $lang->$subsetName->manage;?>
|
||||
<label class='text-left <?php if($subset->selectCount != 0 && $subset->selectCount == $subset->allCount) echo 'checkbox-indeterminate-block';?>' for='allChecker<?php echo $moduleName;?>'><?php echo $subsetTitle;?></label>
|
||||
</div>
|
||||
|
||||
@@ -97,7 +97,7 @@
|
||||
<th class='text-middle text-left module' data-module='<?php echo $subsetName;?>' all-privs='<?php echo $subset->allCount;?>' select-privs='<?php echo $subset->selectCount;?>'>
|
||||
<div class="checkbox-primary checkbox-inline checkbox-left check-all">
|
||||
<input type='checkbox' id='allChecker<?php echo $subsetName;?>' value='1' <?php if($subset->selectCount && $subset->allCount == $subset->selectCount) echo 'checked';?>>
|
||||
<?php $subsetTitle = $lang->$subsetName->common;?>
|
||||
<?php $subsetTitle = isset($lang->$subsetName) && isset($lang->$subsetName->common) ? $lang->$subsetName->common : $subsetName;?>
|
||||
<?php if(in_array($subsetName, array('doc', 'api'))) $subsetTitle = $lang->$subsetName->manage;?>
|
||||
<label class='text-left <?php if($subset->selectCount && $subset->allCount != $subset->selectCount) echo 'checkbox-indeterminate-block';?>' for='allChecker<?php echo $subsetName;?>'><?php echo $subsetTitle;?></label>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user