Merge branch '12.x' of github.com:easysoft/zentaopms into 12.x

This commit is contained in:
z
2020-11-11 15:40:47 +08:00
68 changed files with 405 additions and 201 deletions
+1
View File
@@ -626,6 +626,7 @@ class bug extends control
$this->view->actions = $this->action->getList('bug', $bugID);
$this->view->builds = $this->loadModel('build')->getProductBuildPairs($productID, $branch = 0, $params = '');
$this->view->preAndNext = $this->loadModel('common')->getPreAndNextObject('bug', $bugID);
$this->view->product = $this->loadModel('product')->getByID( $productID);
$this->display();
}
+3 -1
View File
@@ -117,6 +117,7 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow
?>
</ul>
</div>
<?php if(empty($this->config->global->closedProductStatus) or $product->status != 'closed'):?>
<?php if(!common::checkNotCN()):?>
<?php
common::printLink('bug', 'batchCreate', "productID=$productID&branch=$branch&projectID=0&moduleID=$moduleID", "<i class='icon icon-plus'></i>" . $lang->bug->batchCreate, '', "class='btn btn-secondary'");
@@ -162,6 +163,7 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow
</ul>
</div>
<?php endif;?>
<?php endif;?>
</div>
</div>
<?php endif;?>
@@ -187,7 +189,7 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow
<div class="table-empty-tip">
<p>
<span class="text-muted"><?php echo $lang->bug->noBug;?></span>
<?php if(common::hasPriv('bug', 'create')):?>
<?php if((empty($this->config->global->closedProductStatus) or $product->status != 'closed') and common::hasPriv('bug', 'create')):?>
<?php echo html::a($this->createLink('bug', 'create', "productID=$productID&branch=$branch&extra=moduleID=$moduleID"), "<i class='icon icon-plus'></i> " . $lang->bug->create, '', "class='btn btn-info'");?>
<?php endif;?>
</p>
+4 -2
View File
@@ -30,7 +30,9 @@
</div>
<?php if(!isonlybody()):?>
<div class="btn-toolbar pull-right">
<?php if(empty($this->config->global->closedProductStatus) or $product->status != 'closed'):?>
<?php common::printLink('bug', 'create', "productID={$bug->product}&branch={$bug->branch}&extra=moduleID={$bug->module}", "<i class='icon icon-plus'></i>" . $lang->bug->create, '', "class='btn btn-primary'"); ?>
<?php endif;?>
</div>
<?php endif;?>
</div>
@@ -55,8 +57,8 @@
?>
</div>
</div>
<?php echo $this->fetch('file', 'printFiles', array('files' => $bug->files, 'fieldset' => 'true'));?>
<?php $actionFormLink = $this->createLink('action', 'comment', "objectType=bug&objectID=$bug->id");?>
<?php echo $this->fetch('file', 'printFiles', array('files' => $bug->files, 'fieldset' => 'true', 'object' => $bug));?>
<?php if(!common::checkParentObjectClosed('bug', $bug)) $actionFormLink = $this->createLink('action', 'comment', "objectType=bug&objectID=$bug->id");?>
</div>
<?php $this->printExtendFields($bug, 'div', "position=left&inForm=0&inCell=1");?>
<div class='cell'><?php include '../../common/view/action.html.php';?></div>
+4
View File
@@ -212,6 +212,9 @@ class build extends control
$build = $this->build->getById((int)$buildID, true);
if(!$build) die(js::error($this->lang->notFound) . js::locate('back'));
/* Determines whether an object is editable. */
$changeAllowed = !common::checkParentObjectClosed('build', $build);
$product = $this->loadModel('product')->getById($build->product);
if($product->type != 'normal') $this->lang->product->branch = sprintf($this->lang->product->branch, $this->lang->product->branchName[$product->type]);
@@ -269,6 +272,7 @@ class build extends control
$this->view->type = $type;
$this->view->bugPager = $bugPager;
$this->view->branchName = $build->productType == 'normal' ? '' : $this->loadModel('branch')->getById($build->branch);
$this->view->changeAllowed = $changeAllowed;
$this->display();
}
+7 -7
View File
@@ -48,7 +48,7 @@ tbody tr td:first-child input{display:none;}
</div>
<div class='btn-toolbar pull-right'>
<?php
if(!$build->deleted)
if(!$build->deleted and $changeAllowed)
{
echo $this->buildOperateMenu($build, 'view');
@@ -91,13 +91,13 @@ tbody tr td:first-child input{display:none;}
</ul>
<div class='tab-content'>
<div class='tab-pane <?php if($type == 'story') echo 'active'?>' id='stories'>
<?php if(common::hasPriv('build', 'linkStory')):?>
<?php if($changeAllowed and common::hasPriv('build', 'linkStory')):?>
<div class='actions'><?php echo html::a("javascript:showLink($build->id, \"story\")", '<i class="icon-link"></i> ' . $lang->build->linkStory, '', "class='btn btn-primary'");?></div>
<div class='linkBox cell hidden'></div>
<?php endif;?>
<form class='main-table table-story' data-ride='table' method='post' target='hiddenwin' action='<?php echo inlink('batchUnlinkStory', "buildID={$build->id}")?>' id='linkedStoriesForm'>
<table class='table has-sort-head' id='storyList'>
<?php $canBatchUnlink = common::hasPriv('build', 'batchUnlinkStory');?>
<?php $canBatchUnlink = $changeAllowed and common::hasPriv('build', 'batchUnlinkStory');?>
<?php $vars = "buildID={$build->id}&type=story&link=$link&param=$param&orderBy=%s";?>
<thead>
<tr class='text-center'>
@@ -146,7 +146,7 @@ tbody tr td:first-child input{display:none;}
<td><?php echo $lang->story->stageList[$story->stage];?></td>
<td class='c-actions'>
<?php
if(common::hasPriv('build', 'unlinkStory'))
if($changeAllowed and common::hasPriv('build', 'unlinkStory'))
{
$unlinkURL = inlink('unlinkStory', "buildID=$build->id&story=$story->id");
echo html::a("javascript:ajaxDelete(\"$unlinkURL\", \"storyList\", confirmUnlinkStory)", '<i class="icon-unlink"></i>', '', "class='btn btn-icon' title='{$lang->build->unlinkStory}'");
@@ -176,13 +176,13 @@ tbody tr td:first-child input{display:none;}
</form>
</div>
<div class='tab-pane <?php if($type == 'bug') echo 'active'?>' id='bugs'>
<?php if(common::hasPriv('build', 'linkBug')):?>
<?php if($changeAllowed and common::hasPriv('build', 'linkBug')):?>
<div class='actions'><?php echo html::a("javascript:showLink($build->id, \"bug\")", '<i class="icon-bug"></i> ' . $lang->build->linkBug, '', "class='btn btn-primary'");?></div>
<div class='linkBox cell hidden'></div>
<?php endif;?>
<form class='main-table table-bug' data-ride='table' method='post' target='hiddenwin' action="<?php echo inLink('batchUnlinkBug', "build=$build->id");?>" id='linkedBugsForm'>
<table class='table has-sort-head' id='bugList'>
<?php $canBatchUnlink = common::hasPriv('build', 'batchUnlinkBug');?>
<?php $canBatchUnlink = $changeAllowed and common::hasPriv('build', 'batchUnlinkBug');?>
<?php $vars = "buildID={$build->id}&type=bug&link=$link&param=$param&orderBy=%s";?>
<thead>
<tr class='text-center'>
@@ -227,7 +227,7 @@ tbody tr td:first-child input{display:none;}
<td><?php echo substr($bug->resolvedDate, 5, 11)?></td>
<td class='c-actions'>
<?php
if(common::hasPriv('build', 'unlinkBug'))
if($changeAllowed and common::hasPriv('build', 'unlinkBug'))
{
$unlinkURL = inlink('unlinkBug', "buildID=$build->id&bug=$bug->id");
echo html::a("javascript:ajaxDelete(\"$unlinkURL\", \"bugList\", confirmUnlinkBug)", '<i class="icon-unlink"></i>', '', "class='btn btn-icon' title='{$lang->build->unlinkBug}'");
+1 -1
View File
@@ -47,7 +47,7 @@
<ol class='histories-list'>
<?php $i = 1; ?>
<?php foreach($actions as $action):?>
<?php $canEditComment = (end($actions) == $action and strlen(trim(($action->comment))) != 0 and $this->methodName == 'view' and $action->actor == $this->app->user->account and common::hasPriv('action', 'editComment'));?>
<?php $canEditComment = (isset($actionFormLink) and end($actions) == $action and strlen(trim(($action->comment))) != 0 and $this->methodName == 'view' and $action->actor == $this->app->user->account and common::hasPriv('action', 'editComment'));?>
<li value='<?php echo $i ++;?>'>
<?php
$action->actor = zget($users, $action->actor);
+17 -11
View File
@@ -754,7 +754,12 @@ class doc extends control
setcookie('docFilesViewType', $viewType, $this->config->cookieLife, $this->config->webRoot, '', false, true);
$table = $type == 'product' ? TABLE_PRODUCT : TABLE_PROJECT;
$object = $this->dao->select('id,name')->from($table)->where('id')->eq($objectID)->fetch();
$object = $this->dao->select('id,name,status')->from($table)->where('id')->eq($objectID)->fetch();
/* Determines whether an object is editable. */
$changeAllowed = true;
if($type == 'product' and !empty($this->config->global->closedProductStatus) and $object->status == 'closed') $changeAllowed = false;
if($type == 'project' and !empty($this->config->global->closedProjectStatus) and $object->status == 'closed') $changeAllowed = false;
/* According the from, set menus. */
if($this->from == 'product')
@@ -799,17 +804,18 @@ class doc extends control
$this->app->loadClass('pager', $static = true);
$pager = new pager($recTotal, $recPerPage, $pageID);
$this->view->title = $object->name;
$this->view->position[] = $object->name;
$this->view->title = $object->name;
$this->view->position[] = $object->name;
$this->view->type = $type;
$this->view->object = $object;
$this->view->files = $this->doc->getLibFiles($type, $objectID, $orderBy, $pager);
$this->view->users = $this->loadModel('user')->getPairs('noletter');
$this->view->pager = $pager;
$this->view->viewType = $viewType;
$this->view->orderBy = $orderBy;
$this->view->objectID = $objectID;
$this->view->type = $type;
$this->view->object = $object;
$this->view->files = $this->doc->getLibFiles($type, $objectID, $orderBy, $pager);
$this->view->users = $this->loadModel('user')->getPairs('noletter');
$this->view->pager = $pager;
$this->view->viewType = $viewType;
$this->view->orderBy = $orderBy;
$this->view->objectID = $objectID;
$this->view->changeAllowed = $changeAllowed;
$this->display();
}
+3 -1
View File
@@ -42,7 +42,7 @@ var browseType = '<?php echo $browseType;?>';
<?php echo html::a('javascript:setBrowseType("bygrid")', "<i class='icon icon-cards-view'></i>", '', "title='{$lang->doc->browseTypeList['grid']}' class='btn btn-icon'");?>
<?php echo html::a('javascript:setBrowseType("bylist")', "<i class='icon icon-bars'></i>", '', "title='{$lang->doc->browseTypeList['list']}' class='btn btn-icon text-primary'");?>
</div>
<?php if($libID):?>
<?php if($libID and !common::checkParentObjectClosed('doc', $currentLib)):?>
<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'>
@@ -164,11 +164,13 @@ var browseType = '<?php echo $browseType;?>';
<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::checkParentObjectClosed('doc', $doc)):?>
<?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>
<?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 endif;?>
</td>
</tr>
<?php endforeach;?>
+2
View File
@@ -57,12 +57,14 @@
<?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;?>
<div class="actions">
<?php if(common::checkParentObjectClosed('doc', $object)):?>
<?php if(common::hasPriv('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 endif;?>
<?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;?>
</div>
<?php endif;?>
</div>
+1 -1
View File
@@ -135,7 +135,7 @@
<div class='file-name'><a href='<?php echo $this->createLink($file->objectType, 'view', "objectID=$file->objectID");?>' title='<?php echo substr($file->addedDate, 0, 10)?>'><?php echo $file->title . ' [' . strtoupper($file->objectType) . ' #' . $file->objectID . ']';?></a></div>
</div>
<div class='actions'>
<?php if(common::hasPriv('file', 'delete')): ?>
<?php if(common::hasPriv('file', 'delete') and $changeAllowed): ?>
<a href='<?php echo $this->createLink('file', 'delete', "fileID=$file->id"); ?>' target='hiddenwin' title='<?php echo $lang->delete?>' class='delete btn btn-link'><i class='icon icon-trash'></i></a>
<?php endif?>
</div>
+3 -1
View File
@@ -279,13 +279,15 @@ class file extends control
*
* @param array $files
* @param string $fieldset
* @param object $object
* @access public
* @return void
*/
public function printFiles($files, $fieldset)
public function printFiles($files, $fieldset, $object = null)
{
$this->view->files = $files;
$this->view->fieldset = $fieldset;
$this->view->object = $object;
$this->display();
}
+1 -1
View File
@@ -80,7 +80,7 @@ $sessionString .= session_name() . '=' . session_id();
echo "<li title='{$uploadDate}'>" . html::a($this->createLink('file', 'download', "fileID=$file->id") . $sessionString, $fileTitle . " <span class='text-muted'>({$fileSize})</span>", '_blank', "onclick=\"return downloadFile($file->id, '$file->extension', $imageWidth, '$file->title')\"");
$objectType = zget($this->config->file->objectType, $file->objectType);
if(common::hasPriv($objectType, 'edit'))
if(common::hasPriv($objectType, 'edit', $object))
{
echo "<span class='right-icon'>&nbsp; ";
common::printLink('file', 'edit', "fileID=$file->id", $lang->file->edit, '', "data-width='400' class='edit iframe text-primary' title='{$lang->file->edit}'");
+3 -1
View File
@@ -94,6 +94,7 @@ js::set('foldAll', $lang->project->treeLevel['root']);
?>
</ul>
</div>
<?php if(empty($this->config->global->closedProductStatus) or $product->status != 'closed'):?>
<?php if(!common::checkNotCN()):?>
<?php if(common::hasPriv('story', 'batchCreate')) echo html::a($this->createLink('story', 'batchCreate', "productID=$productID&branch=$branch&moduleID=$moduleID"), "<i class='icon icon-plus'></i> {$lang->story->batchCreate}", '', "class='btn btn btn-secondary'");?>
<?php
@@ -141,6 +142,7 @@ js::set('foldAll', $lang->project->treeLevel['root']);
</ul>
</div>
<?php endif;?>
<?php endif;?>
</div>
</div>
<div id="mainContent" class="main-row fade">
@@ -167,7 +169,7 @@ js::set('foldAll', $lang->project->treeLevel['root']);
<div class="table-empty-tip">
<p>
<span class="text-muted"><?php echo $lang->story->noStory;?></span>
<?php if(common::hasPriv('story', 'create')):?>
<?php if((empty($this->config->global->closedProductStatus) or $product->status != 'closed') and common::hasPriv('story', 'create')):?>
<?php echo html::a($this->createLink('story', 'create', "productID={$productID}&branch={$branch}&moduleID={$moduleID}"), "<i class='icon icon-plus'></i> " . $lang->story->create, '', "class='btn btn-info'");?>
<?php endif;?>
</p>
+1 -1
View File
@@ -41,7 +41,7 @@
<div class="table-empty-tip">
<p>
<span class="text-muted"><?php echo $lang->release->noRelease;?></span>
<?php if(common::hasPriv('release', 'create')):?>
<?php if((empty($this->config->global->closedProductStatus) or $product->status != 'closed') and common::hasPriv('release', 'create')):?>
<?php echo html::a($this->createLink('release', 'create', "productID=$product->id&branch=$branchKey"), "<i class='icon icon-plus'></i> " . $lang->release->create, '', "class='btn btn-info'");?>
<?php endif;?>
</p>
+3 -1
View File
@@ -24,7 +24,9 @@
<?php endforeach;?>
</div>
<div class="btn-toolbar pull-right">
<?php if(empty($this->config->global->closedProductStatus) or $product->status != 'closed'):?>
<?php common::printLink('productplan', 'create', "productID=$product->id&branch=$branch", "<i class='icon icon-plus'></i> {$lang->productplan->create}", '', "class='btn btn-primary'");?>
<?php endif;?>
</div>
</div>
<div id="mainContent">
@@ -32,7 +34,7 @@
<div class="table-empty-tip">
<p>
<span class="text-muted"><?php echo $lang->productplan->noPlan;?></span>
<?php if(common::hasPriv('productplan', 'create')):?>
<?php if((empty($this->config->global->closedProductStatus) or $product->status != 'closed') and common::hasPriv('productplan', 'create')):?>
<?php echo html::a($this->createLink('productplan', 'create', "productID=$product->id&branch=$branch"), "<i class='icon icon-plus'></i> " . $lang->productplan->create, '', "class='btn btn-info'");?>
<?php endif;?>
</p>
+6 -6
View File
@@ -42,9 +42,9 @@
{
echo $this->buildOperateMenu($plan, 'view');
if(common::hasPriv('productplan', 'create') and $plan->parent <= '0') echo html::a($this->createLink('productplan', 'create', "product={$plan->product}&branch={$plan->branch}&parent={$plan->id}"), "<i class='icon-treemap-alt'></i> " . $this->lang->productplan->children , '', "class='btn btn-link' title='{$this->lang->productplan->children}'");
if(common::hasPriv('productplan', 'edit')) echo html::a($this->createLink('productplan', 'edit', "planID=$plan->id"), "<i class='icon-common-edit icon-edit'></i> " . $this->lang->edit, '', "class='btn btn-link' title='{$this->lang->edit}'");
if(common::hasPriv('productplan', 'delete') and $plan->parent >= 0) echo html::a($this->createLink('productplan', 'delete', "planID=$plan->id"), "<i class='icon-common-delete icon-trash'></i> " . $this->lang->delete, '', "class='btn btn-link' title='{$this->lang->delete}' target='hiddenwin'");
if(common::hasPriv('productplan', 'create', $plan) and $plan->parent <= '0') echo html::a($this->createLink('productplan', 'create', "product={$plan->product}&branch={$plan->branch}&parent={$plan->id}"), "<i class='icon-treemap-alt'></i> " . $this->lang->productplan->children , '', "class='btn btn-link' title='{$this->lang->productplan->children}'");
if(common::hasPriv('productplan', 'edit', $plan)) echo html::a($this->createLink('productplan', 'edit', "planID=$plan->id"), "<i class='icon-common-edit icon-edit'></i> " . $this->lang->edit, '', "class='btn btn-link' title='{$this->lang->edit}'");
if(common::hasPriv('productplan', 'delete', $plan) and $plan->parent >= 0) echo html::a($this->createLink('productplan', 'delete', "planID=$plan->id"), "<i class='icon-common-delete icon-trash'></i> " . $this->lang->delete, '', "class='btn btn-link' title='{$this->lang->delete}' target='hiddenwin'");
}
?>
</div>
@@ -62,7 +62,7 @@
<div id='stories' class='tab-pane <?php if($type == 'story') echo 'active'?>'>
<?php $canOrder = common::hasPriv('project', 'storySort');?>
<div class='actions'>
<?php if(!$plan->deleted and $plan->parent >= 0):?>
<?php if(!$plan->deleted and $plan->parent >= 0 and !common::checkParentObjectClosed('plan', $plan)):?>
<div class="btn-group">
<div class='drop-down dropdown-hover'>
<?php
@@ -82,7 +82,7 @@
</div>
</div>
<?php endif;?>
<?php if(common::hasPriv('productplan', 'linkStory') and $plan->parent >= 0) echo html::a("javascript:showLink($plan->id, \"story\")", '<i class="icon-link"></i> ' . $lang->productplan->linkStory, '', "class='btn btn-primary'");?>
<?php if(common::hasPriv('productplan', 'linkStory', $plan) and $plan->parent >= 0) echo html::a("javascript:showLink($plan->id, \"story\")", '<i class="icon-link"></i> ' . $lang->productplan->linkStory, '', "class='btn btn-primary'");?>
</div>
<?php if(common::hasPriv('productplan', 'linkStory')):?>
<div class='linkBox cell hidden'></div>
@@ -355,7 +355,7 @@
</form>
</div>
<div id='bugs' class='tab-pane <?php if($type == 'bug') echo 'active';?>'>
<?php if(common::hasPriv('productplan', 'linkBug')):?>
<?php if(common::hasPriv('productplan', 'linkBug', $plan)):?>
<div class='actions'>
<?php echo html::a("javascript:showLink($plan->id, \"bug\")", '<i class="icon-bug"></i> ' . $lang->productplan->linkBug, '', "class='btn btn-primary'");?>
</div>
+27 -4
View File
@@ -945,6 +945,7 @@ class project extends control
$this->view->title = $this->projects[$projectID] . $this->lang->colon . $this->lang->testtask->common;
$this->view->position[] = html::a($this->createLink('project', 'testtask', "projectID=$projectID"), $this->projects[$projectID]);
$this->view->position[] = $this->lang->testtask->common;
$this->view->project = $project;
$this->view->projectID = $projectID;
$this->view->projectName = $this->projects[$projectID];
$this->view->pager = $pager;
@@ -1047,12 +1048,17 @@ class project extends control
$project = $this->commonAction($projectID);
$projectID = $project->id;
/* Determines whether an object is editable. */
$changeAllowed = true;
if(!empty($this->config->global->closedProjectStatus) and $project->status == 'closed') $changeAllowed = false;
$title = $project->name . $this->lang->colon . $this->lang->project->team;
$position[] = html::a($this->createLink('project', 'browse', "projectID=$projectID"), $project->name);
$position[] = $this->lang->project->team;
$this->view->title = $title;
$this->view->position = $position;
$this->view->title = $title;
$this->view->position = $position;
$this->view->changeAllowed = $changeAllowed;
$this->display();
}
@@ -1636,6 +1642,10 @@ class project extends control
$bugs = $this->loadModel('bug')->getProjectBugs($projectID);
$stories = $this->loadModel('story')->getProjectStories($projectID, $orderBy);
/* Determines whether an object is editable. */
$changeAllowed = true;
if(!empty($this->config->global->closedProjectStatus) and $project->status == 'closed') $changeAllowed = false;
$kanbanGroup = $this->project->getKanbanGroupData($stories, $tasks, $bugs, $type);
$kanbanSetting = $this->project->getKanbanSetting();
@@ -1652,9 +1662,10 @@ class project extends control
$this->view->type = $type;
$this->view->kanbanGroup = $kanbanGroup;
$this->view->kanbanColumns = $this->project->getKanbanColumns($kanbanSetting);
$this->view->statusMap = $this->project->getKanbanStatusMap($kanbanSetting);
$this->view->statusMap = $changeAllowed ? $this->project->getKanbanStatusMap($kanbanSetting) : array();
$this->view->statusList = $this->project->getKanbanStatusList($kanbanSetting);
$this->view->colorList = $this->project->getKanbanColorList($kanbanSetting);
$this->view->changeAllowed = $changeAllowed;
$this->display();
}
@@ -1853,11 +1864,22 @@ class project extends control
{
if($confirm == 'no')
{
echo js::confirm(sprintf($this->lang->project->confirmDelete, $this->projects[$projectID]), $this->createLink('project', 'delete', "projectID=$projectID&confirm=yes"));
/* Get the number of unfinished tasks and unresolved bugs. */
$unfinishedTasks = $this->dao->select('COUNT(id) AS count')->from(TABLE_TASK)->where('project')->eq($projectID)->andWhere('deleted')->eq(0)->andWhere('status')->in('wait,doing')->fetch();
$unresolvedBugs = $this->dao->select('COUNT(id) AS count')->from(TABLE_BUG)->where('project')->eq($projectID)->andWhere('deleted')->eq(0)->andWhere('status')->eq('active')->fetch();
/* Set prompt information. */
$tips = '';
if($unfinishedTasks->count) $tips = sprintf($this->lang->project->unfinishedTask, $unfinishedTasks->count);
if($unresolvedBugs->count) $tips .= sprintf($this->lang->project->unresolvedBug, $unresolvedBugs->count);
if($tips) $tips = $this->lang->project->unfinishedProject . $tips;
echo js::confirm($tips . sprintf($this->lang->project->confirmDelete, $this->projects[$projectID]), $this->createLink('project', 'delete', "projectID=$projectID&confirm=yes"));
exit;
}
else
{
/* Delete project. */
$this->project->delete(TABLE_PROJECT, $projectID);
$this->dao->update(TABLE_DOCLIB)->set('deleted')->eq(1)->where('project')->eq($projectID)->exec();
$this->project->updateUserView($projectID);
@@ -1923,6 +1945,7 @@ class project extends control
$this->view->title = $title;
$this->view->position = $position;
$this->view->allProducts = $allProducts;
$this->view->project = $project;
$this->view->linkedProducts = $linkedProducts;
$this->view->branchGroups = $this->loadModel('branch')->getByProducts(array_keys($allProducts), '', $linkedBranches);
+3
View File
@@ -275,6 +275,9 @@ $lang->project->noweekend = 'Ohne Wochenende';
$lang->project->withweekend = 'Mit Wochenende';
$lang->project->interval = 'Intervale ';
$lang->project->fixFirstWithLeft = 'Modify the left';
$lang->project->unfinishedProject = "This {$lang->projectCommon} has ";
$lang->project->unfinishedTask = "[%s] unfinished tasks. ";
$lang->project->unresolvedBug = "[%s] unresolved bugs. ";
$lang->project->action = new stdclass();
$lang->project->action->opened = '$date, created by <strong>$actor</strong> . $extra' . "\n";
+3
View File
@@ -275,6 +275,9 @@ $lang->project->noweekend = 'Exclude Weekend';
$lang->project->withweekend = 'Include Weekend';
$lang->project->interval = 'Intervals ';
$lang->project->fixFirstWithLeft = 'Update hours left too';
$lang->project->unfinishedProject = "This {$lang->projectCommon} has ";
$lang->project->unfinishedTask = "[%s] unfinished tasks. ";
$lang->project->unresolvedBug = "[%s] unresolved bugs. ";
$lang->project->action = new stdclass();
$lang->project->action->opened = '$date, created by <strong>$actor</strong> . $extra' . "\n";
+3
View File
@@ -275,6 +275,9 @@ $lang->project->noweekend = 'Exclure les Weekends';
$lang->project->withweekend = 'Inclure les Weekends';
$lang->project->interval = 'Intervalles';
$lang->project->fixFirstWithLeft = 'Mettre à jour les heures également';
$lang->project->unfinishedProject = "This {$lang->projectCommon} has ";
$lang->project->unfinishedTask = "[%s] unfinished tasks. ";
$lang->project->unresolvedBug = "[%s] unresolved bugs. ";
$lang->project->action = new stdclass();
$lang->project->action->opened = '$date, créée par <strong>$actor</strong> .' . "\n";
+3
View File
@@ -275,6 +275,9 @@ $lang->project->noweekend = 'Không gồm cuối tuần';
$lang->project->withweekend = 'Bao gồm cuối tuần';
$lang->project->interval = 'Intervals ';
$lang->project->fixFirstWithLeft = 'Cập nhật cả giờ còn lại';
$lang->project->unfinishedProject = "This {$lang->projectCommon} has ";
$lang->project->unfinishedTask = "[%s] unfinished tasks. ";
$lang->project->unresolvedBug = "[%s] unresolved bugs. ";
$lang->project->action = new stdclass();
$lang->project->action->opened = '$date, được tạo bởi <strong>$actor</strong> $extra.' . "\n";
+3
View File
@@ -275,6 +275,9 @@ $lang->project->noweekend = '去除周末';
$lang->project->withweekend = '显示周末';
$lang->project->interval = '间隔';
$lang->project->fixFirstWithLeft = '修改剩余工时';
$lang->project->unfinishedProject = "该{$lang->projectCommon}下还有";
$lang->project->unfinishedTask = "[%s]个未完成的任务,";
$lang->project->unresolvedBug = "[%s]个未解决的bug,";
$lang->project->action = new stdclass();
$lang->project->action->opened = '$date, 由 <strong>$actor</strong> 创建。$extra' . "\n";
+2
View File
@@ -22,7 +22,9 @@
</div>
<div class="btn-toolbar pull-right">
<?php common::printLink('bug', 'export', "productID=$productID&orderBy=$orderBy&browseType=&projectID=$project->id", "<i class='icon icon-export muted'> </i>" . $lang->bug->export, '', "class='btn btn-link export'");?>
<?php if(empty($this->config->global->closedProjectStatus) or $project->status != 'closed'):?>
<?php common::printLink('bug', 'create', "productID=$productID&branch=$branchID&extra=projectID=$project->id", "<i class='icon icon-plus'></i> " . $lang->bug->create, '', "class='btn btn-primary'");?>
<?php endif;?>
</div>
</div>
<div id="mainContent">
+2
View File
@@ -29,7 +29,9 @@
</div>
<a class="btn btn-link querybox-toggle" id="bysearchTab"><i class="icon icon-search muted"></i> <?php echo $lang->project->byQuery;?></a>
<div class="btn-toolbar pull-right">
<?php if(empty($this->config->global->closedProjectStatus) or $project->status != 'closed'):?>
<?php common::printLink('build', 'create', "project=$project->id", "<i class='icon icon-plus'></i> " . $lang->build->create, '', "class='btn btn-primary'");?>
<?php endif;?>
</div>
</div>
<div id="mainContent">
+1 -1
View File
@@ -25,7 +25,7 @@
common::printLink('project', 'computeBurn', 'reload=yes', '<i class="icon icon-refresh"></i> ' . $lang->project->computeBurn, 'hiddenwin', "title='{$lang->project->computeBurn}{$lang->project->burn}' class='btn btn-primary' id='computeBurn'");
echo '<div class="space"></div>';
echo html::a($this->createLink('project', 'burn', "projectID=$projectID&type=$weekend&interval=$interval"), $lang->project->$weekend, '', "class='btn btn-link'");
common::printLink('project', 'fixFirst', "project=$project->id", $lang->project->fixFirst, '', "class='btn btn-link iframe' data-width='700'");
if(empty($this->config->global->closedProjectStatus) or $project->status != 'closed') common::printLink('project', 'fixFirst', "project=$project->id", $lang->project->fixFirst, '', "class='btn btn-link iframe' data-width='700'");
echo $lang->project->howToUpdateBurn;
?>
<?php if($interval):?>
+4
View File
@@ -53,6 +53,7 @@
?>
</ul>
</div>
<?php if(empty($this->config->global->closedProjectStatus) or $project->status != 'closed'):?>
<div class="btn-group">
<button class="btn btn-link" data-toggle="dropdown"><i class="icon icon-import muted"></i> <span class="text"><?php echo $lang->import;?></span> <span class="caret"></span></button>
<ul class="dropdown-menu">
@@ -69,6 +70,7 @@
?>
</ul>
</div>
<?php endif;?>
<?php
$checkObject = new stdclass();
$checkObject->project = $projectID;
@@ -207,9 +209,11 @@
<td class="c-type"><?php echo zget($lang->task->typeList, $task->type);?></td>
<td class='c-date <?php if(isset($task->delay)) echo 'delayed';?>'><?php if(substr($task->deadline, 0, 4) > 0) echo $task->deadline;?></td>
<td class="c-actions">
<?php if(empty($this->config->global->closedProjectStatus) or $project->status != 'closed'):?>
<?php common::printIcon('task', 'assignTo', "projectID=$task->project&taskID=$task->id", $task, 'list', '', '', 'iframe', true);?>
<?php common::printIcon('task', 'edit', "taskid=$task->id", '', 'list');?>
<?php common::printIcon('task', 'delete', "projectID=$task->project&taskid=$task->id", '', 'list', 'trash', 'hiddenwin');?>
<?php endif;?>
</td>
</tr>
<?php $i++;?>
+4
View File
@@ -18,6 +18,7 @@
$link = $this->createLink('task', 'export', "project=$projectID&orderBy=$orderBy&type=kanban");
if(common::hasPriv('task', 'export')) echo html::a($link, "<i class='icon-export muted'></i> " . $lang->task->export, '', "class='btn btn-link iframe export' data-width='700'");
?>
<?php if($changeAllowed):?>
<div class='btn-group'>
<button type='button' class='btn btn-link dropdown-toggle' data-toggle='dropdown' id='importAction'>
<i class='icon-import muted'></i> <?php echo $lang->import ?>
@@ -42,6 +43,7 @@
$link = common::hasPriv('task', 'create', $checkObject) ? $this->createLink('task', 'create', "project=$projectID" . (isset($moduleID) ? "&storyID=&moduleID=$moduleID" : ''), '', true) : '#';
echo html::a($link, "<i class='icon icon-plus'></i>" . $lang->task->create, '', $misc);
?>
<?php endif;?>
</div>
</div>
<style>
@@ -115,6 +117,7 @@
echo "<span class='group-title' title='{$story->title}'>{$story->title}</span>";
}
?>
<?php if($changeAllowed):?>
<nav class='board-actions nav nav-default'>
<li class='dropdown'>
<a href='javascript:;' data-toggle='dropdown' class='panel-action'><i class='icon icon-ellipsis-v'></i></a>
@@ -130,6 +133,7 @@
</ul>
</li>
</nav>
<?php endif;?>
</div>
<div class="small group-info">
<span class='story-id board-id' title='<?php echo $lang->story->id?>'>#<?php echo $story->id?></span>
+1 -1
View File
@@ -57,7 +57,7 @@
</div>
<div class="detail text-center form-actions">
<?php echo html::hidden("post", 'post');?>
<?php echo html::submitButton();?>
<?php if(empty($this->config->global->closedProjectStatus) or $project->status != 'closed') echo html::submitButton();?>
</div>
</form>
</div>
+32 -29
View File
@@ -46,37 +46,40 @@
<?php
common::printLink('story', 'export', "productID=$productID&orderBy=id_desc&projectID=$project->id", "<i class='icon icon-export muted'></i> " . $lang->story->export, '', "class='btn btn-link export'");
$this->lang->story->create = $this->lang->project->createStory;
if($productID and !$this->loadModel('story')->checkForceReview())
if(empty($this->config->global->closedProjectStatus) or $project->status != 'closed')
{
echo "<div class='btn-group dropdown-hover'>";
echo "<button type='button' class='btn btn-link'>";
echo "<i class='icon-plus'></i> {$lang->story->create} <span class='caret'></span>";
echo '</button>';
echo "<ul class='dropdown-menu pull-right' id='createActionMenu'>";
$storyModuleID = (int)$this->cookie->storyModuleParam;
if(common::hasPriv('story', 'create')) echo '<li>' . html::a($this->createLink('story', 'create', "productID=$productID&branch=0&moduleID={$storyModuleID}&story=0&project=$project->id"), $lang->story->create) . '</li>';
if(common::hasPriv('story', 'batchCreate')) echo '<li>' . html::a($this->createLink('story', 'batchCreate', "productID=$productID&branch=0&moduleID={$storyModuleID}&story=0&project=$project->id"), $lang->story->batchCreate) . '</li>';
echo '</ul>';
echo '</div>';
}
$this->lang->story->create = $this->lang->project->createStory;
if($productID and !$this->loadModel('story')->checkForceReview())
{
echo "<div class='btn-group dropdown-hover'>";
echo "<button type='button' class='btn btn-link'>";
echo "<i class='icon-plus'></i> {$lang->story->create} <span class='caret'></span>";
echo '</button>';
echo "<ul class='dropdown-menu pull-right' id='createActionMenu'>";
$storyModuleID = (int)$this->cookie->storyModuleParam;
if(common::hasPriv('story', 'create')) echo '<li>' . html::a($this->createLink('story', 'create', "productID=$productID&branch=0&moduleID={$storyModuleID}&story=0&project=$project->id"), $lang->story->create) . '</li>';
if(common::hasPriv('story', 'batchCreate')) echo '<li>' . html::a($this->createLink('story', 'batchCreate', "productID=$productID&branch=0&moduleID={$storyModuleID}&story=0&project=$project->id"), $lang->story->batchCreate) . '</li>';
echo '</ul>';
echo '</div>';
}
if(commonModel::isTutorialMode())
{
$wizardParams = helper::safe64Encode("project=$project->id");
echo html::a($this->createLink('tutorial', 'wizard', "module=project&method=linkStory&params=$wizardParams"), "<i class='icon-link'></i> {$lang->project->linkStory}",'', "class='btn btn-link link-story-btn'");
}
else
{
echo "<div class='btn-group dropdown-hover'>";
echo "<button type='button' class='btn btn-primary' id='linkButton'>";
echo "<i class='icon-link'></i> {$lang->project->linkStory} <span class='caret'></span>";
echo '</button>';
echo "<ul class='dropdown-menu pull-right' id='linkActionMenu'>";
if(common::hasPriv('project', 'linkStory')) echo '<li>' . html::a(inlink('linkStory', "project=$project->id"), $lang->project->linkStory). "</li>";
if(common::hasPriv('project', 'importPlanStories')) echo '<li>' . html::a('#linkStoryByPlan', $lang->project->linkStoryByPlan, '', 'data-toggle="modal"') . "</li>";
echo '</ul>';
echo '</div>';
if(commonModel::isTutorialMode())
{
$wizardParams = helper::safe64Encode("project=$project->id");
echo html::a($this->createLink('tutorial', 'wizard', "module=project&method=linkStory&params=$wizardParams"), "<i class='icon-link'></i> {$lang->project->linkStory}",'', "class='btn btn-link link-story-btn'");
}
else
{
echo "<div class='btn-group dropdown-hover'>";
echo "<button type='button' class='btn btn-primary' id='linkButton'>";
echo "<i class='icon-link'></i> {$lang->project->linkStory} <span class='caret'></span>";
echo '</button>';
echo "<ul class='dropdown-menu pull-right' id='linkActionMenu'>";
if(common::hasPriv('project', 'linkStory')) echo '<li>' . html::a(inlink('linkStory', "project=$project->id"), $lang->project->linkStory). "</li>";
if(common::hasPriv('project', 'importPlanStories')) echo '<li>' . html::a('#linkStoryByPlan', $lang->project->linkStoryByPlan, '', 'data-toggle="modal"') . "</li>";
echo '</ul>';
echo '</div>';
}
}
?>
</div>
+2
View File
@@ -118,6 +118,7 @@ js::set('foldAll', $lang->project->treeLevel['root']);
</ul>
</div>
<?php if(empty($this->config->global->closedProjectStatus) or $project->status != 'closed'):?>
<div class="btn-group dropdown-hover">
<button class="btn btn-link" data-toggle="dropdown"><i class="icon icon-import muted"></i> <span class="text"><?php echo $lang->import;?></span> <span class="caret"></span></button>
<ul class="dropdown-menu pull-right" id='importActionMenu'>
@@ -134,6 +135,7 @@ js::set('foldAll', $lang->project->treeLevel['root']);
?>
</ul>
</div>
<?php endif;?>
<?php
$checkObject = new stdclass();
$checkObject->project = $projectID;
+14 -7
View File
@@ -18,14 +18,17 @@
</div>
<div class='btn-toolbar pull-right'>
<?php
if(commonModel::isTutorialMode())
if($changeAllowed)
{
$wizardParams = helper::safe64Encode("projectID=$project->id");
echo html::a($this->createLink('tutorial', 'wizard', "module=project&method=manageMembers&params=$wizardParams"), "<i class='icon icon-persons'></i> " . $lang->project->manageMembers, '', "class='btn btn-primary manage-team-btn'");
}
else
{
if(!empty($app->user->admin) or empty($app->user->rights['rights']['my']['limited'])) common::printLink('project', 'manageMembers', "projectID=$project->id", "<i class='icon icon-persons'></i> " . $lang->project->manageMembers, '', "class='btn btn-primary manage-team-btn'");
if(commonModel::isTutorialMode())
{
$wizardParams = helper::safe64Encode("projectID=$project->id");
echo html::a($this->createLink('tutorial', 'wizard', "module=project&method=manageMembers&params=$wizardParams"), "<i class='icon icon-persons'></i> " . $lang->project->manageMembers, '', "class='btn btn-primary manage-team-btn'");
}
else
{
if(!empty($app->user->admin) or empty($app->user->rights['rights']['my']['limited'])) common::printLink('project', 'manageMembers', "projectID=$project->id", "<i class='icon icon-persons'></i> " . $lang->project->manageMembers, '', "class='btn btn-primary manage-team-btn'");
}
}
?>
</div>
@@ -52,7 +55,9 @@
<th><?php echo $lang->team->hours;?></th>
<th><?php echo $lang->team->totalHours;?></th>
<th class='w-100px text-center'><?php echo $lang->team->limited;?></th>
<?php if($changeAllowed):?>
<th class='c-actions-1 w-80px text-center'><?php echo $lang->actions;?></th>
<?php endif;?>
</tr>
</thead>
<tbody>
@@ -72,6 +77,7 @@
<td><?php echo $member->hours . $lang->project->workHour;?></td>
<td><?php echo $memberHours . $lang->project->workHour;?></td>
<td class="text-center"><?php echo $lang->team->limitedList[$member->limited];?></td>
<?php if($changeAllowed):?>
<td class='c-actions text-center'>
<?php
if (common::hasPriv('project', 'unlinkMember', $member))
@@ -81,6 +87,7 @@
}
?>
</td>
<?php endif;?>
</tr>
<?php endforeach;?>
</tbody>
+2
View File
@@ -28,8 +28,10 @@
</a>
</div>
<div class="btn-toolbar pull-right">
<?php if(empty($this->config->global->closedProjectStatus) or $project->status != 'closed'):?>
<?php common::printIcon('testreport', 'browse', "objectID=$projectID&objectType=project", '', 'button','flag muted');?>
<?php common::printLink('testtask', 'create', "product=0&project=$projectID", "<i class='icon icon-plus'></i> " . $lang->testtask->create, '', "class='btn btn-primary'");?>
<?php endif;?>
</div>
</div>
<div id="mainContent">
+2
View File
@@ -32,6 +32,7 @@
$link = common::hasPriv('task', 'report', $project) ? $this->createLink('task', 'report', "project=$projectID&browseType=$browseType") : '#';
echo html::a($link, "<i class='icon icon-bar-chart muted'></i> <span class='text'>{$lang->task->reportChart}</span>", '', 'class="btn btn-link"');
?>
<?php if(empty($this->config->global->closedProjectStatus) or $project->status != 'closed'):?>
<div class="btn-group">
<button class="btn btn-link" data-toggle="dropdown"><i class="icon icon-import muted"></i> <span class="text"><?php echo $lang->import ?></span> <span class="caret"></span></button>
<ul class="dropdown-menu">
@@ -46,6 +47,7 @@
?>
</ul>
</div>
<?php endif;?>
<?php
$misc = "class='btn btn-link iframe" . (common::hasPriv('task', 'export', $project) ? '' : ' disabled') . "' data-width='700'";
$link = common::hasPriv('task', 'export') ? $this->createLink('task', 'export', "project=$projectID&orderBy=$orderBy&type=tree") : '#';
+3 -1
View File
@@ -22,7 +22,9 @@
?>
</div>
<div class="btn-toolbar pull-right">
<?php if(empty($this->config->global->closedProductStatus) or $product->status != 'closed'):?>
<?php common::printLink('release', 'create', "productID=$product->id&branch=$branch", "<i class='icon icon-plus'></i> {$lang->release->create}", '', "class='btn btn-primary'");?>
<?php endif;?>
</div>
</div>
<div id="mainContent" class='main-table'>
@@ -30,7 +32,7 @@
<div class="table-empty-tip">
<p>
<span class="text-muted"><?php echo $lang->release->noRelease;?></span>
<?php if(common::hasPriv('release', 'create')):?>
<?php if((empty($this->config->global->closedProductStatus) or $product->status != 'closed') and common::hasPriv('release', 'create')):?>
<?php echo html::a($this->createLink('release', 'create', "productID=$product->id&branch=$branch"), "<i class='icon icon-plus'></i> " . $lang->release->create, '', "class='btn btn-info'");?>
<?php endif;?>
</p>
+18 -16
View File
@@ -31,7 +31,9 @@
</div>
<div class='btn-toolbar pull-right'>
<?php
if(!$release->deleted)
$isClosedProduct = common::checkParentObjectClosed('release', $release);
if(!$release->deleted and !$isClosedProduct)
{
echo $this->buildOperateMenu($release, 'view');
@@ -64,7 +66,7 @@
</ul>
<div class='tab-content'>
<div class='tab-pane <?php if($type == 'story') echo 'active'?>' id='stories'>
<?php if(common::hasPriv('release', 'linkStory')):?>
<?php if(common::hasPriv('release', 'linkStory') and !$isClosedProduct):?>
<div class='actions'><?php echo html::a("javascript:showLink({$release->id}, \"story\")", '<i class="icon-link"></i> ' . $lang->release->linkStory, '', "class='btn btn-primary'");?></div>
<div class='linkBox cell hidden'></div>
<?php endif;?>
@@ -78,7 +80,7 @@
<thead>
<tr class='text-center'>
<th class='c-id text-left'>
<?php if($canBatchUnlink or $canBatchClose):?>
<?php if(($canBatchUnlink or $canBatchClose) and !$isClosedProduct):?>
<div class="checkbox-primary check-all" title="<?php echo $lang->selectAll?>">
<label></label>
</div>
@@ -99,7 +101,7 @@
<?php $storyLink = $this->createLink('story', 'view', "storyID=$story->id", '', true);?>
<tr>
<td class='c-id text-left'>
<?php if($canBatchUnlink or $canBatchClose):?>
<?php if(($canBatchUnlink or $canBatchClose) and !$isClosedProduct):?>
<div class="checkbox-primary">
<input type='checkbox' name='storyIdList[]' value='<?php echo $story->id;?>'/>
<label></label>
@@ -122,7 +124,7 @@
<td><?php echo $lang->story->stageList[$story->stage];?></td>
<td class='c-actions'>
<?php
if(common::hasPriv('release', 'unlinkStory'))
if(common::hasPriv('release', 'unlinkStory') and !$isClosedProduct)
{
$unlinkURL = $this->createLink('release', 'unlinkStory', "releaseID=$release->id&story=$story->id");
echo html::a("javascript:ajaxDelete(\"$unlinkURL\", \"storyList\", confirmUnlinkStory)", '<i class="icon-unlink"></i>', '', "class='btn' title='{$lang->release->unlinkStory}'");
@@ -134,7 +136,7 @@
</tbody>
</table>
<div class='table-footer'>
<?php if($countStories and ($canBatchUnlink or $canBatchClose)):?>
<?php if($countStories and ($canBatchUnlink or $canBatchClose) and !$isClosedProduct):?>
<div class="checkbox-primary check-all"><label><?php echo $lang->selectAll?></label></div>
<div class="table-actions btn-toolbar">
<?php
@@ -162,7 +164,7 @@
</form>
</div>
<div class='tab-pane <?php if($type == 'bug') echo 'active'?>' id='bugs'>
<?php if(common::hasPriv('release', 'linkBug')):?>
<?php if(common::hasPriv('release', 'linkBug') and !$isClosedProduct):?>
<div class='actions'><?php echo html::a("javascript:showLink({$release->id}, \"bug\")", '<i class="icon-bug"></i> ' . $lang->release->linkBug, '', "class='btn btn-primary'");?></div>
<div class='linkBox cell hidden'></div>
<?php endif;?>
@@ -173,7 +175,7 @@
<thead>
<tr class='text-center'>
<th class='c-id text-left'>
<?php if($canBatchUnlink):?>
<?php if($canBatchUnlink and !$isClosedProduct):?>
<div class="checkbox-primary check-all" title="<?php echo $lang->selectAll?>">
<label></label>
</div>
@@ -194,7 +196,7 @@
<?php $bugLink = $this->createLink('bug', 'view', "bugID=$bug->id", '', true);?>
<tr>
<td class='c-id text-left'>
<?php if($canBatchUnlink):?>
<?php if($canBatchUnlink and !$isClosedProduct):?>
<div class="checkbox-primary">
<input type='checkbox' name='unlinkBugs[]' value='<?php echo $bug->id;?>'/>
<label></label>
@@ -212,7 +214,7 @@
<td><?php echo substr($bug->resolvedDate, 5, 11)?></td>
<td class='c-actions'>
<?php
if(common::hasPriv('release', 'unlinkBug'))
if(common::hasPriv('release', 'unlinkBug') and !$isClosedProduct)
{
$unlinkURL = $this->createLink('release', 'unlinkBug', "releaseID=$release->id&bug=$bug->id");
echo html::a("javascript:ajaxDelete(\"$unlinkURL\", \"bugList\", confirmUnlinkBug)", '<i class="icon-unlink"></i>', '', "class='btn' title='{$lang->release->unlinkBug}'");
@@ -224,7 +226,7 @@
</tbody>
</table>
<div class='table-footer'>
<?php if($countBugs and $canBatchUnlink):?>
<?php if($countBugs and $canBatchUnlink and !$isClosedProduct):?>
<div class="checkbox-primary check-all"><label><?php echo $lang->selectAll?></label></div>
<div class="table-actions btn-toolbar">
<?php echo html::submitButton($lang->release->batchUnlink, '', 'btn');?>
@@ -240,7 +242,7 @@
</form>
</div>
<div class='tab-pane <?php if($type == 'leftBug') echo 'active'?>' id='leftBugs'>
<?php if(common::hasPriv('release', 'linkBug')):?>
<?php if(common::hasPriv('release', 'linkBug') and !$isClosedProduct):?>
<div class='actions'><?php echo html::a("javascript:showLink({$release->id}, \"leftBug\")", '<i class="icon-bug"></i> ' . $lang->release->linkBug, '', "class='btn btn-primary'");?></div>
<div class='linkBox cell hidden'></div>
<?php endif;?>
@@ -251,7 +253,7 @@
<thead>
<tr class='text-center'>
<th class='c-id text-left'>
<?php if($canBatchUnlink):?>
<?php if($canBatchUnlink and !$isClosedProduct):?>
<div class="checkbox-primary check-all" title="<?php echo $lang->selectAll?>">
<label></label>
</div>
@@ -282,7 +284,7 @@
<?php $bugLink = $this->createLink('bug', 'view', "bugID=$bug->id", '', true);?>
<tr>
<td class='c-id text-left'>
<?php if($canBatchUnlink):?>
<?php if($canBatchUnlink and !$isClosedProduct):?>
<div class="checkbox-primary">
<input type='checkbox' name='unlinkBugs[]' value='<?php echo $bug->id;?>'/>
<label></label>
@@ -303,7 +305,7 @@
<td><?php echo $bug->openedDate?></td>
<td class='c-actions'>
<?php
if(common::hasPriv('release', 'unlinkBug'))
if(common::hasPriv('release', 'unlinkBug') and !$isClosedProduct)
{
$unlinkURL = $this->createLink('release', 'unlinkBug', "releaseID=$release->id&bug=$bug->id&type=leftBug");
echo html::a("javascript:ajaxDelete(\"$unlinkURL\", \"leftBugList\", confirmUnlinkBug)", '<i class="icon-unlink"></i>', '', "class='btn' title='{$lang->release->unlinkBug}'");
@@ -315,7 +317,7 @@
</tbody>
</table>
<div class='table-footer'>
<?php if($countLeftBugs and $canBatchUnlink):?>
<?php if($countLeftBugs and $canBatchUnlink and !$isClosedProduct):?>
<div class="checkbox-primary check-all"><label><?php echo $lang->selectAll?></label></div>
<div class="table-actions btn-toolbar">
<?php echo html::submitButton($lang->release->batchUnlink, '', 'btn');?>
+2 -1
View File
@@ -185,7 +185,8 @@ class repo extends control
$this->scm->setEngine($repo);
$info = $this->scm->info($entry, $revision);
if($info->kind == 'dir') $this->locate($this->repo->createLink('browse', "repoID=$repoID&path=&revision=$revision", "path=" . $this->repo->encodePath($info->path)));
$path = $entry ? $info->path : '';
if($info->kind == 'dir') $this->locate($this->repo->createLink('browse', "repoID=$repoID&path=&revision=$revision", "path=" . $this->repo->encodePath($path)));
$content = $this->scm->cat($entry, $revision);
$entry = urldecode($entry);
$pathInfo = pathinfo($entry);
+2 -1
View File
@@ -726,7 +726,7 @@ class story extends control
if(!$story) die(js::error($this->lang->notFound) . js::locate('back'));
$story->files = $this->loadModel('file')->getByObject('story', $storyID);
$product = $this->dao->findById($story->product)->from(TABLE_PRODUCT)->fields('name, id, type')->fetch();
$product = $this->dao->findById($story->product)->from(TABLE_PRODUCT)->fields('name, id, type, status')->fetch();
$plan = $this->dao->findById($story->plan)->from(TABLE_PRODUCTPLAN)->fetch('title');
$bugs = $this->dao->select('id,title')->from(TABLE_BUG)->where('story')->eq($storyID)->andWhere('deleted')->eq(0)->fetchAll();
$fromBug = $this->dao->select('id,title')->from(TABLE_BUG)->where('toStory')->eq($storyID)->fetch();
@@ -1275,6 +1275,7 @@ class story extends control
$this->view->orderBy = $orderBy;
$this->view->suiteList = $this->loadModel('testsuite')->getSuites($productID);
$this->view->browseType = '';
$this->view->product = $this->product->getByID($productID);
$this->display();
}
+5 -3
View File
@@ -47,7 +47,9 @@
</div>
<?php if(!isonlybody()):?>
<div class="btn-toolbar pull-right">
<?php if(empty($this->config->global->closedProductStatus) or $product->status != 'closed'): ?>
<?php common::printLink('story', 'create', "productID={$story->product}&branch={$story->branch}&moduleID={$story->module}", "<i class='icon icon-plus'></i>" . $lang->story->create, '', "class='btn btn-primary'"); ?>
<?php endif;?>
</div>
<?php endif;?>
</div>
@@ -62,8 +64,8 @@
<div class="detail-title"><?php echo $lang->story->legendVerify;?></div>
<div class="detail-content article-content"><?php echo $story->verify;?></div>
</div>
<?php echo $this->fetch('file', 'printFiles', array('files' => $story->files, 'fieldset' => 'true'));?>
<?php $actionFormLink = $this->createLink('action', 'comment', "objectType=story&objectID=$story->id");?>
<?php echo $this->fetch('file', 'printFiles', array('files' => $story->files, 'fieldset' => 'true', 'object' => $story));?>
<?php if(!common::checkParentObjectClosed('story', $story)) $actionFormLink = $this->createLink('action', 'comment', "objectType=story&objectID=$story->id");?>
<?php if(!empty($story->children)):?>
<div class='detail'>
<div class='detail-title'><?php echo $this->lang->story->children;?></div>
@@ -136,7 +138,7 @@
common::printIcon('story', 'close', "storyID=$story->id", $story, 'button', '', '', 'iframe showinonlybody', true);
common::printIcon('story', 'activate', "storyID=$story->id", $story, 'button', '', '', 'iframe showinonlybody', true);
if($config->global->flow != 'onlyStory' and $story->parent >= 0 and $story->type != 'requirement' and (common::hasPriv('testcase', 'create') or common::hasPriv('testcase', 'batchCreate')))
if($config->global->flow != 'onlyStory' and $story->parent >= 0 and $story->type != 'requirement' and (common::hasPriv('testcase', 'create', $story) or common::hasPriv('testcase', 'batchCreate', $story)))
{
$this->app->loadLang('testcase');
echo "<div class='btn-group dropup'>";
+3 -3
View File
@@ -173,10 +173,10 @@ class svnModel extends model
}
}
$version = $this->repo->saveOneCommit($repoID, $log, $version);
$version = $this->repo->saveOneCommit($repo->id, $log, $version);
}
$this->repo->updateCommitCount($repoID, $lastInDB->commit + count($logs));
$this->dao->update(TABLE_REPO)->set('lastSync')->eq(helper::now())->where('id')->eq($repoID)->exec();
$this->repo->updateCommitCount($repo->id, $lastInDB->commit + count($logs));
$this->dao->update(TABLE_REPO)->set('lastSync')->eq(helper::now())->where('id')->eq($repo->id)->exec();
if($isPrintLog) $this->printLog("\n\nrepo #" . $repo->id . ': ' . $repo->path . " finished");
}
+8 -7
View File
@@ -1,17 +1,18 @@
/* If left = 0, warning. */
function checkLeft()
{
var left = $("#left").val();
var consumed = $("#consumed").val();
if(isNaN(parseFloat(left)) || left == 0)
var left = parseFloat($("#left").val());
var consumed = parseFloat($("#consumed").val());
if(!left)
{
if(isNaN(parseFloat(consumed)) || consumed == 0)
var result;
if(!consumed)
{
alert(noticeTaskStart);
return false;
result = false;
}
var result = confirm(confirmFinish);
if(!result) setTimeout(function() {$.enableForm()}, 500);
else result = confirm(confirmFinish);
if(!result) setTimeout(function() {$.enableForm()}, 50);
return result;
}
}
+1 -1
View File
@@ -2944,7 +2944,7 @@ class taskModel extends model
case 'actions':
if($storyChanged)
{
common::printIcon('task', 'confirmStoryChange', "taskid=$task->id", '', 'list', '', 'hiddenwin');
common::printIcon('task', 'confirmStoryChange', "taskid=$task->id", $task, 'list', '', 'hiddenwin');
break;
}
+2 -2
View File
@@ -142,8 +142,8 @@
</div>
</div>
<?php endif;?>
<?php echo $this->fetch('file', 'printFiles', array('files' => $task->files, 'fieldset' => 'true'));?>
<?php $actionFormLink = $this->createLink('action', 'comment', "objectType=task&objectID=$task->id");?>
<?php echo $this->fetch('file', 'printFiles', array('files' => $task->files, 'fieldset' => 'true', 'object' => $task));?>
<?php if(!common::checkParentObjectClosed('task', $task)) $actionFormLink = $this->createLink('action', 'comment', "objectType=task&objectID=$task->id");?>
</div>
<?php $this->printExtendFields($task, 'div', "position=left&inForm=0&inCell=1");?>
<div class="cell"><?php include '../../common/view/action.html.php';?></div>
+1
View File
@@ -198,6 +198,7 @@ class testcase extends control
$this->view->suiteID = 0;
$this->view->moduleID = 0;
$this->view->branch = $branch;
$this->view->product = $this->product->getByID($productID);
$this->display();
}
+2
View File
@@ -102,6 +102,7 @@
?>
</ul>
</div>
<?php if(empty($this->config->global->closedProductStatus) or $product->status != 'closed'):?>
<div class='btn-group'>
<button type='button' class='btn btn-link dropdown-toggle' data-toggle='dropdown' id='importAction'><i class='icon icon-import muted'></i> <?php echo $lang->import ?><span class='caret'></span></button>
<ul class='dropdown-menu' id='importActionMenu'>
@@ -151,6 +152,7 @@
</ul>
</div>
<?php endif;?>
<?php endif;?>
</div>
</div>
<?php endif;?>
+15 -9
View File
@@ -57,6 +57,11 @@ class testreport extends control
if($extra) $task = $this->testtask->getById($extra);
$name = $extra ? $task->name : $object->name;
/* Determines whether an object is editable. */
$changeAllowed = true;
if($objectType == 'product' and !empty($this->config->global->closedProductStatus) and $object->status == 'closed') $changeAllowed = false;
if($objectType == 'project' and !empty($this->config->global->closedProjectStatus) and $object->status == 'closed') $changeAllowed = false;
/* Load pager. */
$this->app->loadClass('pager', $static = true);
if($this->app->getViewType() == 'mhtml') $recPerPage = 10;
@@ -100,15 +105,16 @@ class testreport extends control
$this->view->position[] = html::a(inlink('browse', "objectID=$objectID&objectType=$objectType&extra=$extra"), $extra ? $task->name : $object->name);
$this->view->position[] = $this->lang->testreport->browse;
$this->view->reports = $reports;
$this->view->orderBy = $orderBy;
$this->view->objectID = $objectID;
$this->view->objectType = $objectType;
$this->view->extra = $extra;
$this->view->pager = $pager;
$this->view->users = $this->user->getPairs('noletter|noclosed|nodeleted');
$this->view->tasks = $tasks;
$this->view->projects = $projects;
$this->view->reports = $reports;
$this->view->orderBy = $orderBy;
$this->view->objectID = $objectID;
$this->view->objectType = $objectType;
$this->view->extra = $extra;
$this->view->pager = $pager;
$this->view->users = $this->user->getPairs('noletter|noclosed|nodeleted');
$this->view->tasks = $tasks;
$this->view->projects = $projects;
$this->view->changeAllowed = $changeAllowed;
$this->display();
}
+1 -1
View File
@@ -20,7 +20,7 @@
</span>
</div>
<div class='pull-right btn-toolbar'>
<?php if($objectType == 'product') common::printLink('testreport', 'create', "objectID=0&objectType=testtask&productID=$objectID", "<i class='icon icon-plus'></i>" . $lang->testreport->create, '', "class='btn btn-primary'");?>
<?php if($objectType == 'product' and $changeAllowed) common::printLink('testreport', 'create', "objectID=0&objectType=testtask&productID=$objectID", "<i class='icon icon-plus'></i>" . $lang->testreport->create, '', "class='btn btn-primary'");?>
</div>
</div>
<?php endif;?>
+11 -9
View File
@@ -65,6 +65,7 @@ class testsuite extends control
$this->view->suites = $suites;
$this->view->users = $this->loadModel('user')->getPairs('noclosed|noletter');
$this->view->pager = $pager;
$this->view->product = $this->product->getByID($productID);
$this->display();
}
@@ -151,15 +152,16 @@ class testsuite extends control
$this->view->position[] = $this->lang->testsuite->common;
$this->view->position[] = $this->lang->testsuite->view;
$this->view->productID = $productID;
$this->view->suite = $suite;
$this->view->users = $this->loadModel('user')->getPairs('noclosed|noletter');
$this->view->actions = $this->loadModel('action')->getList('testsuite', $suiteID);
$this->view->cases = $this->testsuite->getLinkedCases($suiteID, $sort, $pager);
$this->view->orderBy = $orderBy;
$this->view->pager = $pager;
$this->view->modules = $this->loadModel('tree')->getOptionMenu($suite->product, 'case');
$this->view->branches = $this->loadModel('branch')->getPairs($suite->product, 'noempty');
$this->view->productID = $productID;
$this->view->suite = $suite;
$this->view->users = $this->loadModel('user')->getPairs('noclosed|noletter');
$this->view->actions = $this->loadModel('action')->getList('testsuite', $suiteID);
$this->view->cases = $this->testsuite->getLinkedCases($suiteID, $sort, $pager);
$this->view->orderBy = $orderBy;
$this->view->pager = $pager;
$this->view->modules = $this->loadModel('tree')->getOptionMenu($suite->product, 'case');
$this->view->branches = $this->loadModel('branch')->getPairs($suite->product, 'noempty');
$this->view->changeAllowed = common::checkParentObjectClosed('testsuite', $suite) ? false : true;
$this->display();
}
+3 -1
View File
@@ -21,9 +21,11 @@
<span class='label label-light label-badge'><?php echo $pager->recTotal;?></span>
</a>
</div>
<?php if(empty($this->config->global->closedProductStatus) or $product->status != 'closed'):?>
<div class="btn-toolbar pull-right">
<?php common::printLink('testsuite', 'create', "product=$productID", "<i class='icon icon-plus'></i> " . $lang->testsuite->create, '', "class='btn btn-primary'");?>
</div>
<?php endif;?>
</div>
<?php endif;?>
<div id='mainContent' class='main-table' data-ride='table'>
@@ -31,7 +33,7 @@
<div class="table-empty-tip">
<p>
<span class="text-muted"><?php echo $lang->testsuite->noTestsuite;?></span>
<?php if(common::hasPriv('testsuite', 'create')):?>
<?php if((empty($this->config->global->closedProductStatus) or $product->status != 'closed') and common::hasPriv('testsuite', 'create')):?>
<?php echo html::a($this->createLink('testsuite', 'create', "product=$productID"), "<i class='icon icon-plus'></i> " . $lang->testsuite->create, '', "class='btn btn-info'");?>
<?php endif;?>
</p>
+11 -8
View File
@@ -29,7 +29,7 @@
</div>
<div class='btn-toolbar pull-right'>
<?php
if(!$suite->deleted)
if(!$suite->deleted and $changeAllowed)
{
echo $this->buildOperateMenu($suite, 'view');
@@ -47,7 +47,7 @@
<div class='panel'>
<?php $canBatchEdit = common::hasPriv('testcase', 'batchEdit');?>
<?php $canBatchUnlink = common::hasPriv('testsuite', 'batchUnlinkCases');?>
<?php $hasCheckbox = ($canBatchEdit && $canBatchUnlink);?>
<?php $hasCheckbox = ($changeAllowed and $canBatchEdit and $canBatchUnlink);?>
<?php $vars = "suiteID=$suite->id&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}";?>
<table class='table has-sort-head' id='caseList'>
<thead>
@@ -97,13 +97,16 @@
<td><?php echo $case->stepNumber;?></td>
<td class='c-actions'>
<?php
if(common::hasPriv('testsuite', 'unlinkCase', $suite))
if($changeAllowed)
{
$unlinkURL = $this->createLink('testsuite', 'unlinkCase', "suiteID=$suite->id&caseID=$case->id&confirm=yes");
echo html::a("javascript:ajaxDelete(\"$unlinkURL\", \"caseList\", confirmUnlink)", '<i class="icon-unlink"></i>', '', "title='{$lang->testsuite->unlinkCase}' class='btn'");
if(common::hasPriv('testsuite', 'unlinkCase', $suite))
{
$unlinkURL = $this->createLink('testsuite', 'unlinkCase', "suiteID=$suite->id&caseID=$case->id&confirm=yes");
echo html::a("javascript:ajaxDelete(\"$unlinkURL\", \"caseList\", confirmUnlink)", '<i class="icon-unlink"></i>', '', "title='{$lang->testsuite->unlinkCase}' class='btn'");
}
if(common::hasPriv('testtask', 'runCase')) echo html::a($this->createLink('testtask', 'runCase', "runID=0&caseID=$case->id&version=$case->version"), '<i class="icon-testtask-runCase icon-play"></i>', '', "class='btn runCase iframe' data-width='95%' title={$lang->testtask->runCase}");
common::printIcon('testtask', 'results', "runID=0&caseID=$case->id", $suite, 'list', 'list-alt', '', 'results iframe', false, "data-width='95%'");
}
if(common::hasPriv('testtask', 'runCase')) echo html::a($this->createLink('testtask', 'runCase', "runID=0&caseID=$case->id&version=$case->version"), '<i class="icon-testtask-runCase icon-play"></i>', '', "class='btn runCase iframe' data-width='95%' title={$lang->testtask->runCase}");
common::printIcon('testtask', 'results', "runID=0&caseID=$case->id", $suite, 'list', 'list-alt', '', 'results iframe', false, "data-width='95%'");
?>
</td>
</tr>
@@ -112,7 +115,7 @@
<?php endif;?>
</table>
<div class='table-footer'>
<?php if($cases):?>
<?php if($cases and $changeAllowed):?>
<?php if($hasCheckbox):?>
<div class="checkbox-primary check-all"><label><?php echo $lang->selectAll?></label></div>
<?php endif;?>
+19 -9
View File
@@ -90,6 +90,7 @@ class testtask extends control
$this->view->branch = $branch;
$this->view->beginTime = $beginTime;
$this->view->endTime = $endTime;
$this->view->product = $this->product->getByID($productID);
$this->display();
}
@@ -136,6 +137,7 @@ class testtask extends control
$this->view->tasks = $this->testtask->getProductUnitTasks($productID, $browseType, $sort, $pager);
$this->view->users = $this->loadModel('user')->getPairs('noclosed|noletter');
$this->view->pager = $pager;
$this->view->product = $this->product->getByID($productID);
$this->display();
}
@@ -399,6 +401,9 @@ class testtask extends control
$this->testtask->setMenu($this->products, $productID, $task->branch, $taskID);
setcookie('preTaskID', $taskID, $this->config->cookieLife, $this->config->webRoot, '', false, true);
/* Determines whether an object is editable. */
$changeAllowed = common::checkParentObjectClosed('testtask', $task) ? false : true;
if($this->cookie->preTaskID != $taskID)
{
$_COOKIE['taskCaseModule'] = 0;
@@ -472,6 +477,7 @@ class testtask extends control
$this->view->pager = $pager;
$this->view->branches = $this->loadModel('branch')->getPairs($productID);
$this->view->setModule = false;
$this->view->changeAllowed = $changeAllowed;
$this->display();
}
@@ -546,6 +552,9 @@ class testtask extends control
$productID = $task->product;
$this->testtask->setMenu($this->products, $productID, $task->branch, $taskID);
/* Determines whether an object is editable. */
$changeAllowed = common::checkParentObjectClosed('testtask', $task) ? false : true;
$runs = $this->testtask->getRuns($taskID, 0, $groupBy);
$this->loadModel('common')->saveQueryCondition($this->dao->get(), 'testcase', false);
$runs = $this->testcase->appendData($runs, 'run');
@@ -580,15 +589,16 @@ class testtask extends control
$this->view->position[] = $this->lang->testtask->common;
$this->view->position[] = $this->lang->testtask->cases;
$this->view->users = $this->loadModel('user')->getPairs('noletter');
$this->view->productID = $productID;
$this->view->task = $task;
$this->view->taskID = $taskID;
$this->view->browseType = 'group';
$this->view->groupBy = $groupBy;
$this->view->groupByList = $groupByList;
$this->view->cases = $groupCases;
$this->view->account = 'all';
$this->view->users = $this->loadModel('user')->getPairs('noletter');
$this->view->productID = $productID;
$this->view->task = $task;
$this->view->taskID = $taskID;
$this->view->browseType = 'group';
$this->view->groupBy = $groupBy;
$this->view->groupByList = $groupByList;
$this->view->cases = $groupCases;
$this->view->account = 'all';
$this->view->changeAllowed = $changeAllowed;
$this->display();
}
+2
View File
@@ -46,9 +46,11 @@ $status = $this->session->testTaskVersionStatus;
<div class='datepicker-wrapper datepicker-date'><?php echo html::input('date', $endTime, "class='form-control form-date' onchange='changeDate(\"$beginTime\", this.value, \"$condition\")'");?></div>
</div>
</div>
<?php if(empty($this->config->global->closedProductStatus) or $product->status != 'closed'):?>
<div class="btn-toolbar pull-right">
<?php common::printLink('testtask', 'create', "product=$productID", "<i class='icon icon-plus'></i> " . $lang->testtask->create, '', "class='btn btn-primary'");?>
</div>
<?php endif;?>
</div>
<?php endif;?>
<div id='mainContent' class='main-table'>
@@ -23,9 +23,11 @@
<?php echo html::a(inlink('browseUnits', "productID=$productID&browseType=$key&orderBy=$orderBy"), "<span class='text'>$label</span>", '', "id='{$key}Tab' class='btn btn-link'");?>
<?php endforeach;?>
</div>
<?php if(empty($this->config->global->closedProductStatus) or $product->status != 'closed'):?>
<div class="btn-toolbar pull-right">
<?php common::printLink('testtask', 'importUnitResult', "product=$productID", "<i class='icon icon-import'></i> " . $lang->testtask->importUnitResult, '', "class='btn btn-primary'");?>
</div>
<?php endif;?>
</div>
<div id='mainContent' class='main-table' data-ride='table'>
<?php if(empty($tasks)):?>
+1 -1
View File
@@ -36,7 +36,7 @@
</div>
<div class='btn-toolbar pull-right'>
<?php
common::printIcon('testtask', 'linkCase', "taskID=$task->id", '', 'button', 'link');
common::printIcon('testtask', 'linkCase', "taskID=$task->id", $task, 'button', 'link');
common::printIcon('testcase', 'export', "productID=$productID&orderBy=`case`_desc&taskID=$task->id", '', 'button', '', '', 'export');
common::printIcon('testtask', 'report', "productID=$productID&taskID=$task->id&browseType=$browseType&branchID=$task->branch&moduleID=" . (empty($moduleID) ? '' : $moduleID));
common::printIcon('testtask', 'view', "taskID=$task->id", '', 'button', 'list-alt');
+2 -2
View File
@@ -40,7 +40,7 @@
$canBatchAssign = common::hasPriv('testtask', 'batchAssign');
$canBatchRun = common::hasPriv('testtask', 'batchRun');
$canBatchAction = ($canBatchEdit or $canBatchUnlink or $canBatchAssign or $canBatchRun);
$canBatchAction = ($changeAllowed and ($canBatchEdit or $canBatchUnlink or $canBatchAssign or $canBatchRun));
if($useDatatable) include '../../common/view/datatable.html.php';
if(!$useDatatable) include '../../common/view/tablesorter.html.php';
@@ -141,7 +141,7 @@
</div>
<?php else:?>
<div class="table-empty-tip">
<p><span class="text-muted"><?php echo $lang->testcase->noCase;?></span> <?php common::printLink('testtask', 'linkCase', "taskID={$taskID}", "<i class='icon icon-plus'></i> " . $lang->testtask->linkCase, '', "class='btn btn-info'");?></p>
<p><span class="text-muted"><?php echo $lang->testcase->noCase;?></span> <?php if($changeAllowed) common::printLink('testtask', 'linkCase', "taskID={$taskID}", "<i class='icon icon-plus'></i> " . $lang->testtask->linkCase, '', "class='btn btn-info'");?></p>
</div>
<?php endif;?>
</form>
+2
View File
@@ -76,6 +76,7 @@
<td><?php echo (common::hasPriv('testtask', 'results') and $run->results) ? html::a($this->createLink('testtask', 'results', "runID={$run->id}&caseID={$run->case}"), $run->results, '', "class='iframe'") : $run->results;?></td>
<td><?php echo $run->stepNumber;?></td>
<td class='c-actions'>
<?php if($changeAllowed):?>
<?php common::printIcon('testtask', 'runCase', "runID=$run->id&caseID=$run->case&version=$run->caseVersion", '', 'list', 'play', '', 'runCase iframe', false, "data-width='95%'");?>
<?php common::printIcon('testcase', 'edit', "caseID=$run->case", '', 'list');?>
<?php
@@ -85,6 +86,7 @@
echo html::a("javascript:ajaxDelete(\"$unlinkURL\", \"casesForm\", confirmUnlink)", '<i class="icon-unlink"></i>', '', "title='{$this->lang->testtask->unlinkCase}' class='btn'");
}
?>
<?php endif;?>
</td>
</tr>
<?php $i++;?>
+1 -1
View File
@@ -39,7 +39,7 @@
<div class="detail-content article-content"><?php echo $task->report;?></div>
</div>
<?php endif;?>
<?php $actionFormLink = $this->createLink('action', 'comment', "objectType=testtask&objectID=$task->id");?>
<?php if(!common::checkParentObjectClosed('testtask', $task)) $actionFormLink = $this->createLink('action', 'comment', "objectType=testtask&objectID=$task->id");?>
</div>
<?php $this->printExtendFields($task, 'div', "position=left&inForm=0&inCell=1");?>
<div class='cell'><?php include '../../common/view/action.html.php';?></div>
+11
View File
@@ -43,6 +43,9 @@ class tree extends control
$this->view->branches = $branches;
}
$this->view->root = $product;
/* Determines whether an object is editable. */
$changeAllowed = (empty($this->config->global->closedProductStatus) or $product->status != 'closed') ? true : false;
}
elseif(strpos($viewType, 'doc') !== false)
{
@@ -192,6 +195,7 @@ class tree extends control
$this->view->parentModules = $parentModules;
$this->view->branch = $branch;
$this->view->tree = $this->tree->getProductStructure($rootID, $viewType);
$this->view->changeAllowed = isset($changeAllowed) ? $changeAllowed : true;
$this->display();
}
@@ -206,12 +210,18 @@ class tree extends control
*/
public function browseTask($rootID, $productID = 0, $currentModuleID = 0)
{
/* Get project. */
$project = $this->loadModel('project')->getById($rootID);
$this->view->root = $project;
/* Get all associated products. */
$products = $this->project->getProducts($rootID);
$this->view->products = $products;
/* Determines whether an object is editable. */
$changeAllowed = (empty($this->config->global->closedProjectStatus) or $project->status != 'closed') ? true : false;
/* Set menu. */
$this->lang->set('menugroup.tree', 'project');
$this->project->setMenu($this->project->getPairs(), $rootID);
$this->lang->tree->menu = $this->lang->project->menu;
@@ -240,6 +250,7 @@ class tree extends control
$this->view->parentModules = $parentModules;
$this->view->currentModuleID = $currentModuleID;
$this->view->tree = $this->tree->getTaskStructure($rootID, $productID);
$this->view->changeAllowed = $changeAllowed;
$this->display();
}
+6 -5
View File
@@ -80,7 +80,7 @@ li.tree-item-story > .tree-actions .tree-action[data-type=delete]{display:none;}
<?php $manageChild = 'manage' . ucfirst($viewType) . 'Child';?>
<?php if(strpos($viewType, 'trainskill') === false and strpos($viewType, 'trainpost') === false) echo strpos($viewType, 'doc') !== false ? $lang->doc->manageType : $lang->tree->$manageChild;?>
</div>
<?php if($viewType == 'story' and $allProduct):?>
<?php if($viewType == 'story' and $allProduct and $changeAllowed):?>
<div class="panel-actions btn-toolbar"><?php echo html::a('javascript:toggleCopy()', $lang->tree->syncFromProduct, '', "class='btn btn-sm btn-primary'")?></div>
<?php endif;?>
</div>
@@ -159,7 +159,7 @@ li.tree-item-story > .tree-actions .tree-action[data-type=delete]{display:none;}
<td></td>
<?php endif;?>
<td colspan="2" class="form-actions">
<?php echo html::submitButton();?>
<?php if($changeAllowed) echo html::submitButton();?>
<?php echo html::a($backLink, $lang->goback, '', "class='btn btn-wide'");?>
<?php echo html::hidden('parentModuleID', $currentModuleID);?>
<?php echo html::hidden('maxOrder', $maxOrder);?>
@@ -265,9 +265,10 @@ $(function()
}
};
if(<?php echo common::hasPriv('tree', 'updateorder') ? 'false' : 'true' ?>) options.actions["sort"] = false;
if(<?php echo common::hasPriv('tree', 'edit') ? 'false' : 'true' ?>) options.actions["edit"] = false;
if(<?php echo common::hasPriv('tree', 'delete') ? 'false' : 'true' ?>) options.actions["delete"] = false;
if(<?php echo (common::hasPriv('tree', 'updateorder') and $changeAllowed) ? 'false' : 'true' ?>) options.actions["sort"] = false;
if(<?php echo (common::hasPriv('tree', 'edit') and $changeAllowed) ? 'false' : 'true' ?>) options.actions["edit"] = false;
if(<?php echo (common::hasPriv('tree', 'delete') and $changeAllowed) ? 'false' : 'true' ?>) options.actions["delete"] = false;
if(<?php echo $changeAllowed ? 'false' : 'true' ?>) options.actions["subModules"] = false;
var $tree = $('#modulesTree').tree(options);
+5 -4
View File
@@ -112,7 +112,7 @@ li.story-item > .tree-actions .tree-action[data-type=delete]{display:none;}
<td></td>
<td colspan='2' class="form-actions">
<?php
echo html::submitButton();
if($changeAllowed) echo html::submitButton();
echo html::a($backLink, $lang->goback, '', "class='btn btn-wide'");
echo html::hidden('parentModuleID', $currentModuleID);
echo html::hidden('maxOrder', $maxOrder);
@@ -216,9 +216,10 @@ $(function()
}
};
if(<?php echo common::hasPriv('tree', 'updateorder') ? 'false' : 'true' ?>) options.actions["sort"] = false;
if(<?php echo common::hasPriv('tree', 'edit') ? 'false' : 'true' ?>) options.actions["edit"] = false;
if(<?php echo common::hasPriv('tree', 'delete') ? 'false' : 'true' ?>) options.actions["delete"] = false;
if(<?php echo (common::hasPriv('tree', 'updateorder') and $changeAllowed) ? 'false' : 'true' ?>) options.actions["sort"] = false;
if(<?php echo (common::hasPriv('tree', 'edit') and $changeAllowed) ? 'false' : 'true' ?>) options.actions["edit"] = false;
if(<?php echo (common::hasPriv('tree', 'delete') and $changeAllowed) ? 'false' : 'true' ?>) options.actions["delete"] = false;
if(<?php echo $changeAllowed ? 'false' : 'true' ?>) options.actions["subModules"] = false;
var $tree = $('#modulesTree').tree(options);
+55 -27
View File
@@ -318,6 +318,7 @@
'.text-align', '.color', '.background-color', '.font-size', '.font-family', '.font-weight',
'.font-style', '.text-decoration', '.vertical-align', '.background', '.border'
],
tr: ['id', 'class', '.background-color'],
a: ['id', 'class', 'href', 'target', 'name'],
embed: ['id', 'class', 'src', 'width', 'height', 'type', 'loop', 'autostart', 'quality', '.width', '.height', 'align', 'allowscriptaccess'],
audio: ['id', 'class', 'width', 'src', 'height', 'loop', 'preload', 'autoplay', 'controls', 'crossorigin', 'currentTime', 'duration', 'muted'],
@@ -330,7 +331,7 @@
],
pre: ['id', 'class'],
hr: ['id', 'class', '.page-break-after'],
'br,tbody,tr,strong,b,sub,sup,em,i,u,strike,s,del': ['id', 'class'],
'br,tbody,strong,b,sub,sup,em,i,u,strike,s,del': ['id', 'class'],
iframe: ['id', 'class', 'src', 'frameborder', 'width', 'height', '.width', '.height']
},
layout: '<div class="container ke-loading"><div class="toolbar"></div><div class="edit"></div><div class="statusbar"></div></div>'
@@ -1042,6 +1043,8 @@
'<', mediaType, ' '
];
var srcs = (attrs.src || '').split(',');
var autoPlayEnabled;
var mutedSetted;
_each(attrs, function(key, val) {
if (key === 'src' || val === false) {
return;
@@ -1049,11 +1052,16 @@
if (val === true || /^(controls|autoplay|loop|muted)$/i.test(key)) {
if (val !== 'false') {
htmls.push(key + ' ');
if (key === 'autoplay') autoPlayEnabled = true;
else if (key === 'muted') mutedSetted = true;
}
} else {
htmls.push(key, '="', val, '" ');
}
});
if (autoPlayEnabled && !mutedSetted) {
htmls.push('muted ');
}
if (srcs.length > 1) {
htmls.push('>');
_each(srcs, function(_, val) {
@@ -1063,7 +1071,7 @@
htmls.push('</', mediaType, '>');
} else {
if(srcs.length) htmls.push('src="', srcs[0], '" ');
htmls.push('/>');
htmls.push('></', mediaType, '>');
}
} else {
htmls = ['<embed '];
@@ -8229,7 +8237,7 @@ KindEditor.plugin('media', function(K) {
'<input type="text" id="keHeight" class="ke-input-text ke-input-number" name="height" value="400" maxlength="4" />',
'</div>',
//controls
'<div class="ke-dialog-row">',
'<div class="ke-dialog-row hidden">',
'<label for="keControls">' + lang.controls + '</label>',
'<input type="checkbox" id="keControls" checked name="controls" value="true" /> ',
'</div>',
@@ -8243,7 +8251,7 @@ KindEditor.plugin('media', function(K) {
var dialog = self.createDialog({
name: name,
width: 450,
height: 270,
height: 240,
title: self.lang(name),
body: html,
yesBtn: {
@@ -8284,8 +8292,8 @@ KindEditor.plugin('media', function(K) {
viewServerBtn = K('[name="viewServer"]', div),
widthBox = K('[name="width"]', div),
heightBox = K('[name="height"]', div),
controlsBox = K('[name="controls"]', div),
autostartBox = K('[name="autostart"]', div);
controlsBox = K('[name="controls"]', div);
urlBox.val('http://');
if(allowMediaUpload) {
@@ -10593,28 +10601,36 @@ KindEditor.plugin('table', function (K) {
});
}
function getTableSetting($table, setting)
{
if (!$table) {
var table = self.plugin.getSelectedTable();
$table = $(table[0]);
}
var setting = $.extend({
borderColor: defaultTableBorderColor
}, $table.data('tableSetting'), setting);
if (setting.autoWidth === undefined) {
setting.autoWidth = $table[0].style.width === 'auto';
}
if (setting.stripedRows === undefined) {
var $rows = $table.find('tbody>tr');
var coloredRowsLength = $rows.filter(function () {
return !!this.style.backgroundColor;
}).length;
setting.stripedRows = coloredRowsLength >= Math.floor($rows.length / 2);
}
return setting;
}
function updateTable(setting, $table, onUpdateSetting) {
if (!$table) {
var table = self.plugin.getSelectedTable();
$table = $(table[0]);
}
if (!$table || !$table.length) return;
if (!setting) {
setting = $.extend({
borderColor: defaultTableBorderColor
}, self.tableSetting, setting);
if (setting.autoWidth === undefined) {
setting.autoWidth = $table[0].style.width === 'auto';
}
if (setting.stripedRows === undefined) {
var $rows = $table.find('tbody>tr');
var coloredRowsLength = $rows.filter(function () {
return !!this.style.backgroundColor;
}).length;
setting.stripedRows = coloredRowsLength >= Math.floor($rows / 2);
}
}
self.tableSetting = setting;
setting = getTableSetting($table, setting);
$table.data('tableSetting', setting);
if (setting.header !== undefined) {
if ($table.is('.ke-plugin-table-example')) {
$table.find('thead').toggleClass('hidden', !setting.header);
@@ -10646,7 +10662,7 @@ KindEditor.plugin('table', function (K) {
if (setting.stripedRows !== undefined) {
var $rows = $table.find('tbody>tr');
$rows.each(function (index) {
$(this).css('background-color', (setting.stripedRows && (index % 2 === 0)) ? '#f9f9f9' : 'none');
$(this).css('background-color', (setting.stripedRows && (index % 2 === 0)) ? '#f9f9f9' : '');
});
onUpdateSetting && onUpdateSetting('stripedRows', setting.stripedRows);
}
@@ -10785,7 +10801,7 @@ KindEditor.plugin('table', function (K) {
updateTable({ borderColor: color }, $exampleTable);
});
updateTable(self.tableSetting, $exampleTable, function (name, value) {
updateTable(getTableSetting($table), $exampleTable, function (name, value) {
switch (name) {
case 'borderColor':
_setColor(colorBox, value || defaultTableBorderColor);
@@ -11026,6 +11042,7 @@ KindEditor.plugin('table', function (K) {
row = self.plugin.getSelectedRow()[0],
cell = self.plugin.getSelectedCell()[0],
index = cell.cellIndex + offset;
var tableSetting = getTableSetting($(table));
// 取得第一行的index
index += table.rows[0].cells.length - row.cells.length;
@@ -11033,7 +11050,7 @@ KindEditor.plugin('table', function (K) {
var newRow = table.rows[i],
newCell = newRow.insertCell(index),
isThead = newRow.parentNode.tagName === 'THEAD';
newCell.outerHTML = '<' + (isThead ? 'th' : 'td') + (newCell.rowSpan > 1 ? ' rowspan="' + newCell.rowSpan + '"' : '') + (newCell.colSpan > 1 ? ' colspan="' + newCell.colSpan + '"' : '') + ' style="' + (isThead ? 'background-color: #f1f1f1;' : '') + 'border: 1px solid ' + ((self.tableSetting && self.tableSetting.borderColor) || defaultTableBorderColor) + '">' + (K.IE ? '&nbsp;' : '<br />') + '</' + (isThead ? 'th' : 'td') + '>';
newCell.outerHTML = '<' + (isThead ? 'th' : 'td') + (newCell.rowSpan > 1 ? ' rowspan="' + newCell.rowSpan + '"' : '') + (newCell.colSpan > 1 ? ' colspan="' + newCell.colSpan + '"' : '') + ' style="' + (isThead ? 'background-color: #f1f1f1;' : '') + 'border: 1px solid ' + ((tableSetting && tableSetting.borderColor) || defaultTableBorderColor) + '">' + (K.IE ? '&nbsp;' : '<br />') + '</' + (isThead ? 'th' : 'td') + '>';
newCell = newRow.cells[index];
// 调整下一行的单元格index
index = _getCellIndex(table, newRow, newCell);
@@ -11054,6 +11071,7 @@ KindEditor.plugin('table', function (K) {
row = self.plugin.getSelectedRow()[0],
cell = self.plugin.getSelectedCell()[0],
firstRow = table.rows[0];
var tableSetting = getTableSetting($(table));
var rowIndex = row.rowIndex;
if (offset === 1) {
rowIndex = row.rowIndex + (cell.rowSpan - 1) + offset;
@@ -11072,7 +11090,7 @@ KindEditor.plugin('table', function (K) {
// if (offset === 1 && currentCell.colSpan > 1) {
// newCell.colSpan = currentCell.colSpan;
// }
newCell.outerHTML = '<' + (isThead ? 'th' : 'td') + (newCell.rowSpan > 1 ? ' rowspan="' + newCell.rowSpan + '"' : '') + (newCell.colSpan > 1 ? ' colspan="' + newCell.colSpan + '"' : '') + ' style="' + (isThead ? 'background-color: #f1f1f1;' : '') + 'border: 1px solid ' + ((self.tableSetting && self.tableSetting.borderColor) || defaultTableBorderColor) + '">' + (K.IE ? '&nbsp;' : '<br />') + '</' + (isThead ? 'th' : 'td') + '>';
newCell.outerHTML = '<' + (isThead ? 'th' : 'td') + (newCell.rowSpan > 1 ? ' rowspan="' + newCell.rowSpan + '"' : '') + (newCell.colSpan > 1 ? ' colspan="' + newCell.colSpan + '"' : '') + ' style="' + (isThead ? 'background-color: #f1f1f1;' : '') + 'border: 1px solid ' + ((tableSetting && tableSetting.borderColor) || defaultTableBorderColor) + '">' + (K.IE ? '&nbsp;' : '<br />') + '</' + (isThead ? 'th' : 'td') + '>';
}
// 调整rowspan
for (var j = rowIndex; j >= 0; j--) {
@@ -11086,6 +11104,7 @@ KindEditor.plugin('table', function (K) {
break;
}
}
updateTable(null, $(table));
self.cmd.range.selectNodeContents(cell).collapse(true);
// self.cmd.select();
self.addBookmark();
@@ -11142,6 +11161,9 @@ KindEditor.plugin('table', function (K) {
}
cell.colSpan += nextCell.colSpan;
row.deleteCell(nextCellIndex);
updateTable(null, $(table));
self.cmd.range.selectNodeContents(cell).collapse(true);
// self.cmd.select();
self.addBookmark();
@@ -11174,6 +11196,7 @@ KindEditor.plugin('table', function (K) {
colspan: right - left + 1,
});
$table.find('.ke-cell-removed').remove();
updateTable(null, $table);
self.cmd.range.selectNodeContents($firstCell[0]).collapse(true);
// self.cmd.select();
self.addBookmark();
@@ -11185,6 +11208,7 @@ KindEditor.plugin('table', function (K) {
row = self.plugin.getSelectedRow()[0],
cell = self.plugin.getSelectedCell()[0],
rowIndex = row.rowIndex;
var tableSetting = getTableSetting($(table));
// 不是可分割单元格
if (cell.rowSpan === 1) {
return;
@@ -11195,7 +11219,7 @@ KindEditor.plugin('table', function (K) {
newCell = newRow.insertCell(cellIndex);
var isThead = newRow.parentNode.tagName === 'THEAD';
var colSpan = cell.colSpan > 1 ? cell.colSpan : newCell.colSpan;
newCell.outerHTML = '<' + (isThead ? 'th' : 'td') + (newCell.rowSpan > 1 ? ' rowspan="' + newCell.rowSpan + '"' : '') + (colSpan > 1 ? ' colspan="' + colSpan + '"' : '') + ' style="' + (isThead ? 'background-color: #f1f1f1;' : '') + 'border: 1px solid ' + ((self.tableSetting && self.tableSetting.borderColor) || defaultTableBorderColor) + '">' + (K.IE ? '&nbsp;' : '<br />') + '</' + (isThead ? 'th' : 'td') + '>';
newCell.outerHTML = '<' + (isThead ? 'th' : 'td') + (newCell.rowSpan > 1 ? ' rowspan="' + newCell.rowSpan + '"' : '') + (colSpan > 1 ? ' colspan="' + colSpan + '"' : '') + ' style="' + (isThead ? 'background-color: #f1f1f1;' : '') + 'border: 1px solid ' + ((tableSetting && tableSetting.borderColor) || defaultTableBorderColor) + '">' + (K.IE ? '&nbsp;' : '<br />') + '</' + (isThead ? 'th' : 'td') + '>';
if (cell.colSpan > 1) {
newCell.colSpan = cell.colSpan;
}
@@ -11203,6 +11227,7 @@ KindEditor.plugin('table', function (K) {
cellIndex = _getCellIndex(table, newRow, newCell);
}
K(cell).removeAttr('rowSpan');
updateTable(null, $(table));
self.cmd.range.selectNodeContents(cell).collapse(true);
// self.cmd.select();
self.addBookmark();
@@ -11213,6 +11238,7 @@ KindEditor.plugin('table', function (K) {
row = self.plugin.getSelectedRow()[0],
cell = self.plugin.getSelectedCell()[0],
cellIndex = cell.cellIndex;
var tableSetting = getTableSetting($(table));
// 不是可分割单元格
if (cell.colSpan === 1) {
return;
@@ -11222,9 +11248,10 @@ KindEditor.plugin('table', function (K) {
var newCell = row.insertCell(cellIndex + i);
var rowSpan = cell.rowSpan > 1 ? cell.rowSpan : newCell.rowSpan;
var colSpan = newCell.colSpan;
newCell.outerHTML = '<' + (isThead ? 'th' : 'td') + (rowSpan > 1 ? ' rowspan="' + rowSpan + '"' : '') + (colSpan > 1 ? ' colspan="' + colSpan + '"' : '') + ' style="' + (isThead ? 'background-color: #f1f1f1;' : '') + 'border: 1px solid ' + ((self.tableSetting && self.tableSetting.borderColor) || defaultTableBorderColor) + '">' + (K.IE ? '&nbsp;' : '<br />') + '</' + (isThead ? 'th' : 'td') + '>';
newCell.outerHTML = '<' + (isThead ? 'th' : 'td') + (rowSpan > 1 ? ' rowspan="' + rowSpan + '"' : '') + (colSpan > 1 ? ' colspan="' + colSpan + '"' : '') + ' style="' + (isThead ? 'background-color: #f1f1f1;' : '') + 'border: 1px solid ' + ((tableSetting && tableSetting.borderColor) || defaultTableBorderColor) + '">' + (K.IE ? '&nbsp;' : '<br />') + '</' + (isThead ? 'th' : 'td') + '>';
}
K(cell).removeAttr('colSpan');
updateTable(null, $(table));
self.cmd.range.selectNodeContents(cell).collapse(true);
// self.cmd.select();
self.addBookmark();
@@ -11287,6 +11314,7 @@ KindEditor.plugin('table', function (K) {
// self.cmd.select();
K(table).remove();
} else {
updateTable(null, $(table));
self.cmd.selection(true);
}
self.addBookmark();
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1,5 +1,5 @@
/*!
* ZUI: 选择器 - v1.9.2 - 2020-10-29
* ZUI: 选择器 - v1.9.2 - 2020-10-30
* http://openzui.com
* GitHub: https://github.com/easysoft/zui.git
* Copyright (c) 2020 cnezsoft.com; Licensed MIT
File diff suppressed because one or more lines are too long
@@ -1,7 +1,7 @@
<?php
if(strtolower($actionType) == 'reconnectxuanxuan' or strtolower($actionType) == 'loginxuanxuan')
{
$ip = $this->server->remote_addr;
$ip = helper::getRemoteIp();
$last = $this->server->request_time;
$this->dao->update(TABLE_USER)->set('visits = visits + 1')->set('ip')->eq($ip)->set('last')->eq($last)->where('account')->eq($actor)->exec();
}
+1
View File
@@ -15,6 +15,7 @@ class myIm extends im
$this->view->source = $source;
$this->view->xxdStatus = $this->im->getXxdStatus();
$this->view->checkXXBConfig = $this->im->checkXXBConfig();
$this->view->domain = $this->im->getServer('zentao');
$this->display();
}
}
@@ -0,0 +1,30 @@
<?php
include '../../control.php';
class myIm extends im
{
/**
* Get serverInfo api.
*
* @param string $account
* @param string $password
* @param string $apiVersion
* @param int $userID
* @param string $version
* @param string $device
* @access public
* @return void
*/
public function sysGetServerInfo($account, $password, $apiVersion = '', $userID = 0, $version = '', $device = 'desktop')
{
/* Check if the user is locked. */
if($this->loadModel('user')->checkLocked($account))
{
$output = new stdclass();
$output->result = 'fail';
$output->data = 'locked';
die($this->app->encrypt($output));
}
parent::sysGetServerInfo($account, $password, $apiVersion, $userID, $version, $device);
}
}
+1 -1
View File
@@ -46,7 +46,7 @@ window.v.showLog = <?php echo $config->xuanxuan->debug;?>;
</tr>
<tr>
<th><?php echo $lang->im->url;?></th>
<td><?php echo commonModel::getSysURL() . $this->config->webRoot . 'x.php';?></td>
<td><?php echo $domain . $this->config->webRoot . 'x.php';?></td>
</tr>
</body>
</table>
Binary file not shown.