add param $this->session->program

This commit is contained in:
zhaohaibo
2020-05-26 13:37:02 +08:00
parent ee52389234
commit e9b2a4bc32
3 changed files with 28 additions and 28 deletions
+1 -1
View File
@@ -108,7 +108,7 @@ class docModel extends model
}
$actions = $this->setFastMenu($fastLib);
$actions .= common::hasPriv('doc', 'createLib') ? html::a(helper::createLink('doc', 'createLib', "type={$type}&objectID={$currentLib}"), "<i class='icon icon-plus'></i> " . $this->lang->doc->createLib, '', "class='btn btn-secondary iframe'") : '';
$actions .= common::hasPriv('doc', 'createLib') ? html::a(helper::createLink('doc', 'createLib', "type={$type}&objectID={$currentLib}", '', '', $this->session->program), "<i class='icon icon-plus'></i> " . $this->lang->doc->createLib, '', "class='btn btn-secondary iframe'") : '';
$this->lang->modulePageActions = $actions;
}
+17 -17
View File
@@ -46,9 +46,9 @@ var browseType = '<?php echo $browseType;?>';
<div class="dropdown">
<button class="btn" type="button" data-toggle="dropdown"><i class='icon-cog'></i> <span class="caret"></span></button>
<ul class='dropdown-menu'>
<li><?php common::printLink('tree', 'browse', "libID=$libID&viewType=doc", "<i class='icon icon-cog'></i>" . $lang->doc->manageType);?></li>
<li><?php common::printLink('doc', 'editLib', "libID=$libID", "<i class='icon icon-edit'></i>" . $lang->doc->editLib, '', "class='iframe'");?></li>
<li><?php common::printLink('doc', 'deleteLib', "libID=$libID", "<i class='icon icon-trash'></i>" . $lang->doc->deleteLib, 'hiddenwin');?></li>
<li><?php common::printLink('tree', 'browse', "libID=$libID&viewType=doc", "<i class='icon icon-cog'></i>" . $lang->doc->manageType, '', '', '', '', '', $this->session->program);?></li>
<li><?php common::printLink('doc', 'editLib', "libID=$libID", "<i class='icon icon-edit'></i>" . $lang->doc->editLib, '', "class='iframe'", '', '', '', $this->session->program);?></li>
<li><?php common::printLink('doc', 'deleteLib', "libID=$libID", "<i class='icon icon-trash'></i>" . $lang->doc->deleteLib, 'hiddenwin', '', '', '', '', $this->session->program);?></li>
</ul>
</div>
<?php if(common::hasPriv('doc', 'create')):?>
@@ -57,7 +57,7 @@ var browseType = '<?php echo $browseType;?>';
<ul class='dropdown-menu'>
<?php foreach($lang->doc->typeList as $typeKey => $typeName):?>
<?php $class = strpos($config->doc->officeTypes, $typeKey) !== false ? 'iframe' : '';?>
<li><?php echo html::a($this->createLink('doc', 'create', "libID=$libID&moduleID=$moduleID&type=$typeKey"), $typeName, '', "class='$class'");?></li>
<li><?php echo html::a($this->createLink('doc', 'create', "libID=$libID&moduleID=$moduleID&type=$typeKey", '', '', $this->session->program), $typeName, '', "class='$class'");?></li>
<?php endforeach;?>
</ul>
</div>
@@ -75,7 +75,7 @@ var browseType = '<?php echo $browseType;?>';
<?php if($libID):?>
<span class="text-muted"><?php echo $lang->doc->noDoc;?></span>
<?php if(common::hasPriv('doc', 'create')):?>
<?php echo html::a($this->createLink('doc', 'create', "libID={$libID}&moduleID=$moduleID"), "<i class='icon icon-plus'></i> " . $lang->doc->create, '', "class='btn btn-info'");?>
<?php echo html::a($this->createLink('doc', 'create', "libID={$libID}&moduleID=$moduleID", '', '', $this->session->program), "<i class='icon icon-plus'></i> " . $lang->doc->create, '', "class='btn btn-info'");?>
<?php endif;?>
<?php elseif($browseType == 'byediteddate'):?>
<span class="text-muted"><?php echo $lang->doc->noEditedDoc;?></span>
@@ -105,17 +105,17 @@ var browseType = '<?php echo $browseType;?>';
<?php $star = strpos($lib->collector, ',' . $this->app->user->account . ',') !== false ? 'icon-star text-yellow' : 'icon-star-empty';?>
<?php $collectTitle = strpos($lib->collector, ',' . $this->app->user->account . ',') !== false ? $lang->doc->cancelCollection : $lang->doc->collect;?>
<tr>
<td class="c-name"><?php echo html::a(inlink('browse', "libID={$lib->id}&browseType=all&param=0&orderBy=$orderBy&from=$from"), "<i class='icon icon-folder text-yellow'></i> &nbsp;" . $lib->name);?></td>
<td class="c-name"><?php echo html::a($this->createLink('doc', 'browse', "libID={$lib->id}&browseType=all&param=0&orderBy=$orderBy&from=$from", '', '', $this->session->program), "<i class='icon icon-folder text-yellow'></i> &nbsp;" . $lib->name);?></td>
<td class="c-num"></td>
<td class="c-user"></td>
<td class="c-datetime"></td>
<td class="c-datetime"></td>
<td>
<?php if(common::hasPriv('doc', 'collect')):?>
<a data-url="<?php echo $this->createLink('doc', 'collect', "objectID=$lib->id&objectType=doclib");?>" title="<?php echo $collectTitle;?>" class='btn btn-link ajaxCollect'><i class='icon <?php echo $star;?>'></i></a>
<a data-url="<?php echo $this->createLink('doc', 'collect', "objectID=$lib->id&objectType=doclib", '', '', $this->session->program);?>" title="<?php echo $collectTitle;?>" class='btn btn-link ajaxCollect'><i class='icon <?php echo $star;?>'></i></a>
<?php endif;?>
<?php common::printLink('doc', 'editLib', "libID=$lib->id", "<i class='icon icon-edit'></i>", '', "title='{$lang->edit}' class='btn btn-link iframe'")?>
<?php common::printLink('tree', 'browse', "rootID=$lib->id&type=doc", "<i class='icon icon-cog'></i>", '', "title='{$lang->tree->manage}' class='btn btn-link'")?>
<?php common::printLink('doc', 'editLib', "libID=$lib->id", "<i class='icon icon-edit'></i>", '', "title='{$lang->edit}' class='btn btn-link iframe'", '', '', '', $this->session->program)?>
<?php common::printLink('tree', 'browse', "rootID=$lib->id&type=doc", "<i class='icon icon-cog'></i>", '', "title='{$lang->tree->manage}' class='btn btn-link'", '', '', '', $this->session->program)?>
</td>
</tr>
<?php endforeach;?>
@@ -124,9 +124,9 @@ var browseType = '<?php echo $browseType;?>';
<?php foreach($attachLibs as $libType => $attachLib):?>
<tr>
<?php if($libType == 'project'):?>
<td class="c-name"><?php echo html::a(inlink('allLibs', "type=project&product={$currentLib->product}"), "<i class='icon icon-folder text-yellow'></i> &nbsp;" . $attachLib->name);?></td>
<td class="c-name"><?php echo html::a($this->createLink('doc', 'allLibs', "type=project&product={$currentLib->product}", '', '', $this->session->program), "<i class='icon icon-folder text-yellow'></i> &nbsp;" . $attachLib->name);?></td>
<?php elseif($libType == 'files'):?>
<td class="c-name"><?php echo html::a(inlink('showFiles', "type=$type&objectID={$currentLib->$type}"), "<i class='icon icon-folder text-yellow'></i> &nbsp;" . $attachLib->name);?></td>
<td class="c-name"><?php echo html::a($this->createLink('doc', 'showFiles', "type=$type&objectID={$currentLib->$type}", '', '', $this->session->program), "<i class='icon icon-folder text-yellow'></i> &nbsp;" . $attachLib->name);?></td>
<?php endif;?>
<td class="c-num"></td>
<td class="c-user"></td>
@@ -141,14 +141,14 @@ var browseType = '<?php echo $browseType;?>';
<?php $star = strpos($module->collector, ',' . $this->app->user->account . ',') !== false ? 'icon-star text-yellow' : 'icon-star-empty';?>
<?php $collectTitle = strpos($module->collector, ',' . $this->app->user->account . ',') !== false ? $lang->doc->cancelCollection : $lang->doc->collect;?>
<tr>
<td class="c-name"><?php echo html::a(inlink('browse', "libID=$libID&browseType=bymodule&param=$module->id&orderBy=$orderBy&from=$from"), "<i class='icon icon-folder text-yellow'></i> &nbsp;" . $module->name);?></td>
<td class="c-name"><?php echo html::a($this->createLink('doc', 'browse', "libID=$libID&browseType=bymodule&param=$module->id&orderBy=$orderBy&from=$from", '', '', $this->session->program), "<i class='icon icon-folder text-yellow'></i> &nbsp;" . $module->name);?></td>
<td class="c-num"></td>
<td class="c-user"></td>
<td class="c-datetime"></td>
<td class="c-datetime"></td>
<td class="c-actions">
<?php if(common::hasPriv('doc', 'collect')):?>
<a data-url="<?php echo $this->createLink('doc', 'collect', "objectID=$module->id&objectType=module");?>" title="<?php echo $collectTitle;?>" class='btn btn-link ajaxCollect'><i class='icon <?php echo $star;?>'></i></a>
<a data-url="<?php echo $this->createLink('doc', 'collect', "objectID=$module->id&objectType=module", '', '', $this->session->program);?>" title="<?php echo $collectTitle;?>" class='btn btn-link ajaxCollect'><i class='icon <?php echo $star;?>'></i></a>
<?php endif;?>
</td>
</tr>
@@ -158,17 +158,17 @@ var browseType = '<?php echo $browseType;?>';
<?php $star = strpos($doc->collector, ',' . $this->app->user->account . ',') !== false ? 'icon-star text-yellow' : 'icon-star-empty';?>
<?php $collectTitle = strpos($doc->collector, ',' . $this->app->user->account . ',') !== false ? $lang->doc->cancelCollection : $lang->doc->collect;?>
<tr>
<td class="c-name"><?php echo html::a(inlink('view', "docID=$doc->id"), "<i class='icon icon-file-text text-muted'></i> &nbsp;" . $doc->title);?></td>
<td class="c-name"><?php echo html::a($this->createLink('doc', 'view', "docID=$doc->id", '', '', $this->session->program), "<i class='icon icon-file-text text-muted'></i> &nbsp;" . $doc->title);?></td>
<td class="c-num"><?php echo $doc->fileSize ? $doc->fileSize : '-';?></td>
<td class="c-user"><?php echo zget($users, $doc->addedBy);?></td>
<td class="c-datetime"><?php echo formatTime($doc->addedDate, 'y-m-d');?></td>
<td class="c-datetime"><?php echo formatTime($doc->editedDate, 'y-m-d');?></td>
<td class="c-actions">
<?php if(common::hasPriv('doc', 'collect')):?>
<a data-url="<?php echo $this->createLink('doc', 'collect', "objectID=$doc->id&objectType=doc");?>" title="<?php echo $collectTitle;?>" class='btn btn-link ajaxCollect'><i class='icon <?php echo $star;?>'></i></a>
<a data-url="<?php echo $this->createLink('doc', 'collect', "objectID=$doc->id&objectType=doc", '', '', $this->session->program);?>" title="<?php echo $collectTitle;?>" class='btn btn-link ajaxCollect'><i class='icon <?php echo $star;?>'></i></a>
<?php endif;?>
<?php common::printLink('doc', 'edit', "docID=$doc->id", "<i class='icon icon-edit'></i>", '', "title='{$lang->edit}' class='btn btn-link'")?>
<?php common::printLink('doc', 'delete', "docID=$doc->id", "<i class='icon icon-trash'></i>", 'hiddenwin', "title='{$lang->delete}' class='btn btn-link'")?>
<?php common::printLink('doc', 'edit', "docID=$doc->id", "<i class='icon icon-edit'></i>", '', "title='{$lang->edit}' class='btn btn-link'", '', '', '', $this->session->program)?>
<?php common::printLink('doc', 'delete', "docID=$doc->id", "<i class='icon icon-trash'></i>", 'hiddenwin', "title='{$lang->delete}' class='btn btn-link'", '', '', '', $this->session->program)?>
</td>
</tr>
<?php endforeach;?>
+10 -10
View File
@@ -37,7 +37,7 @@ $sideWidth = common::checkNotCN() ? '270' : '238';
<li>
<?php
$text = zget($lang->doclib->create, $tabValue, '');
if($text and common::hasPriv($tabValue, 'create')) echo html::a($this->createLink($tabValue, 'create'), $text, '', "class='text-ellipsis'");
if($text and common::hasPriv($tabValue, 'create')) echo html::a($this->createLink($tabValue, 'create', '', '', '', $this->session->program), $text, '', "class='text-ellipsis'");
?>
</li>
<?php else:?>
@@ -60,9 +60,9 @@ $sideWidth = common::checkNotCN() ? '270' : '238';
?>
<li <?php echo "class='$activeClass'";?>>
<?php if($customLibCount > 0):?>
<?php echo html::a($this->createLink('doc', 'objectLibs', "type=$tabValue&objectID=$tabMenu->id"), $icon . $tabMenu->name, '', "class='text-ellipsis' title='{$tabMenu->name}'");?>
<?php echo html::a($this->createLink('doc', 'objectLibs', "type=$tabValue&objectID=$tabMenu->id", '', '', $this->session->program), $icon . $tabMenu->name, '', "class='text-ellipsis' title='{$tabMenu->name}'");?>
<?php else:?>
<?php echo html::a($this->createLink('doc', 'browse', "libID=$mainLibID"), $icon . $tabMenu->name, '', "class='text-ellipsis' title='{$tabMenu->name}'");?>
<?php echo html::a($this->createLink('doc', 'browse', "libID=$mainLibID", '', '', $this->session->program), $icon . $tabMenu->name, '', "class='text-ellipsis' title='{$tabMenu->name}'");?>
<?php endif;?>
<?php if(isset($sideSubLibs[$tabValue][$tabMenu->id])):?>
<ul>
@@ -70,19 +70,19 @@ $sideWidth = common::checkNotCN() ? '270' : '238';
<?php
if($subLibID == 'project')
{
$subLibLink = inlink('allLibs', "type=project&product=$tabMenu->id");
$subLibLink = $this->createLink('doc', 'allLibs', "type=project&product=$tabMenu->id", '', '', $this->session->program);
$activeClass = ($this->methodName == 'alllibs' && $type == 'project' && $$tabValue == $tabMenu->id) ? "class='active'" : '';
$icon = 'icon-stack';
}
elseif($subLibID == 'files')
{
$subLibLink = inlink('showFiles', "type=$tabValue&objectID=$tabMenu->id");
$subLibLink = $this->createLink('doc', 'showFiles', "type=$tabValue&objectID=$tabMenu->id", '', '', $this->session->program);
$activeClass = ($this->methodName == 'showfiles' && $type == $tabValue && $object->id == $tabMenu->id) ? "class='active'" : '';
$icon = 'icon-paper-clip';
}
else
{
$subLibLink = inlink('browse', "libID=$subLibID");
$subLibLink = $this->createLink('doc', 'browse', "libID=$subLibID", '', '', $this->session->program);
$activeClass = ($this->methodName == 'browse' && $browseType != 'bymodule' && $subLibID == $libID) ? "class='active'" : '';
$icon = 'icon-folder-outline';
}
@@ -126,7 +126,7 @@ $sideWidth = common::checkNotCN() ? '270' : '238';
<li>
<?php
$text = zget($lang->doclib->create, $tabValue, '');
if($text and common::hasPriv('doc', 'createLib')) echo html::a($this->createLink('doc', 'createLib', "type={$tabValue}"), $text, '', "class='iframe' data-width='70%'");
if($text and common::hasPriv('doc', 'createLib')) echo html::a($this->createLink('doc', 'createLib', "type={$tabValue}", '', '', $this->session->program), $text, '', "class='iframe' data-width='70%'");
?>
</li>
<?php else:?>
@@ -139,13 +139,13 @@ $sideWidth = common::checkNotCN() ? '270' : '238';
$activeClass = ($this->methodName == 'browse' && isset($currentLib->id) && $currentLib->id == $sideLibID) ? 'active' : $activeClass;
?>
<li <?php echo "class='$activeClass'";?>>
<?php echo html::a($this->createLink('doc', 'browse', "libID=$sideLibID"), "<i class='icon icon-folder-o'></i> " . $sideLibName, '', "class='text-ellipsis' title='{$sideLibName}'");?>
<?php echo html::a($this->createLink('doc', 'browse', "libID=$sideLibID", '', '', $this->session->program), "<i class='icon icon-folder-o'></i> " . $sideLibName, '', "class='text-ellipsis' title='{$sideLibName}'");?>
<?php if(isset($allModules[$sideLibID])):?>
<ul>
<?php foreach($allModules[$sideLibID] as $module):?>
<?php if($module->parent != 0) continue;?>
<li <?php if($this->methodName == 'browse' && $browseType == 'bymodule' && $moduleID == $module->id) echo "class='active'";?>>
<?php echo html::a($this->createLink('doc', 'browse', "libID=$sideLibID&browseType=byModule&param={$module->id}"), "<i class='icon icon-folder-outline'></i> " . $module->name, '', "class='text-ellipsis' title='{$module->name}'");?>
<?php echo html::a($this->createLink('doc', 'browse', "libID=$sideLibID&browseType=byModule&param={$module->id}", '', '', $this->session->program), "<i class='icon icon-folder-outline'></i> " . $module->name, '', "class='text-ellipsis' title='{$module->name}'");?>
<?php $this->doc->printChildModule($module, $sideLibID, $this->methodName, $browseType, $moduleID);?>
</li>
<?php endforeach;?>
@@ -185,7 +185,7 @@ $sideWidth = common::checkNotCN() ? '270' : '238';
<strong><?php echo $lang->doc->customShowLibs;?></strong>
</div>
<div class='modal-body'>
<form action='<?php echo $this->createLink('custom', 'ajaxSetDoc');?>' target='hiddenwin' method='post'>
<form action='<?php echo $this->createLink('custom', 'ajaxSetDoc', '', '', '', $this->session->program);?>' target='hiddenwin' method='post'>
<table class='table table-form'>
<tr>
<td><?php echo html::checkbox('showLibs', $lang->doc->customShowLibsList, $config->doc->custom->showLibs);?></td>