Merge branch '15.0.beta3' of http://gitlab.zcorp.cc/easycorp/zentaopms into 15.0.beta3

This commit is contained in:
holan20180123
2021-04-01 15:30:00 +08:00
55 changed files with 166 additions and 277 deletions
+5
View File
@@ -261,6 +261,10 @@ class block extends control
{
$block->moreLink = $this->createLink('project', 'dynamic', "projectID=$projectID&type=all");
}
elseif($moduleName == 'project' and $method == 'testtask')
{
$block->moreLink = $this->createLink('project', 'testtask', "projectID=$projectID");
}
}
elseif($block->block == 'dynamic')
{
@@ -595,6 +599,7 @@ class block extends control
$account = $this->app->user->account;
$type = $this->params->type;
$this->app->loadLang('execution');
$this->view->tasks = $this->loadModel('task')->getUserTasks($account, $type, $this->viewType == 'json' ? 0 : (int)$this->params->count, null, $this->params->orderBy);
}
+1 -1
View File
@@ -47,7 +47,7 @@ $lang->block->myExecution = 'Unclosed ' . $lang->executionCommon . 's';
$lang->block->myProduct = 'Unclosed ' . $lang->productCommon . 's';
$lang->block->delayed = 'Verspätet';
$lang->block->noData = 'Keine Daten für diesen Bericht.';
$lang->block->emptyTip = 'Keine Information';
$lang->block->emptyTip = 'No Data.';
$lang->block->createdTodos = 'Todos Created';
$lang->block->createdRequirements = 'UR/Epics Created';
$lang->block->createdStories = 'SR/Stories Created';
+1 -1
View File
@@ -47,7 +47,7 @@ $lang->block->myExecution = 'Unclosed ' . $lang->executionCommon . 's';
$lang->block->myProduct = 'Unclosed ' . $lang->productCommon . 's';
$lang->block->delayed = 'Tạm ngưng';
$lang->block->noData = 'Không có dữ liệu trên loại báo cáo này.';
$lang->block->emptyTip = 'Không có dữ liệu.';
$lang->block->emptyTip = 'No Data.';
$lang->block->createdTodos = 'Todos Created';
$lang->block->createdRequirements = 'UR/Epics Created';
$lang->block->createdStories = 'SR/Stories Created';
+2 -2
View File
@@ -47,7 +47,7 @@ $lang->block->myExecution = '未关闭的' . $lang->executionCommon;
$lang->block->myProduct = '未关闭的' . $lang->productCommon;
$lang->block->delayed = '已延期';
$lang->block->noData = '当前统计类型下暂无数据';
$lang->block->emptyTip = '暂无信息';
$lang->block->emptyTip = '暂无数据';
$lang->block->createdTodos = '创建的待办数';
$lang->block->createdRequirements = '创建的' . $lang->URCommon . '数';
$lang->block->createdStories = '创建的' . $lang->SRCommon . '数';
@@ -527,7 +527,7 @@ $lang->block->modules['project']->moreLinkList->cmmiestimate = 'workestimation
$lang->block->modules['project']->moreLinkList->cmmiissue = 'issue|browse|';
$lang->block->modules['project']->moreLinkList->cmmirisk = 'risk|browse|';
$lang->block->modules['project']->moreLinkList->scrumlist = 'project|execution|';
$lang->block->modules['project']->moreLinkList->scrumtest = 'testtask|browse|';
$lang->block->modules['project']->moreLinkList->scrumtest = 'project|testtask|';
$lang->block->modules['project']->moreLinkList->scrumproduct = 'product|all|';
$lang->block->modules['project']->moreLinkList->sprint = 'project|execution|';
$lang->block->modules['project']->moreLinkList->projectdynamic = 'project|dynamic|';
+1 -1
View File
@@ -46,7 +46,7 @@ $lang->block->myExecution = '未關閉的' . $lang->executionCommon;
$lang->block->myProduct = '未關閉的' . $lang->productCommon;
$lang->block->delayed = '已延期';
$lang->block->noData = '當前統計類型下暫無數據';
$lang->block->emptyTip = '暫無信息';
$lang->block->emptyTip = '暫無數據';
$lang->block->createdTodos = '創建的待辦數';
$lang->block->createdRequirements = '創建的' . $lang->URCommon . '數';
$lang->block->createdStories = '創建的' . $lang->SRCommon . '數';
+3 -3
View File
@@ -4,7 +4,7 @@
<style>
.block-issues .c-id {width: 50px;}
.block-issues .c-pri {width: 50px;text-align: center;}
.block-issues .c-createdDate {width: 95px;}
.block-issues .c-deadline {width: 95px;}
.block-issues .c-severity {width: 80px;}
.block-issues .c-status {width: 80px;}
.block-issues.block-sm .c-status {text-align: center;}
@@ -18,7 +18,7 @@
<?php if($longBlock):?>
<th class='c-pri'><?php echo $lang->priAB?></th>
<th class='c-category'><?php echo $lang->issue->severity;?></th>
<th class='c-identifiedDate'><?php echo $lang->issue->createdDate;?></th>
<th class='c-identifiedDate'><?php echo $lang->issue->deadline;?></th>
<?php endif;?>
<th class='c-status'><?php echo $lang->issue->status;?></th>
</tr>
@@ -34,7 +34,7 @@
<?php if($longBlock):?>
<td class='c-pri'><?php echo zget($lang->issue->priList, $issue->pri)?></td>
<td class='c-severity'><?php echo zget($lang->issue->severityList, $issue->severity)?></td>
<td class='c-createdDate'><?php echo $issue->createdDate == '0000-00-00' ? '' : $issue->createdDate;?></td>
<td class='c-deadline'><?php echo $issue->deadline == '0000-00-00' ? '' : $issue->deadline;?></td>
<?php endif;?>
<?php $status = $this->processStatus('issue', $issue);?>
<td class='c-status' title='<?php echo $status;?>'>
@@ -21,7 +21,6 @@
#cards .project-detail > p {margin-bottom: 8px;}
#cards .project-detail .progress {height: 4px;}
#cards .project-detail .progress-text-left .progress-text {width: 50px; left: -50px;}
#cards .project-detail .col-xs-5 {top: 4px;}
#cards .panel-heading {cursor: pointer;}
#cards .project-stages-container {margin: 0 -16px -16px -16px; padding: 0 4px; height: 46px; overflow-x: auto; position: relative;}
#cards .project-stages:after {content: ' '; width: 30px; display: block; right: -16px; top: 16px; bottom: -6px; z-index: 1; background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 100%); position: absolute;}
@@ -72,7 +71,6 @@
<?php if($config->systemMode == 'new'):?>
<?php if($project->model === 'waterfall'): ?>
<div class='project-detail project-stages'>
<p class='text-muted'><?php echo $lang->project->ongoingStage;?></p>
<?php
$projectProjects = array();
foreach($project->executions as $project)
@@ -83,6 +81,7 @@
<?php if(empty($projectProjects)): ?>
<div class='label label-outline'><?php echo zget($lang->project->statusList, $project->status);?></div>
<?php else: ?>
<p class='text-muted'><?php echo $lang->project->ongoingStage;?></p>
<div class='project-stages-container scrollbar-hover'>
<div class='project-stages-row'>
<?php foreach ($projectProjects as $project): ?>
@@ -102,10 +101,12 @@
<div class='row'>
<div class='col-xs-5'><?php echo html::a($this->createLink('execution', 'task', "executionID={$project->id}"), $project->name);?></div>
<div class='col-xs-7'>
<div class='progress-pie' data-doughnut-size='90' data-color='#00da88' data-value="<?php echo $project->hours->progress;?>" data-width='24' data-height='24' data-back-color='#e8edf3'>
<div class='progress-info'><?php echo $project->hours->progress;?></div>
<div class="progress progress-text-left">
<div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="<?php echo $project->hours->progress;?>" aria-valuemin="0" aria-valuemax="100" style="width: <?php echo $project->hours->progress;?>%">
<span class="progress-text"><?php echo $project->hours->progress;?>%</span>
</div>
</div>
</div>
</div>
<?php endif; ?>
</div>
+3 -3
View File
@@ -4,7 +4,7 @@
<style>
.block-risks .c-id {width: 50px;}
.block-risks .c-pri {width: 50px;text-align: center;}
.block-risks .c-identifiedDate {width: 95px;}
.block-risks .c-plannedClosedDate {width: 100px;}
.block-risks .c-category {width: 80px;}
.block-risks .c-status {width: 80px;}
.block-risks.block-sm .c-status {text-align: center;}
@@ -21,7 +21,7 @@
<?php if($longBlock):?>
<th class='c-pri'><?php echo $lang->priAB?></th>
<th class='c-category'><?php echo $lang->risk->category;?></th>
<th class='c-identifiedDate'><?php echo $lang->risk->identifiedDate;?></th>
<th class='c-plannedClosedDate'><?php echo $lang->risk->plannedClosedDate;?></th>
<?php endif;?>
<th class='c-status'><?php echo $lang->risk->status;?></th>
</tr>
@@ -37,7 +37,7 @@
<?php if($longBlock):?>
<td class='c-pri'><?php echo "<span class='pri-{$risk->pri}'>" . zget($lang->risk->priList, $risk->pri) . "</span>";?></td>
<td class='c-category'><?php echo zget($lang->risk->categoryList, $risk->category)?></td>
<td class='c-identifiedDate'><?php echo $risk->identifiedDate == '0000-00-00' ? '' : $risk->identifiedDate;?></td>
<td class='c-plannedClosedDate'><?php echo $risk->plannedClosedDate == '0000-00-00' ? '' : $risk->plannedClosedDate;?></td>
<?php endif;?>
<?php $status = $this->processStatus('risk', $risk);?>
<td class='c-status' title='<?php echo $status;?>'>
@@ -112,7 +112,7 @@
scaleFontColor: '#838A9D',
tooltipXPadding: 10,
tooltipYPadding: 10,
multiTooltipTitleTemplate: '<%= label %> <?php echo $lang->project->workHour;?> /h',
multiTooltipTitleTemplate: '<%= label %> <?php echo $lang->execution->workHour;?> /h',
multiTooltipTemplate: '<%if (datasetLabel){%><%=datasetLabel%>: <%}%><%= value %>',
});
}
+2 -1
View File
@@ -688,7 +688,8 @@ class bug extends control
public function view($bugID, $from = 'bug')
{
/* Judge bug exits or not. */
$bug = $this->bug->getById($bugID, true);
$bugID = (int)$bugID;
$bug = $this->bug->getById($bugID, true);
if(!$bug) die(js::error($this->lang->notFound) . js::locate('back'));
if($bug->project) $this->session->project = $bug->project;
$this->view->products = $this->products = $this->product->getProductPairsByProject($this->session->project);
+2 -1
View File
@@ -183,7 +183,8 @@ class build extends control
*/
public function view($buildID, $type = 'story', $link = 'false', $param = '', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 100, $pageID = 1)
{
$build = $this->build->getByID((int)$buildID, true);
$buildID = (int)$buildID;
$build = $this->build->getByID($buildID, true);
if(!$build) die(js::error($this->lang->notFound) . js::locate('back'));
$this->session->project = $build->project;
+3 -32
View File
@@ -11,36 +11,6 @@
*/
class caselib extends control
{
/**
* All products.
*
* @var array
* @access public
*/
public $products = array();
/**
* Construct function.
*
* @param string $moduleName
* @param string $methodName
* @access public
* @return void
*/
public function __construct($moduleName = '', $methodName = '')
{
parent::__construct($moduleName, $methodName);
/* Set testtask menu group. */
$this->projectID = isset($_GET['PRJ']) ? $_GET['PRJ'] : 0;
if(!$this->projectID)
{
$this->app->loadConfig('qa');
foreach($this->config->qa->menuList as $module) $this->lang->navGroup->$module = 'qa';
}
}
/**
* Index page, header to browse.
*
@@ -213,7 +183,7 @@ class caselib extends control
$queryID = ($browseType == 'bysearch') ? (int)$param : 0;
/* Set lib menu. */
$this->caselib->setLibMenu($libraries, $libID, $moduleID);
$this->caselib->setLibMenu($libraries, $libID);
/* Load pager. */
$this->app->loadClass('pager', $static = true);
@@ -397,7 +367,8 @@ class caselib extends control
*/
public function view($libID)
{
$lib = $this->caselib->getById($libID, true);
$libID = (int)$libID;
$lib = $this->caselib->getById($libID, true);
if(!isset($lib->id)) die(js::error($this->lang->notFound) . js::locate('back'));
/* Set lib menu. */
+9 -82
View File
@@ -21,97 +21,24 @@ class caselibModel extends model
* @access public
* @return void
*/
public function setLibMenu($libraries, $libID, $moduleID = 0)
public function setLibMenu($libraries, $libID)
{
/* Set case lib menu. */
$this->loadModel('qa')->setMenu($this->loadModel('product')->getPairs(), $this->session->product);
$products =$this->loadModel('product')->getPairs();
if(!empty($products) and $this->session->product) $this->loadModel('qa')->setMenu($products, $this->session->product);
$currentLibName = zget($libraries, $libID, '');
$isMobile = $this->app->viewType == 'mhtml';
$selectHtml = '';
if(!empty($libraries))
if($libraries)
{
if($isMobile)
{
$selectHtml = "<a id='currentItem' href=\"javascript:showSearchMenu('caselib', '$libID', 'caselib', 'browse', '')\"><span class='text'>{$currentLibName}</span> <span class='icon-caret-down'></span></a><div id='currentItemDropMenu' class='hidden affix enter-from-bottom layer'></div>";
}
else
{
$dropMenuLink = helper::createLink('caselib', 'ajaxGetDropMenu', "objectID=$libID&module=caselib&method=browse");
$selectHtml = "<div class='btn-group angle-btn'><div class='btn-group'><button data-toggle='dropdown' type='button' class='btn btn-limit' id='currentItem'><span class='text'>{$currentLibName}</span> <span class='caret'></span></button><div id='dropMenu' class='dropdown-menu search-list' data-ride='searchList' data-url='$dropMenuLink'>";
$selectHtml .= '<div class="input-control search-box has-icon-left has-icon-right search-example"><input type="search" class="form-control search-input" /><label class="input-control-icon-left search-icon"><i class="icon icon-search"></i></label><a class="input-control-icon-right search-clear-btn"><i class="icon icon-close icon-sm"></i></a></div>';
$selectHtml .= "</div></div></div>";
}
}
$currentLibName = zget($libraries, $libID, '');
setCookie("lastCaseLib", $libID, $this->config->cookieLife, $this->config->webRoot, '', false, true);
setCookie("lastCaseLib", $libID, $this->config->cookieLife, $this->config->webRoot, '', false, true);
$pageNav = '';
$pageActions = '';
$isMobile = $this->app->viewType == 'mhtml';
if($isMobile)
{
$this->app->loadLang('qa');
$pageNav = html::a(helper::createLink('qa', 'index'), $this->lang->qa->index) . $this->lang->colon;
}
else
{
if($this->config->global->flow == 'full')
{
$this->app->loadLang('qa');
$pageNav .= '<div class="btn-group angle-btn"><div class="btn-group"><button data-toggle="dropdown" type="button" class="btn">' . $this->lang->qa->index . ' <span class="caret"></span></button>';
$pageNav .= '<ul class="dropdown-menu">';
if(common::hasPriv('caselib', 'create')) $pageNav .= '<li>' . html::a(helper::createLink('caselib', 'create'), '<i class="icon icon-plus"></i> ' . $this->lang->caselib->create) . '</li>';
$pageNav .= '</ul></div></div>';
}
else
{
$this->app->loadLang('testcase');
$pageActions .= "<div class='btn-group'>";
if(common::hasPriv('caselib', 'exportTemplet'))
{
$link = helper::createLink('caselib', 'exportTemplet', "libID=$libID");
$pageActions .= html::a($link, "<i class='icon icon-export muted'> </i>" . $this->lang->caselib->exportTemplet, '', "class='btn btn-link export'");
}
if(common::hasPriv('caselib', 'import'))
{
$link = helper::createLink('caselib', 'import', "libID=$libID");
$pageActions .= html::a($link, "<i class='icon muted icon-import'> </i>" . $this->lang->testcase->fileImport, '', "class='btn btn-link export'");
}
$pageActions .= '</div>';
$params = "libID=$libID&moduleID=" . (isset($moduleID) ? $moduleID : 0);
if(common::hasPriv('caselib', 'batchCreateCase'))
{
$link = helper::createLink('caselib', 'batchCreateCase', $params);
$pageActions .= html::a($link, "<i class='icon-plus'></i>" . $this->lang->testcase->batchCreate, '', "class='btn btn-secondary'");
}
if(common::hasPriv('caselib', 'createCase'))
{
$link = helper::createLink('caselib', 'createCase', $params);
$pageActions .= html::a($link, "<i class='icon-plus'></i>" . $this->lang->testcase->create, '', "class='btn btn-primary'");
}
if(common::hasPriv('caselib', 'create'))
{
$link = helper::createLink('caselib', 'create');
$pageActions .= html::a($link, "<i class='icon-plus'></i>" . $this->lang->caselib->create, '', "class='btn btn-primary'");
}
}
}
$pageNav .= $selectHtml;
$this->lang->modulePageNav = $pageNav;
$this->lang->TRActions = $pageActions;
if($this->config->global->flow != 'full' && $this->app->getMethodName() != 'view') $this->lang->caselib->menu->bysearch = "<a class='querybox-toggle' id='bysearchTab'><i class='icon icon-search muted'> </i>{$this->lang->testcase->bySearch}</a>";
if(!empty($libraries))
{
$dropMenuLink = helper::createLink('caselib', 'ajaxGetDropMenu', "objectID=$libID&module=caselib&method=browse");
$output = "<div class='btn-group header-btn' id='swapper'><button data-toggle='dropdown' type='button' class='btn' id='currentItem' title='{$currentLibName}'><span class='text'><i class='icon icon-product'></i> {$currentLibName}</span> <span class='caret' style='margin-top: 3px'></span></button><div id='dropMenu' class='dropdown-menu search-list' data-ride='searchList' data-url='$dropMenuLink'>";
$output = "<div class='btn-group header-btn' id='swapper'><button data-toggle='dropdown' type='button' class='btn' id='currentItem' title='{$currentLibName}'><span class='text'>{$currentLibName}</span> <span class='caret' style='margin-top: 3px'></span></button><div id='dropMenu' class='dropdown-menu search-list' data-ride='searchList' data-url='$dropMenuLink'>";
$output .= '<div class="input-control search-box has-icon-left has-icon-right search-example"><input type="search" class="form-control search-input" /><label class="input-control-icon-left search-icon"><i class="icon icon-search"></i></label><a class="input-control-icon-right search-clear-btn"><i class="icon icon-close icon-sm"></i></a></div>';
$output .= "</div></div>";
$this->lang->qa->switcherMenu = $output;
$this->lang->switcherMenu = $output;
}
}
+1 -1
View File
@@ -1,4 +1,4 @@
<div class='list-group'>
<div class='list-group' style='max-height: 248px; padding: 5px 10px; margin: 5px 0;'>
<?php
$currentLibID = $libID;
foreach($libraries as $libID => $libName)
+2 -2
View File
@@ -57,8 +57,8 @@ js::set('flow', $config->global->flow);
</div>
<div class='btn-toolbar pull-right'>
<div class='btn-group'>
<?php common::printLink('caselib', 'exportTemplet', "libID=$libID", "<i class='icon icon-export muted'> </i>" . $lang->caselib->exportTemplet, '', "class='btn btn-link export' data-width='35%'");?>
<?php common::printLink('caselib', 'import', "libID=$libID", "<i class='icon muted icon-import'> </i>" . $lang->testcase->fileImport, '', "class='btn btn-link export'");?>
<?php common::printLink('caselib', 'exportTemplet', "libID=$libID", "<i class='icon icon-export muted'> </i>" . $lang->caselib->exportTemplet, '', "class='btn btn-link export iframe' data-width='35%'");?>
<?php common::printLink('caselib', 'import', "libID=$libID", "<i class='icon muted icon-import'> </i>" . $lang->testcase->fileImport, '', "class='btn btn-link export iframe'");?>
</div>
<?php echo html::a($this->createLink('caselib', 'create'), "<i class='icon icon-plus'> </i>" . $lang->caselib->create, '', 'class="btn btn-secondary"');?>
<div class='btn-group dropdown'>
+2
View File
@@ -208,6 +208,8 @@ $lang->my->work = 'Work';
$lang->project->list = 'Project List';
$lang->execution->list = "{$lang->executionCommon} List";
$lang->doc->recent = 'Recent';
$lang->doc->my = 'My';
$lang->doc->favorite = 'Favorite';
+17 -28
View File
@@ -214,8 +214,8 @@ $lang->scrum->menu->settings['subMenu']->group = array('link' => "{$lang->
/* Execution menu. */
$lang->execution->homeMenu = new stdclass();
$lang->execution->homeMenu->index = "$lang->dashboard|execution|index|";
$lang->execution->homeMenu->list = array('link' => "{$lang->execution->common}|execution|all|", 'alias' => 'create,batchedit');
if($config->systemMode == 'new') $lang->execution->homeMenu->index = "$lang->dashboard|execution|index|";
$lang->execution->homeMenu->list = array('link' => "{$lang->executionCommon}|execution|all|", 'alias' => 'create,batchedit');
$lang->execution->menu = new stdclass();
$lang->execution->menu->task = array('link' => "{$lang->task->common}|execution|task|executionID=%s", 'subModule' => 'task,tree', 'alias' => 'importtask,importbug');
@@ -316,24 +316,24 @@ $lang->devops->menuOrder[25] = 'rules';
/* Doc menu.*/
$lang->doc->menu = new stdclass();
$lang->doc->menu->recent = array('link' => "{$lang->doc->recent}|doc|recent");
$lang->doc->menu->my = array('link' => "{$lang->doc->my}|doc|my");
$lang->doc->menu->favorite = array('link' => "{$lang->doc->favorite}|doc|favorite");
$lang->doc->menu->product = array('link' => "{$lang->doc->product}|doc|product");
$lang->doc->menu->project = array('link' => "{$lang->doc->project}|doc|project");
$lang->doc->menu->custom = array('link' => "{$lang->doc->custom}|doc|project");
$lang->doc->menu->wiki = array('link' => "{$lang->doc->wiki}|doc|project");
$lang->doc->menu->dashboard = array('link' => "{$lang->dashboard}|doc|index");
$lang->doc->menu->recent = array('link' => "{$lang->doc->recent}|doc|browse|libID=0&browseTyp=byediteddate", 'alias' => 'recent');
$lang->doc->menu->my = array('link' => "{$lang->doc->my}|doc|browse|libID=0&browseTyp=openedbyme", 'alias' => 'my');
$lang->doc->menu->collect = array('link' => "{$lang->doc->favorite}|doc|browse|libID=0&browseTyp=collectedbyme", 'alias' => 'collect');
$lang->doc->menu->product = array('link' => "{$lang->doc->product}|doc|objectLibs|type=product");
$lang->doc->menu->project = array('link' => "{$lang->doc->project}|doc|objectLibs|type=project");
$lang->doc->menu->custom = array('link' => "{$lang->doc->custom}|doc|objectLibs|libID=0");
$lang->doc->dividerMenu = ',product,';
/* Doc menu order. */
$lang->doc->menuOrder[5] = 'recent';
$lang->doc->menuOrder[10] = 'my';
$lang->doc->menuOrder[15] = 'favorite';
$lang->doc->menuOrder[20] = 'product';
$lang->doc->menuOrder[25] = 'project';
$lang->doc->menuOrder[30] = 'custom';
$lang->doc->menuOrder[35] = 'wiki';
$lang->doc->menuOrder[5] = 'dashboard';
$lang->doc->menuOrder[10] = 'recent';
$lang->doc->menuOrder[15] = 'my';
$lang->doc->menuOrder[20] = 'collect';
$lang->doc->menuOrder[25] = 'product';
$lang->doc->menuOrder[30] = 'project';
$lang->doc->menuOrder[35] = 'custom';
/* Report menu.*/
$lang->report->menu = new stdclass();
@@ -369,7 +369,7 @@ $lang->admin->menu = new stdclass();
$lang->admin->menu->index = array('link' => "$lang->indexPage|admin|index", 'alias' => 'register,certifytemail,certifyztmobile,ztcompany');
$lang->admin->menu->company = array('link' => "{$lang->personnel->common}|company|browse|", 'subModule' => ',user,dept,group,');
$lang->admin->menu->model = array('link' => "$lang->model|custom|browsestoryconcept|", 'subModule' => 'holiday');
$lang->admin->menu->custom = array('link' => "{$lang->custom->common}|custom|index", 'exclude' => 'custom-timezone');
$lang->admin->menu->custom = array('link' => "{$lang->custom->common}|custom|index", 'exclude' => 'custom-timezone,custom-estimate');
$lang->admin->menu->extension = array('link' => "{$lang->extension->common}|extension|browse", 'subModule' => 'extension');
$lang->admin->menu->dev = array('link' => "$lang->redev|dev|api", 'alias' => 'db', 'subModule' => 'dev,editor,entry');
$lang->admin->menu->message = array('link' => "{$lang->message->common}|message|index", 'subModule' => 'message,mail,webhook');
@@ -504,18 +504,7 @@ $lang->navGroup->svn = 'devops';
$lang->navGroup->git = 'devops';
$lang->navGroup->company = 'system';
$lang->navGroup->sqlbuilder = 'system';
$lang->navGroup->auditcl = 'system';
$lang->navGroup->cmcl = 'system';
$lang->navGroup->ldap = 'system';
$lang->navGroup->process = 'system';
$lang->navGroup->activity = 'system';
$lang->navGroup->zoutput = 'system';
$lang->navGroup->classify = 'system';
$lang->navGroup->subject = 'system';
$lang->navGroup->baseline = 'system';
$lang->navGroup->reviewcl = 'system';
$lang->navGroup->reviewsetting = 'system';
$lang->navGroup->attend = 'attend';
$lang->navGroup->leave = 'attend';
+2
View File
@@ -208,6 +208,8 @@ $lang->my->work = '待处理';
$lang->project->list = '项目列表';
$lang->execution->list = "{$lang->executionCommon}列表";
$lang->doc->recent = '最近文档';
$lang->doc->my = '我的文档';
$lang->doc->favorite = '我的收藏';
+17 -5
View File
@@ -519,6 +519,7 @@ class commonModel extends model
public static function printHomeButton($openApp)
{
global $lang;
global $config;
if(!$openApp) return;
$icon = zget($lang->navIcons, $openApp, '');
@@ -527,6 +528,7 @@ class commonModel extends model
{
$nav = $lang->mainNav->$openApp;
list($title, $currentModule, $currentMethod, $vars) = explode('|', $nav);
if($openApp == 'execution') $currentMethod = 'all';
}
else
{
@@ -535,7 +537,7 @@ class commonModel extends model
if($openApp == 'product') $currentMethod = 'all';
}
$link = $openApp != 'execution' ? helper::createLink($currentModule, $currentMethod) : '';
$link = ($openApp != 'execution' or ($config->systemMode == 'classic')) ? helper::createLink($currentModule, $currentMethod) : '';
$html = $link ? html::a($link, "$icon {$lang->$openApp->common}", '', "class='btn'") : "$icon {$lang->$openApp->common}";
echo "<div class='btn-group header-btn'>" . $html . '</div>';
@@ -2099,20 +2101,30 @@ EOD;
public static function canBeChanged($module, $object = null)
{
global $app, $config;
static $productsStatus = array();
static $executionsStatus = array();
/* Check the product is closed. */
if(!empty($object->product) and is_numeric($object->product) and empty($config->CRProduct))
{
$product = $app->control->loadModel('product')->getByID($object->product);
if($product->status == 'closed') return false;
if(!isset($productsStatus[$object->product]))
{
$product = $app->control->loadModel('product')->getByID($object->product);
$productsStatus[$object->product] = $product ? $product->status : '';
}
if($productsStatus[$object->product] == 'closed') return false;
}
/* Check the execution is closed. */
$productModuleList = array('story', 'bug', 'testtask');
if(!in_array($module, $productModuleList) and !empty($object->execution) and is_numeric($object->execution) and empty($config->CRExecution))
{
$execution = $app->control->loadModel('execution')->getByID($object->execution);
if($execution->status == 'closed') return false;
if(!isset($executionsStatus[$object->execution]))
{
$execution = $app->control->loadModel('execution')->getByID($object->execution);
$executionsStatus[$object->execution] = $execution ? $execution->status : '';
}
if($executionsStatus[$object->execution] == 'closed') return false;
}
return true;
+17 -7
View File
@@ -70,9 +70,8 @@ class doc extends control
* Browse docs.
*
* @param string|int $libID product|execution or the int id of custom library
* @param int $moduleID
* @param int $productID
* @param int $executionID
* @param string $browseType
* @param int $param
* @param string $orderBy
* @param string $from doc|project|product
* @param int $recTotal
@@ -160,6 +159,16 @@ class doc extends control
{
$libs = $this->doc->getAllLibsByType('collector');
$this->view->itemCounts = $this->doc->statLibCounts(array_keys($libs));
$this->app->rawMethod = 'collect';
}
elseif($browseType == 'openedbyme')
{
$this->app->rawMethod = 'my';
}
elseif($browseType == 'byediteddate')
{
$this->app->rawMethod = 'recent';
}
$attachLibs = array();
@@ -445,7 +454,8 @@ class doc extends control
public function view($docID, $version = 0)
{
/* Get doc. */
$doc = $this->doc->getById($docID, $version, true);
$docID = (int)$docID;
$doc = $this->doc->getById($docID, $version, true);
if(!$doc) die(js::error($this->lang->notFound) . js::locate('back'));
if($doc->contentType == 'markdown')
@@ -842,14 +852,14 @@ class doc extends control
}
/**
* Show libs for product or execution.
* Show libs for product or project.
*
* @param string $type
* @param int $objectID
* @param int $objectID projectID|productID
* @access public
* @return void
*/
public function objectLibs($type, $objectID)
public function objectLibs($type, $objectID = 0)
{
// setcookie('from', $from, $this->config->cookieLife, $this->config->webRoot, '', false, true);
$this->session->set('docList', $this->app->getURI(true), 'doc');
-1
View File
@@ -67,7 +67,6 @@
.side-col > .cell > header {position: absolute; top: 10px; right: 10px; left: 10px;}
.side-col > .cell > header > .c-sm {padding-right: 20px; width: 60px;}
.side-col .docsTree {position: absolute; top: 53px; left: 0; right: 0; bottom: 0; overflow: auto; padding: 0 10px 10px;}
.main-col .block-files > .panel-body {top: 45px; left: 0; right: 0; bottom: 0; overflow: auto;}
td.c-name a {color: #0c60e1;}
td.c-name a:visited {color: #082999;}
+2 -44
View File
@@ -20,50 +20,9 @@
<?php $spliter = (empty($this->app->user->feedback) && !$this->cookie->feedbackView && $this->from == 'doc') ? true : false;?>
<div class="main-row fade <?php if($spliter) echo 'split-row';?>" id="mainRow">
<?php if($this->from == 'doc') include './side.html.php';?>
<?php if($this->cookie->browseType == 'bygrid'):?>
<?php include dirname(__FILE__) . '/browsebygrid.html.php';?>
<?php else:?>
<div class="main-col" data-min-width="400">
<div class="cell<?php if($browseType == 'bysearch') echo ' show';?>" id="queryBox" data-module='doc'></div>
<div class="panel block-files block-sm no-margin">
<div class="panel-heading">
<div class="panel-title font-normal">
<?php if($browseType != 'bysearch'):?>
<i class="icon icon-folder-open-o text-muted"></i>
<?php else:?>
<i class="icon icon-search text-muted"></i>
<?php endif;?>
<?php echo $breadTitle;?>
</div>
<nav class="panel-actions btn-toolbar">
<div class="btn-group">
<?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 and common::canBeChanged('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'>
<li><?php common::printLink('tree', 'browse', "libID=$libID&viewType=doc&currentModuleID=0&branch=0&from=$from", "<i class='icon icon-cog'></i>" . $lang->doc->manageType);?></li>
<li><?php common::printLink('doc', 'editLib', "libID=$libID", "<i class='icon icon-edit'></i>" . $lang->doc->editlib, '', "class='iframe'");?></li>
<li><?php common::printLink('doc', 'deleteLib', "libID=$libID", "<i class='icon icon-trash'></i>" . $lang->doc->deleteLib, 'hiddenwin');?></li>
</ul>
</div>
<?php if(common::hasPriv('doc', 'create')):?>
<div class="dropdown" id='createDropdown'>
<button class='btn btn-primary' type='button' data-toggle='dropdown'><i class='icon icon-plus'></i> <?php echo $lang->doc->create;?> <span class='caret'></span></button>
<ul class='dropdown-menu'>
<?php foreach($lang->doc->typeList as $typeKey => $typeName):?>
<?php $class = strpos($config->doc->officeTypes, $typeKey) !== false ? 'iframe' : '';?>
<li><?php echo html::a($this->createLink('doc', 'create', "libID=$libID&moduleID=$moduleID&type=$typeKey&from={$lang->navGroup->doc}"), $typeName, '', "class='$class'");?></li>
<?php endforeach;?>
</ul>
</div>
<?php endif;?>
<?php endif;?>
</nav>
</div>
<?php if(empty($docs) and $browseType == 'bysearch'):?>
<div class="table-empty-tip">
<p><span class="text-muted"><?php echo $lang->doc->noSearchedDoc;?></span></p>
@@ -157,7 +116,7 @@
<?php $star = strpos($doc->collector, ',' . $this->app->user->account . ',') !== false ? 'icon-star text-yellow' : 'icon-star-empty';?>
<?php $collectTitle = strpos($doc->collector, ',' . $this->app->user->account . ',') !== false ? $lang->doc->cancelCollection : $lang->doc->collect;?>
<tr>
<td class="c-name"><?php echo html::a(inlink('view', "docID=$doc->id&version=0&from={$lang->navGroup->doc}"), "<i class='icon icon-file-text text-muted'></i> &nbsp;" . $doc->title, '', "title={$doc->title}");?></td>
<td class="c-name"><?php echo html::a($this->createLink('doc', 'view', "docID=$doc->id&version=0&from={$lang->navGroup->doc}", '', true), "<i class='icon icon-file-text text-muted'></i> &nbsp;" . $doc->title, '', "title={$doc->title} class='iframe' data-width='90%'");?></td>
<td class="c-num"><?php echo $doc->fileSize ? $doc->fileSize : '-';?></td>
<td class="c-user"><?php echo zget($users, $doc->addedBy);?></td>
<td class="c-datetime"><?php echo formatTime($doc->addedDate, 'y-m-d');?></td>
@@ -167,7 +126,7 @@
<?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&comment=false&from={$lang->navGroup->doc}", "<i class='icon icon-edit'></i>", '', "title='{$lang->edit}' class='btn btn-link'")?>
<?php common::printLink('doc', 'edit', "docID=$doc->id&comment=false&from={$lang->navGroup->doc}", "<i class='icon icon-edit'></i>", '', "title='{$lang->edit}' class='btn btn-link iframe'", true, true)?>
<?php common::printLink('doc', 'delete', "docID=$doc->id&confirm=no&from={$lang->navGroup->doc}", "<i class='icon icon-trash'></i>", 'hiddenwin', "title='{$lang->delete}' class='btn btn-link'")?>
<?php endif;?>
</td>
@@ -182,6 +141,5 @@
<?php endif;?>
</div>
</div>
<?php endif;?>
</div>
<?php include '../../common/view/footer.html.php';?>
-1
View File
@@ -13,7 +13,6 @@
<?php $pageCSS .= $this->doc->appendNavCSS();?>
<?php include '../../common/view/header.html.php';?>
<div class='main-row split-row fade' id='mainRow'>
<?php include './side.html.php';?>
<div class="main-col" data-min-width="400">
<div class="cell" id="queryBox" data-module='doc'></div>
<div class="row">
+3 -1
View File
@@ -1728,7 +1728,8 @@ class execution extends control
*/
public function view($executionID)
{
$execution = $this->execution->getById($executionID, true);
$executionID = (int)$executionID;
$execution = $this->execution->getById($executionID, true);
if(empty($execution) || strpos('stage,sprint', $execution->type) === false) die(js::error($this->lang->notFound) . js::locate('back'));
$this->app->loadLang('program');
@@ -2573,6 +2574,7 @@ class execution extends control
$projects = $this->loadModel('program')->getProjectList(0, 'all', 0, 'order_asc');
$executionGroups = $this->dao->select('*')->from(TABLE_EXECUTION)
->where('deleted')->eq(0)
->andWhere('type')->in('sprint,stage')
->beginIF(!$this->app->user->admin)->andWhere('id')->in($this->app->user->view->sprints)->fi()
->beginIF($this->config->systemMode == 'new')->andWhere('project')->in(array_keys($projects))->fi()
->orderBy('id_desc')
+1 -1
View File
@@ -39,7 +39,7 @@
<p>
<span class="text-muted"><?php echo $lang->testtask->noTesttask;?></span>
<?php if(common::canModify('execution', $execution) and common::hasPriv('testtask', 'create')):?>
<?php echo html::a($this->createLink('testtask', 'create', "product=0&execution=$executionID"), "<i class='icon icon-plus'></i> " . $lang->testtask->create, '', "class='btn btn-info' data-app='execution'");?>
<?php echo html::a($this->createLink('testtask', 'create', "product=0&executionID=$executionID&build=0&projectID=$execution->project"), "<i class='icon icon-plus'></i> " . $lang->testtask->create, '', "class='btn btn-info' data-app='execution'");?>
<?php endif;?>
</p>
</div>
+4 -3
View File
@@ -414,7 +414,7 @@ class my extends control
/**
* My test case.
*
* @param string $type assigntome|openedbyme
* @param string $type assigntome|openedbyme
* @param string $orderBy
* @param int $recTotal
* @param int $recPerPage
@@ -424,11 +424,12 @@ class my extends control
*/
public function testcase($type = 'assigntome', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
{
/* Save session, load lang. */
if($this->app->viewType != 'json') $this->session->set('caseList', $this->app->getURI(true), 'qa');
$this->loadModel('testcase');
$this->loadModel('testtask');
/* Save session. */
$this->session->set('caseList', $this->app->getURI(true), 'qa');
/* Load pager. */
$this->app->loadClass('pager', $static = true);
$pager = pager::init($recTotal, $recPerPage, $pageID);
+1 -1
View File
@@ -76,7 +76,7 @@ class personnel extends control
$this->view->title = $this->lang->personnel->invest;
$this->view->position[] = $this->lang->personnel->invest;
$this->view->invest = $this->personnel->getInvest($programID);
$this->view->investList = $this->personnel->getInvest($programID);
$this->display();
}
+2 -2
View File
@@ -15,7 +15,7 @@
.table.has-sort-head thead>tr>th {padding-right: 8px;}
</style>
<div id="mainContent" class="main-row fade">
<?php if(!empty($inputPersonnel)):?>
<?php if(!empty($investList)):?>
<div class="main-col">
<form class="main-table table-product" data-ride="table" method="post" action="">
<table class="table has-sort-head table-fixed table-bordered text-center">
@@ -56,7 +56,7 @@
</tr>
</thead>
<tbody class="sortable">
<?php foreach($invest as $personnel):?>
<?php foreach($investList as $personnel):?>
<tr>
<td title='<?php echo $personnel['realname'];?>'><?php echo $personnel['realname'];?></td>
<td title='<?php echo $personnel['role'];?>'><?php echo $personnel['role'];?></td>
+2 -1
View File
@@ -619,7 +619,8 @@ class product extends control
*/
public function view($productID)
{
$product = $this->product->getStatByID($productID);
$productID = (int)$productID;
$product = $this->product->getStatByID($productID);
if(!$product) die(js::error($this->lang->notFound) . js::locate('back'));
$product->desc = $this->loadModel('file')->setImgSize($product->desc);
+2 -1
View File
@@ -246,7 +246,8 @@ class productplan extends control
*/
public function view($planID = 0, $type = 'story', $orderBy = 'id_desc', $link = 'false', $param = '', $recTotal = 0, $recPerPage = 100, $pageID = 1)
{
$plan = $this->productplan->getByID($planID, true);
$planID = (int)$planID;
$plan = $this->productplan->getByID($planID, true);
if(!$plan) die(js::error($this->lang->notFound) . js::locate('back'));
$this->session->set('storyList', $this->app->getURI(true) . '&type=' . 'story', 'product');
+2 -1
View File
@@ -701,7 +701,8 @@ class program extends control
*/
public function view($programID)
{
$program = $this->program->getByID($programID);
$programID = (int)$programID;
$program = $this->program->getByID($programID);
if(!$program) die(js::error($this->lang->notFound) . js::locate('back'));
echo $this->fetch('program', 'product', "programID=$programID");
+2 -2
View File
@@ -79,8 +79,8 @@ $lang->program->subAcls['private'] = 'Private';
$lang->program->subAcls['open'] = 'Default';
$lang->program->subAcls['program'] = 'Open within the program';
$lang->program->authList['extend'] = 'Inherit(program privileges and company privileges)';
$lang->program->authList['reset'] = 'Reset(program privileges only)';
$lang->program->authList['extend'] = 'Inherit (program privileges and company privileges)';
$lang->program->authList['reset'] = 'Reset (program privileges only)';
$lang->program->statusList['wait'] = 'Waiting';
$lang->program->statusList['doing'] = 'Doing';
+2 -2
View File
@@ -79,8 +79,8 @@ $lang->program->subAcls['private'] = 'Private';
$lang->program->subAcls['open'] = 'Default';
$lang->program->subAcls['program'] = 'Open within the program';
$lang->program->authList['extend'] = 'Inherit(program privileges and company privileges)';
$lang->program->authList['reset'] = 'Reset(program privileges only)';
$lang->program->authList['extend'] = 'Inherit (program privileges and company privileges)';
$lang->program->authList['reset'] = 'Reset (program privileges only)';
$lang->program->statusList['wait'] = 'Waiting';
$lang->program->statusList['doing'] = 'Doing';
+2 -2
View File
@@ -79,8 +79,8 @@ $lang->program->subAcls['private'] = 'Private';
$lang->program->subAcls['open'] = 'Default';
$lang->program->subAcls['program'] = 'Open within the program';
$lang->program->authList['extend'] = 'Inherit(program privileges and company privileges)';
$lang->program->authList['reset'] = 'Reset(program privileges only)';
$lang->program->authList['extend'] = 'Inherit (program privileges and company privileges)';
$lang->program->authList['reset'] = 'Reset (program privileges only)';
$lang->program->statusList['wait'] = 'Waiting';
$lang->program->statusList['doing'] = 'Doing';
+2 -2
View File
@@ -79,8 +79,8 @@ $lang->program->subAcls['private'] = 'Private';
$lang->program->subAcls['open'] = 'Default';
$lang->program->subAcls['program'] = 'Open within the program';
$lang->program->authList['extend'] = 'Inherit(program privileges and company privileges)';
$lang->program->authList['reset'] = 'Reset(program privileges only)';
$lang->program->authList['extend'] = 'Inherit (program privileges and company privileges)';
$lang->program->authList['reset'] = 'Reset (program privileges only)';
$lang->program->statusList['wait'] = 'Waiting';
$lang->program->statusList['doing'] = 'Doing';
+2 -2
View File
@@ -81,8 +81,8 @@ $lang->program->subAcls['private'] = '私有';
$lang->program->subAcls['open'] = '全部公开';
$lang->program->subAcls['program'] = '项目集内公开';
$lang->program->authList['extend'] = '继承(取项目权限与组织权限的并集)';
$lang->program->authList['reset'] = '重新定义(只取项目权限)';
$lang->program->authList['extend'] = '继承 (取项目权限与组织权限的并集)';
$lang->program->authList['reset'] = '重新定义 (只取项目权限)';
$lang->program->statusList['wait'] = '未开始';
$lang->program->statusList['doing'] = '进行中';
+3 -1
View File
@@ -110,6 +110,7 @@ class project extends control
$programs = $this->dao->select('id, name')->from(TABLE_PROGRAM)->where('type')->eq('program')->andWhere('deleted')->eq(0)->orderBy('order_asc')->fetchPairs();
$projects = $this->dao->select('*')->from(TABLE_PROJECT)
->where('deleted')->eq(0)
->andWhere('type')->eq('project')
->beginIF(!$this->app->user->admin)->andWhere('id')->in($this->app->user->view->projects)->fi()
->orderBy('order_asc')
->fetchAll('id');
@@ -489,7 +490,8 @@ class project extends control
*/
public function view($projectID = 0)
{
$project = $this->project->getById($projectID);
$projectID = (int)$projectID;
$project = $this->project->getById($projectID);
if(empty($project) || strpos('scrum,waterfall', $project->model) === false) die(js::error($this->lang->notFound) . js::locate('back'));
$this->project->setMenu($projectID);
+2 -2
View File
@@ -82,9 +82,9 @@ function addNewProduct(obj)
* @access public
* @return void
*/
function setAclList(projectID)
function setAclList(programID)
{
if(projectID != 0)
if(programID != 0)
{
$('.aclBox').html($('#programAcl').html());
}
+1
View File
@@ -3,6 +3,7 @@ $(function()
$('#parent').change(function()
{
var programID = $(this).val();
setAclList(programID);
/* Determine whether the project can change the project set. */
link = createLink('project', 'ajaxCheckProduct', 'programID=' + programID + '&projectID=' + projectID);
+2 -2
View File
@@ -170,8 +170,8 @@ $lang->project->aclList['open'] = "公开 (有项目视图权限即可访问)
$lang->project->acls['private'] = '私有';
$lang->project->acls['open'] = '公开';
$lang->project->authList['extend'] = '继承(取系统权限与项目权限的合集)';
$lang->project->authList['reset'] = '重新定义(只取项目权限)';
$lang->project->authList['extend'] = '继承 (取系统权限与项目权限的合集)';
$lang->project->authList['reset'] = '重新定义 (只取项目权限)';
$lang->project->statusList['wait'] = '未开始';
$lang->project->statusList['doing'] = '进行中';
+1 -1
View File
@@ -200,6 +200,6 @@
<?php echo nl2br(html::radio('acl', $lang->project->aclList, $acl, "onclick='setWhite(this.value);'", 'block'));?>
</div>
<div id='programAcl' class='hidden'>
<?php echo nl2br(html::radio('acl', $lang->program->aclList, $acl, "onclick='setWhite(this.value);'", 'block'));?>
<?php echo nl2br(html::radio('acl', $lang->program->subAclList, $acl, "onclick='setWhite(this.value);'", 'block'));?>
</div>
<?php include '../../common/view/footer.html.php';?>
+1 -1
View File
@@ -173,7 +173,7 @@
<?php echo nl2br(html::radio('acl', $lang->project->aclList, $project->acl == 'project' ? 'private' : 'open', "onclick='setWhite(this.value);'", 'block'));?>
</div>
<div id='programAcl' class='hidden'>
<?php echo nl2br(html::radio('acl', $lang->project->aclList, $project->acl, "onclick='setWhite(this.value);'", 'block'));?>
<?php echo nl2br(html::radio('acl', $lang->program->subAclList, $project->acl, "onclick='setWhite(this.value);'", 'block'));?>
</div>
<div class="modal fade" id="promptBox">
<div class="modal-dialog mw-600px">
+2 -1
View File
@@ -146,7 +146,8 @@ class release extends control
*/
public function view($releaseID, $type = 'story', $link = 'false', $param = '', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 100, $pageID = 1)
{
$release = $this->release->getByID((int)$releaseID, true);
$releaseID = (int)$releaseID;
$release = $this->release->getByID($releaseID, true);
if(!$release) die(js::error($this->lang->notFound) . js::locate('back'));
if($type == 'story') $this->session->set('storyList', $this->app->getURI(true), 'product');
+1 -7
View File
@@ -82,7 +82,6 @@ class repo extends control
$repoID = $this->repo->saveState(0, $objectID);
$this->commonAction($repoID, $objectID);
$this->repo->setMenu($this->repos, $repoID, false);
$repoList = $this->repo->getList(0, $orderBy);
@@ -128,7 +127,6 @@ class repo extends control
$this->commonAction($repoID, $objectID);
$this->app->loadLang('action');
$this->repo->setMenu($this->repos, $repoID, false);
$this->view->title = $this->lang->repo->common . $this->lang->colon . $this->lang->repo->create;
$this->view->position[] = $this->lang->repo->create;
@@ -332,14 +330,12 @@ class repo extends control
{
$repoID = $this->repo->saveState($repoID, $objectID);
$this->commonAction($repoID, $objectID);
/* Get path and refresh. */
if($this->get->repoPath) $path = $this->get->repoPath;
if(empty($refresh) and $this->cookie->repoRefresh) $refresh = $this->cookie->repoRefresh;
/* Set menu and session. */
$this->repo->setMenu($this->repos, $repoID);
$this->commonAction($repoID, $objectID);
$this->repo->setBackSession('list', $withOtherModule = true);
session_start();
@@ -830,8 +826,6 @@ class repo extends control
{
$this->commonAction($repoID, $objectID);
$this->repo->setMenu($this->repos, $repoID);
if($repoID == 0) $repoID = $this->session->repoID;
if($branch) $branch = base64_decode($branch);
+2 -1
View File
@@ -646,7 +646,8 @@ class task extends control
*/
public function view($taskID)
{
$task = $this->task->getById($taskID, true);
$taskID = (int)$taskID;
$task = $this->task->getById($taskID, true);
if(!$task) die(js::error($this->lang->notFound) . js::locate('back'));
$this->session->project = $task->project;
+5 -6
View File
@@ -588,7 +588,8 @@ class testcase extends control
*/
public function view($caseID, $version = 0, $from = 'testcase', $taskID = 0)
{
$case = $this->testcase->getById($caseID, $version);
$caseID = (int)$caseID;
$case = $this->testcase->getById($caseID, $version);
if(!$case) die(js::error($this->lang->notFound) . js::locate('back'));
if($case->auto == 'unit')
{
@@ -814,6 +815,7 @@ class testcase extends control
$branchProduct = false;
if($this->app->openApp == 'project') $this->loadModel('project')->setMenu($this->session->project);
/* The cases of a product. */
if($productID)
{
@@ -824,8 +826,6 @@ class testcase extends control
{
$libID = $productID;
$libraries = $this->loadModel('caselib')->getLibraries();
$this->caselib->setLibMenu($libraries, $libID);
$this->lang->testcase->menu = $this->lang->caselib->menu;
/* Set modules. */
$modules = $this->tree->getOptionMenu($libID, $viewType = 'caselib', $startModuleID = 0, $branch);
@@ -838,7 +838,7 @@ class testcase extends control
else
{
$product = $this->product->getByID($productID);
$this->app->openApp == 'project' ? $this->loadModel('project')->setMenu($this->session->project) : $this->testcase->setMenu($this->products, $productID, $branch);
$this->testcase->setMenu($this->products, $productID, $branch);
if($product->type != 'normal') $branchProduct = true;
@@ -893,8 +893,7 @@ class testcase extends control
$showSuhosinInfo = common::judgeSuhosinSetting($countInputVars);
if($showSuhosinInfo) $this->view->suhosinInfo = extension_loaded('suhosin') ? sprintf($this->lang->suhosinInfo, $countInputVars) : sprintf($this->lang->maxVarsInfo, $countInputVars);
$this->loadModel('story');
$stories = $this->story->getProductStoryPairs($productID, $branch);
$stories = $this->loadModel('story')->getProductStoryPairs($productID, $branch);
$this->view->stories = array('' => '', 'ditto' => $this->lang->testcase->ditto) + $stories;
/* Set custom. */
+2 -1
View File
@@ -448,7 +448,8 @@ class testreport extends control
*/
public function view($reportID, $tab = 'basic', $recTotal = 0, $recPerPage = 100, $pageID = 1)
{
$report = $this->testreport->getById($reportID);
$reportID = (int)$reportID;
$report = $this->testreport->getById($reportID);
if(!$report) die(js::error($this->lang->notFound) . js::locate('back'));
$this->session->project = $report->project;
+2 -1
View File
@@ -263,7 +263,8 @@ class testtask extends control
public function view($taskID)
{
/* Get test task, and set menu. */
$task = $this->testtask->getById($taskID, true);
$taskID = (int)$taskID;
$task = $this->testtask->getById($taskID, true);
if(!$task) die(js::error($this->lang->notFound) . js::locate('back'));
/* When the session changes, you need to query the related products again. */
+2 -2
View File
@@ -4232,8 +4232,8 @@ class upgradeModel extends model
public function processMergedData($programID, $projectID, $lineID, $productIdList = array(), $sprintIdList = array())
{
/* Product linked objects. */
$this->dao->update(TABLE_STORY)->set('project')->eq($programID)->where('product')->in($productIdList)->exec();
$this->dao->update(TABLE_RELEASE)->set('project')->eq($programID)->where('product')->in($productIdList)->exec();
$this->dao->update(TABLE_STORY)->set('project')->eq($projectID)->where('product')->in($productIdList)->exec();
$this->dao->update(TABLE_RELEASE)->set('project')->eq($projectID)->where('product')->in($productIdList)->exec();
/* Compute product acl. */
$products = $this->dao->select('id,program,acl')->from(TABLE_PRODUCT)->where('id')->in($productIdList)->fetchAll();
+1 -1
View File
@@ -43,7 +43,7 @@
<tbody>
<?php foreach($noMergedSprints as $sprintID => $sprint):?>
<tr>
<td><?php echo "{$lang->upgrade->project} #{$sprint->id} {$sprint->name}" . html::hidden("sprints[]", $sprint->id);?></td>
<td><?php echo "{$sprint->name}" . html::hidden("sprints[]", $sprint->id);?></td>
<td class='divider'><i class='icon icon-angle-double-right'></i></td>
<td><?php echo html::select("projects[]", $sprint->projects, '', "class='form-control chosen'");?></td>
</tr>
+4 -1
View File
@@ -39,6 +39,7 @@ class user extends control
*/
public function view($userID)
{
$userID = (int)$userID;
$this->locate($this->createLink('user', 'todo', "userID=$userID&type=all"));
}
@@ -57,7 +58,8 @@ class user extends control
*/
public function todo($userID, $type = 'today', $status = 'all', $orderBy = 'date,status,begin', $recTotal = 0, $recPerPage = 20, $pageID = 1)
{
$user = $this->user->getById($userID, 'id');
$userID = (int)$userID;
$user = $this->user->getById($userID, 'id');
if(empty($user)) die(js::error($this->lang->notFound) . js::locate('back'));
/* Set thie url to session. */
@@ -78,6 +80,7 @@ class user extends control
$todos = $this->todo->getList($type, $account, $status, 0, $pager, $sort);
$date = (int)$type == 0 ? helper::today() : $type;
$users = $this->loadModel('dept')->getDeptUserPairs($this->app->user->dept, 'useid');
if(!isset($users[$userID])) die(js::error($this->lang->notFound) . js::locate('back'));
/* set menus. */
$this->view->userList = $this->user->setUserList($users, $userID);
+1 -1
View File
@@ -10,7 +10,7 @@
$label = "<span class='text'>{$lang->user->schedule}</span>";
$active = $methodName == 'todo' ? ' btn-active-text' : '';
common::printLink('user', 'todo', "userID={$user->id}", $label, '', "class='btn btn-link $active'");
common::printLink('user', 'todo', "userID={$user->id}&type=all", $label, '', "class='btn btn-link $active'");
$label = "<span class='text'>{$lang->user->task}</span>";
$active = $methodName == 'task' ? ' btn-active-text' : '';