This commit is contained in:
daitingting
2018-07-04 15:21:08 +08:00
17 changed files with 203 additions and 28 deletions
+5 -3
View File
@@ -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';
+2 -2
View File
@@ -12,7 +12,7 @@
$lang->company->common = 'Company';
$lang->company->index = "Home";
$lang->company->edit = "Edit Company";
$lang->company->view = "Company Info";
$lang->company->view = "Company Information";
$lang->company->browse = "User List";
$lang->company->dynamic = "Dynamic";
$lang->company->orgView = 'View';
@@ -24,7 +24,7 @@ $lang->company->address = 'Mailing Address';
$lang->company->zipcode = 'Zip Code';
$lang->company->website = 'Website';
$lang->company->backyard = 'Intranet';
$lang->company->guest = 'Anonymous Login';
$lang->company->guest = 'Guest Login';
$lang->company->admins = 'Administrators';
$lang->company->product = $lang->productCommon;
+6 -2
View File
@@ -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();
-3
View File
@@ -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;}
-6
View File
@@ -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")
+6
View File
@@ -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(
+1
View File
@@ -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';
+1
View File
@@ -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 = '按模块浏览';
+15 -3
View File
@@ -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';?>
+68
View File
@@ -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>
+8
View File
@@ -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';?>
+74
View File
@@ -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&section=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);?> &nbsp;
<?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&param=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>
+1 -1
View File
@@ -2301,7 +2301,7 @@ class project extends control
public function importPlanStories($projectID, $planID)
{
$planStories = $planProducts = array();
$planStory = $this->loadModel('story')->getPlanStories($planID);
$planStory = $this->loadModel('story')->getPlanStories($planID, 'changed,active,reviewing');
if(!empty($planStory))
{
$planStories = array_keys($planStory);
+8 -8
View File
@@ -38,11 +38,11 @@ $lang->report->singleColor[] = 'F6BD0F';
$lang->report->projectDeviation = $lang->projectCommon . ' Deviation';
$lang->report->productSummary = $lang->productCommon . ' Summary';
$lang->report->bugCreate = 'Bug Submission Report';
$lang->report->bugAssign = 'Bug Assignment Report';
$lang->report->workload = 'Workload';
$lang->report->workloadAB = 'Workload';
$lang->report->bugOpenedDate = 'Bug Created From';
$lang->report->bugCreate = 'Bug Reported Statement';
$lang->report->bugAssign = 'Bug Assigned Statement';
$lang->report->workload = 'Team Workload Statement';
$lang->report->workloadAB = 'Workload Statement';
$lang->report->bugOpenedDate = 'Bug reported from';
$lang->report->taskAssignedDate = 'From';
$lang->report->beginAndEnd = ' From';
$lang->report->dept = 'Dept';
@@ -50,9 +50,9 @@ $lang->report->deviationChart = $lang->projectCommon . ' Deviation Chart';
$lang->reportList->project->lists[10] = $lang->projectCommon . ' Deviation|report|projectdeviation';
$lang->reportList->product->lists[10] = $lang->productCommon . ' Summary|report|productsummary';
$lang->reportList->test->lists[10] = 'Bugs Reported|report|bugcreate';
$lang->reportList->test->lists[13] = 'Bugs Assigned|report|bugassign';
$lang->reportList->staff->lists[10] = 'Workload|report|workload';
$lang->reportList->test->lists[10] = 'Bugs Reported Statement|report|bugcreate';
$lang->reportList->test->lists[13] = 'Bugs Assigned Statement|report|bugassign';
$lang->reportList->staff->lists[10] = 'Team Workload Statement|report|workload';
$lang->report->id = 'ID';
$lang->report->project = $lang->projectCommon;
+1
View File
@@ -1685,6 +1685,7 @@ class storyModel extends model
->leftJoin(TABLE_PRODUCT)->alias('t4')->on('t2.product = t4.id')
->where($storyQuery)
->andWhere('t1.project')->eq((int)$projectID)
->andWhere('t2.deleted')->eq(0)
->orderBy($orderBy)
->page($pager, 't2.id')
->fetchAll('id');
+5
View File
@@ -822,6 +822,11 @@ class taskModel extends model
->setDefault('assignedDate', $now)
->remove('comment,showModule')
->get();
if($oldTask->status != 'done' and $oldTask->status != 'closed' and $task->left == 0)
{
dao::$errors[] = sprintf($this->lang->error->notempty, $this->lang->task->left);
return false;
}
if(!empty($oldTask->team))
{
+2
View File
@@ -39,10 +39,12 @@
<th class='w-80px'><?php echo empty($task->team) ? $lang->task->assign : $lang->task->transferTo;?></th>
<td class='w-p25-f'><?php echo html::select('assignedTo', $members, empty($task->team) ? $task->assignedTo : $task->nextUser, "class='form-control chosen'");?></td><td></td>
</tr>
<?php if($task->status != 'done' and $task->status != 'closed'):?>
<tr>
<th><?php echo $lang->task->left;?></th>
<td><div class='input-group'><?php echo html::input('left', $task->left, "class='form-control' autocomplete='off'");?> <span class='input-group-addon'><?php echo $lang->task->hour;?></span></div></td><td></td>
</tr>
<?php endif;?>
<tr>
<th><?php echo $lang->comment;?></th>
<td colspan='2'><?php echo html::textarea('comment', '', "rows='6' class='form-control w-p98'");?></td>