Merge branch 'master' of https://github.com/easysoft/zentaopms
This commit is contained in:
+5
-3
@@ -97,9 +97,11 @@ $filter->bug->default->cookie['preProductID'] = 'int';
|
||||
$filter->bug->create->cookie['preBranch'] = 'int';
|
||||
$filter->bug->export->cookie['checkedItem'] = 'reg::checked';
|
||||
|
||||
$filter->doc->browse->cookie['browseType'] = 'reg::browseType';
|
||||
$filter->doc->default->cookie['from'] = 'code';
|
||||
$filter->doc->default->cookie['product'] = 'int';
|
||||
$filter->doc->browse->cookie['browseType'] = 'reg::browseType';
|
||||
$filter->doc->alllibs->cookie['browseType'] = 'reg::browseType';
|
||||
$filter->doc->objectlibs->cookie['browseType'] = 'reg::browseType';
|
||||
$filter->doc->default->cookie['from'] = 'code';
|
||||
$filter->doc->default->cookie['product'] = 'int';
|
||||
$filter->doc->showfiles->cookie['docFilesViewType'] = 'code';
|
||||
|
||||
$filter->file->download->cookie[$config->sessionVar] = 'code';
|
||||
|
||||
@@ -619,7 +619,11 @@ class doc extends control
|
||||
|
||||
$libs = $this->doc->getAllLibsByType($type, $pager, $product);
|
||||
$subLibs = array();
|
||||
if($type == 'product' or $type == 'project') $subLibs = $this->doc->getSubLibGroups($type, array_keys($libs));
|
||||
if($type == 'product' or $type == 'project')
|
||||
{
|
||||
$subLibs = $this->doc->getSubLibGroups($type, array_keys($libs));
|
||||
if($this->cookie->browseType == 'bylist') $this->view->users = $this->loadModel('user')->getPairs('noletter');
|
||||
}
|
||||
if($type == 'custom') $this->view->itemCounts = $this->doc->statLibCounts(array_keys($libs));
|
||||
|
||||
$this->view->type = $type;
|
||||
@@ -739,7 +743,7 @@ class doc extends control
|
||||
public function objectLibs($type, $objectID, $from = 'doc')
|
||||
{
|
||||
$this->from = $from;
|
||||
setcookie('from', $from, $this->config->cookieLife, $this->config->webRoot);
|
||||
setcookie('from', $from, $this->config->cookieLife, $this->config->webRoot);
|
||||
|
||||
$table = $type == 'product' ? TABLE_PRODUCT : TABLE_PROJECT;
|
||||
$object = $this->dao->select('id,name')->from($table)->where('id')->eq($objectID)->fetch();
|
||||
|
||||
@@ -26,9 +26,6 @@
|
||||
.col-md-size .table .c-datetime {display: none;}
|
||||
|
||||
.table-files .btn {padding:0 6px;}
|
||||
.table-files .c-actions .btn > .icon {opacity: 0;}
|
||||
.table-files .c-actions .btn > .icon.text-yellow,
|
||||
.table-files tr:hover .c-actions .btn > .icon {opacity: 1;}
|
||||
|
||||
#docsTree li > a > .icon {opacity: .65;}
|
||||
|
||||
|
||||
@@ -17,12 +17,6 @@ function browseBySearch()
|
||||
$('#queryBox').addClass('show');
|
||||
}
|
||||
|
||||
function setBrowseType(type)
|
||||
{
|
||||
$.cookie('browseType', type, {expires:config.cookieLife, path:config.webRoot});
|
||||
location.href = location.href;
|
||||
}
|
||||
|
||||
$(function(){
|
||||
$('#' + browseType + 'Tab').addClass('active');
|
||||
if(browseType == "bysearch")
|
||||
|
||||
@@ -16,6 +16,12 @@ function toggleAcl(acl)
|
||||
}
|
||||
}
|
||||
|
||||
function setBrowseType(type)
|
||||
{
|
||||
$.cookie('browseType', type, {expires:config.cookieLife, path:config.webRoot});
|
||||
location.href = location.href;
|
||||
}
|
||||
|
||||
$(document).ready(function()
|
||||
{
|
||||
$('.libs-group.sort').sortable(
|
||||
|
||||
@@ -44,6 +44,7 @@ $lang->doc->acl = 'Right';
|
||||
$lang->doc->groups = 'Groups';
|
||||
$lang->doc->users = 'Users';
|
||||
$lang->doc->item = ' Item';
|
||||
$lang->doc->num = 'Docs';
|
||||
$lang->doc->searchResult = 'Search Result';
|
||||
|
||||
$lang->doc->moduleDoc = 'By Module';
|
||||
|
||||
@@ -44,6 +44,7 @@ $lang->doc->acl = '权限';
|
||||
$lang->doc->groups = '分组';
|
||||
$lang->doc->users = '用户';
|
||||
$lang->doc->item = '项';
|
||||
$lang->doc->num = '文档数量';
|
||||
$lang->doc->searchResult = '搜索结果';
|
||||
|
||||
$lang->doc->moduleDoc = '按模块浏览';
|
||||
|
||||
@@ -11,11 +11,14 @@
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php $spliter = (empty($this->app->user->feedback) && !$this->cookie->feedbackView && $this->from == 'doc') ? true : false;?>
|
||||
<?php $spliter = (empty($this->app->user->feedback) && !$this->cookie->feedbackView) ? true : false;?>
|
||||
<div class="main-row <?php if($spliter) echo 'split-row';?>" id="mainRow">
|
||||
<?php if($spliter):?>
|
||||
<?php include './side.html.php';?>
|
||||
<?php endif;?>
|
||||
<?php if($this->cookie->browseType == 'bylist'):?>
|
||||
<?php include dirname(__FILE__) . '/alllibsbylist.html.php';?>
|
||||
<?php else:?>
|
||||
<div class="main-col" data-min-width="400">
|
||||
<div class="panel block-files block-sm no-margin">
|
||||
<div class="panel-heading">
|
||||
@@ -25,6 +28,12 @@
|
||||
<?php if($type == 'project') $panelTitle = $lang->projectCommon;?>
|
||||
<i class="icon icon-folder-open-o text-muted"></i> <?php echo $panelTitle;?>
|
||||
</div>
|
||||
<nav class="panel-actions btn-toolbar">
|
||||
<div class="btn-group">
|
||||
<?php echo html::a('javascript:setBrowseType("bylist")', "<i class='icon icon-bars'></i>", '', "title='{$lang->doc->browseTypeList['list']}' class='btn btn-icon'");?>
|
||||
<?php echo html::a('javascript:setBrowseType("bygrid")', "<i class='icon icon-cards-view'></i>", '', "title='{$lang->doc->browseTypeList['grid']}' class='btn btn-icon text-primary'");?>
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="row row-grid files-grid" data-size="300">
|
||||
@@ -36,7 +45,7 @@
|
||||
<div class="col">
|
||||
<a class="file" href="<?php echo $link;?>">
|
||||
<i class="file-icon icon <?php echo $icon;?>"></i>
|
||||
<div class="file-name"><?php echo $lib->name;?></div>
|
||||
<div class="file-name"><?php echo ($type == 'custom' && strpos($lib->collector, $this->app->user->account) !== false ? "<i class='icon icon-star text-yellow'></i> " : '') . $lib->name;?></div>
|
||||
<?php if($type == 'custom'):?>
|
||||
<div class="text-primary file-info"><?php echo $itemCounts[$lib->id] . $lang->doc->item;?></div>
|
||||
<?php else:?>
|
||||
@@ -45,7 +54,9 @@
|
||||
</a>
|
||||
<?php if($type == 'custom'):?>
|
||||
<div class="actions">
|
||||
<?php common::printLink('doc', 'collect', "objectID=$lib->id&objectType=lib", "<i class='icon icon-star-empty'></i>", 'hiddenwin', "title='{$lang->doc->collect}' class='btn btn-link'")?>
|
||||
<?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;?>
|
||||
<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>
|
||||
<?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('doc', 'deleteLib', "libID=$lib->id", "<i class='icon icon-trash'></i>", 'hiddenwin', "title='{$lang->delete}' class='btn btn-link'")?>
|
||||
<?php common::printLink('tree', 'browse', "rootID=$lib->id&type=doc", "<i class='icon icon-cog'></i>", '', "title='{$lang->tree->manage}' class='btn btn-link'")?>
|
||||
@@ -58,5 +69,6 @@
|
||||
<div class='table-footer'><?php $pager->show('right', 'pagerjs');?></div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
<div class="main-col" data-min-width="400">
|
||||
<div class="panel block-files block-sm no-margin">
|
||||
<div class="panel-heading">
|
||||
<div class="panel-title font-normal">
|
||||
<?php $panelTitle = '';?>
|
||||
<?php if($type == 'custom') $panelTitle = $lang->doc->custom;?>
|
||||
<?php if($type == 'product') $panelTitle = $lang->productCommon;?>
|
||||
<?php if($type == 'project') $panelTitle = $lang->projectCommon;?>
|
||||
<i class="icon icon-folder-open-o text-muted"></i> <?php echo $panelTitle;?>
|
||||
</div>
|
||||
<nav class="panel-actions btn-toolbar">
|
||||
<div class="btn-group">
|
||||
<?php echo html::a('javascript:setBrowseType("bylist")', "<i class='icon icon-bars'></i>", '', "title='{$lang->doc->browseTypeList['list']}' class='btn btn-icon text-primary'");?>
|
||||
<?php echo html::a('javascript:setBrowseType("bygrid")', "<i class='icon icon-cards-view'></i>", '', "title='{$lang->doc->browseTypeList['grid']}' class='btn btn-icon'");?>
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
<div class="panel-body has-table">
|
||||
<table class="table table-borderless table-hover table-files">
|
||||
<thead>
|
||||
<tr>
|
||||
<?php $name = '';?>
|
||||
<?php if($type == 'product') $name = $lang->product->name;?>
|
||||
<?php if($type == 'project') $name = $lang->project->name;?>
|
||||
<?php if($type == 'custom') $name = $lang->doc->libName;?>
|
||||
<th class="c-name"><?php echo $name;?></th>
|
||||
<th class="c-num"><?php echo $lang->doc->num;?></th>
|
||||
<?php if($type != 'custom'):?>
|
||||
<th class="c-user"><?php echo $lang->doc->addedBy;?></th>
|
||||
<th class="c-datetime"><?php echo $lang->doc->addedDate;?></th>
|
||||
<?php else:?>
|
||||
<th class="c-actions-4"><?php echo $lang->actions;?></th>
|
||||
<?php endif;?>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($libs as $lib):?>
|
||||
<?php $link = $type != 'custom' ? $this->createLink('doc', 'objectLibs', "type=$type&objectID=$lib->id") : $this->createLink('doc', 'browse', "libID=$lib->id");?>
|
||||
<tr>
|
||||
<td class="c-name"><?php echo html::a($link, $lib->name);?></td>
|
||||
<td class="c-num">
|
||||
<?php if($type == 'custom'):?>
|
||||
<?php echo $itemCounts[$lib->id] . $lang->doc->item;?>
|
||||
<?php else:?>
|
||||
<?php echo count($subLibs[$lib->id]) . $lang->doc->item;?>
|
||||
<?php endif;?>
|
||||
</td>
|
||||
<?php if($type != 'custom'):?>
|
||||
<td class="c-user"><?php if($lib->createdBy) echo zget($users, $lib->createdBy);?></td>
|
||||
<td class="c-datetime"><?php if($lib->createdDate != '00-00-00 00:00:00') echo formatTime($lib->createdDate, 'm-d h:i');?></td>
|
||||
<?php else:?>
|
||||
<td class="c-actions">
|
||||
<?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;?>
|
||||
<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>
|
||||
<?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('doc', 'deleteLib', "libID=$lib->id", "<i class='icon icon-trash'></i>", 'hiddenwin', "title='{$lang->delete}' class='btn btn-link'")?>
|
||||
<?php common::printLink('tree', 'browse', "rootID=$lib->id&type=doc", "<i class='icon icon-cog'></i>", '', "title='{$lang->tree->manage}' class='btn btn-link'")?>
|
||||
</td>
|
||||
<?php endif;?>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class='table-footer'><?php $pager->show('right', 'pagerjs');?></div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -15,6 +15,9 @@
|
||||
<?php if($this->from == 'doc'):?>
|
||||
<?php include './side.html.php';?>
|
||||
<?php endif;?>
|
||||
<?php if($this->cookie->browseType == 'bylist'):?>
|
||||
<?php include dirname(__FILE__) . '/objectlibsbylist.html.php';?>
|
||||
<?php else:?>
|
||||
<div class="main-col" data-min-width="400">
|
||||
<div class="panel block-files block-sm no-margin">
|
||||
<div class="panel-heading">
|
||||
@@ -22,6 +25,10 @@
|
||||
<i class="icon icon-folder-open-o text-muted"></i> <?php echo $object->name;?>
|
||||
</div>
|
||||
<nav class="panel-actions btn-toolbar">
|
||||
<div class="btn-group">
|
||||
<?php echo html::a('javascript:setBrowseType("bylist")', "<i class='icon icon-bars'></i>", '', "title='{$lang->doc->browseTypeList['list']}' class='btn btn-icon'");?>
|
||||
<?php echo html::a('javascript:setBrowseType("bygrid")', "<i class='icon icon-cards-view'></i>", '', "title='{$lang->doc->browseTypeList['grid']}' class='btn btn-icon text-primary'");?>
|
||||
</div>
|
||||
<div class="dropdown">
|
||||
<button type="button" title="<?php echo $lang->customConfig;?>" class="btn btn-icon" data-toggle="dropdown"><i class="icon icon-cog"></i></button>
|
||||
<div class="dropdown-menu pull-right col-lg" id="pageSetting">
|
||||
@@ -83,6 +90,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<?php js::set('type', 'doc');?>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
<div class="main-col" data-min-width="400">
|
||||
<div class="panel block-files block-sm no-margin">
|
||||
<div class="panel-heading">
|
||||
<div class="panel-title font-normal">
|
||||
<i class="icon icon-folder-open-o text-muted"></i> <?php echo $object->name;?>
|
||||
</div>
|
||||
<nav class="panel-actions btn-toolbar">
|
||||
<div class="btn-group">
|
||||
<?php echo html::a('javascript:setBrowseType("bylist")', "<i class='icon icon-bars'></i>", '', "title='{$lang->doc->browseTypeList['list']}' class='btn btn-icon text-primary'");?>
|
||||
<?php echo html::a('javascript:setBrowseType("bygrid")', "<i class='icon icon-cards-view'></i>", '', "title='{$lang->doc->browseTypeList['grid']}' class='btn btn-icon'");?>
|
||||
</div>
|
||||
<div class="dropdown">
|
||||
<button type="button" title="<?php echo $lang->customConfig;?>" class="btn btn-icon" data-toggle="dropdown"><i class="icon icon-cog"></i></button>
|
||||
<div class="dropdown-menu pull-right col-lg" id="pageSetting">
|
||||
<form class='with-padding load-indicator' id='pageSettingForm' method='post' target='hiddenwin' action='<?php echo $this->createLink('custom', 'ajaxSaveCustomFields', 'module=doc§ion=custom&key=objectLibs');?>'>
|
||||
<div><?php echo $lang->customConfig;?></div>
|
||||
<div class="row row-grid with-padding">
|
||||
<?php foreach($customObjectLibs as $libType => $libTypeName):?>
|
||||
<div class="col-xs-12">
|
||||
<?php $checked = (strpos(",$showLibs,", ",$libType,") !== false) ? " checked ='checked'" : "";?>
|
||||
<div class="checkbox-primary">
|
||||
<input type="checkbox" name="fields[]" value="<?php echo $libType;?>" <?php echo $checked;?> id="fields<?php echo $libType;?>">
|
||||
<label for="fields<?php echo $libType;?>"><?php echo $libTypeName;?></label>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach;?>
|
||||
</div>
|
||||
<div>
|
||||
<?php echo html::submitButton($lang->save);?>
|
||||
<?php echo html::commonButton($lang->cancel, '', "btn close-dropdown");?>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
<div class='panel-body has-table'>
|
||||
<table class="table table-borderless table-hover table-files">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="c-name"><?php echo $lang->doc->libName;?></th>
|
||||
<th class="c-num"><?php echo $lang->doc->num;?></th>
|
||||
<th class="c-actions-4"><?php echo $lang->actions;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($libs as $libID => $lib):?>
|
||||
<?php if($libID == 'project' and $from != 'doc') continue;?>
|
||||
<?php if(strpos($config->doc->custom->objectLibs, 'files') === false && $libID == 'files') continue;?>
|
||||
<?php if(strpos($config->doc->custom->objectLibs, 'customFiles') === false && isset($lib->main) && !$lib->main) continue;?>
|
||||
|
||||
<?php $libLink = inlink('browse', "libID=$libID&browseType=all¶m=0&orderBy=id_desc&from=$from");?>
|
||||
<?php if($libID == 'project') $libLink = inlink('allLibs', "type=project&product=$object->id");?>
|
||||
<?php if($libID == 'files') $libLink = inlink('showFiles', "type=$type&objectID=$object->id");?>
|
||||
<tr>
|
||||
<td class="c-name"><?php echo html::a($libLink, $lib->name);?></td>
|
||||
<td class="c-num"><?php echo $lib->allCount . $lang->doc->item;?></td>
|
||||
<td class="c-actions">
|
||||
<?php if($libID != 'project' and $libID != 'files'):?>
|
||||
<?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;?>
|
||||
<a data-url="<?php echo $this->createLink('doc', 'collect', "objectID=$libID&objectType=doclib");?>" title="<?php echo $collectTitle;?>" class='btn btn-link ajaxCollect'><i class='icon <?php echo $star;?>'></i></a>
|
||||
<?php common::printLink('doc', 'editLib', "libID=$libID", "<i class='icon icon-edit'></i>", '', "title='{$lang->edit}' class='btn btn-link iframe'")?>
|
||||
<?php if(empty($lib->main)) common::printLink('doc', 'deleteLib', "libID=$libID", "<i class='icon icon-trash'></i>", 'hiddenwin', "title='{$lang->delete}' class='btn btn-link'")?>
|
||||
<?php common::printLink('tree', 'browse', "rootID=$libID&type=doc", "<i class='icon icon-cog'></i>", '', "title='{$lang->doc->manageType}' class='btn btn-link'")?>
|
||||
<?php endif;?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user