Merge branch 'master' of https://github.com/easysoft/zentaopms
This commit is contained in:
+6
-4
@@ -97,9 +97,11 @@ $filter->bug->default->cookie['preProductID'] = 'int';
|
||||
$filter->bug->create->cookie['preBranch'] = 'int';
|
||||
$filter->bug->export->cookie['checkedItem'] = 'reg::checked';
|
||||
|
||||
$filter->doc->browse->cookie['browseType'] = 'reg::browseType';
|
||||
$filter->doc->default->cookie['from'] = 'code';
|
||||
$filter->doc->default->cookie['product'] = 'int';
|
||||
$filter->doc->browse->cookie['browseType'] = 'reg::browseType';
|
||||
$filter->doc->alllibs->cookie['browseType'] = 'reg::browseType';
|
||||
$filter->doc->objectlibs->cookie['browseType'] = 'reg::browseType';
|
||||
$filter->doc->default->cookie['from'] = 'code';
|
||||
$filter->doc->default->cookie['product'] = 'int';
|
||||
$filter->doc->showfiles->cookie['docFilesViewType'] = 'code';
|
||||
|
||||
$filter->file->download->cookie[$config->sessionVar] = 'code';
|
||||
@@ -153,7 +155,7 @@ $filter->testsuite->library->cookie['libCaseModule'] = 'int';
|
||||
$filter->testsuite->library->cookie['preCaseLibID'] = 'int';
|
||||
|
||||
$filter->testtask->browse->cookie['preBranch'] = 'int';
|
||||
$filter->testtask->cases->cookie['preProductID'] = 'int';
|
||||
$filter->testtask->cases->cookie['preTaskID'] = 'int';
|
||||
$filter->testtask->cases->cookie['taskCaseModule'] = 'int';
|
||||
$filter->testtask->default->cookie['lastProduct'] = 'int';
|
||||
$filter->testtask->default->cookie['preProductID'] = 'int';
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
ALTER TABLE `zt_storyspec` CHANGE `title` `title` varchar(255) NOT NULL;
|
||||
update `zt_todo` set assignedTo = 'closed', assignedDate = closedDate where status = 'closed';
|
||||
|
||||
@@ -254,7 +254,7 @@ class bug extends control
|
||||
$this->view->users = $this->user->getPairs('devfirst|noclosed|nodeleted');
|
||||
$this->app->loadLang('release');
|
||||
|
||||
if(!empty($_POST) and !isset($_POST['stepIDList']))
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$response['result'] = 'success';
|
||||
$response['message'] = '';
|
||||
@@ -332,8 +332,8 @@ class bug extends control
|
||||
$extras = str_replace(array(',', ' '), array('&', ''), $extras);
|
||||
parse_str($extras);
|
||||
|
||||
if($runID and $resultID) extract($this->bug->getBugInfoFromResult($resultID));// If set runID and resultID, get the result info by resultID as template.
|
||||
if(!$runID and $caseID) extract($this->bug->getBugInfoFromResult($resultID, $caseID, $version));// If not set runID but set caseID, get the result info by resultID and case info.
|
||||
if($runID and $resultID) extract($this->bug->getBugInfoFromResult($resultID, 0, 0, isset($stepIdList) ? $stepIdList : ''));// If set runID and resultID, get the result info by resultID as template.
|
||||
if(!$runID and $caseID) extract($this->bug->getBugInfoFromResult($resultID, $caseID, $version, isset($stepIdList) ? $stepIdList : ''));// If not set runID but set caseID, get the result info by resultID and case info.
|
||||
|
||||
/* If bugID setted, use this bug as template. */
|
||||
if(isset($bugID))
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
.content .stepTitle{display:block; color: green; margin:0px;}
|
||||
.table-fixed td{white-space: unset}
|
||||
.table-data tr > td{word-break: break-all; word-wrap: break-word;}
|
||||
|
||||
+17
-8
@@ -1610,11 +1610,11 @@ class bugModel extends model
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getBugInfoFromResult($resultID, $caseID = 0, $version = 0)
|
||||
public function getBugInfoFromResult($resultID, $caseID = 0, $version = 0, $stepIdList = '')
|
||||
{
|
||||
$title = '';
|
||||
$bugSteps = '';
|
||||
$steps = zget($_POST, 'stepIDList', array());
|
||||
$steps = explode('_', trim($stepIdList, '_'));
|
||||
|
||||
$result = $this->dao->findById($resultID)->from(TABLE_TESTRESULT)->fetch();
|
||||
if($caseID > 0)
|
||||
@@ -1635,38 +1635,47 @@ class bugModel extends model
|
||||
$bugSteps = "<p>[" . $this->lang->testcase->precondition . "]</p>" . "\n" . $run->case->precondition;
|
||||
}
|
||||
|
||||
$bugSteps .= $this->lang->bug->tplStep;
|
||||
if(!empty($stepResults))
|
||||
{
|
||||
$i = 1;
|
||||
$bugStep = '';
|
||||
foreach($steps as $stepId)
|
||||
{
|
||||
if(!isset($caseSteps[$stepId])) continue;
|
||||
|
||||
$step = $caseSteps[$stepId];
|
||||
$bugSteps .= $i . '. ' . $step->desc . "<br />";
|
||||
$bugStep .= $i . '. ' . $step->desc . "<br />";
|
||||
$i++;
|
||||
}
|
||||
$bugSteps .= $bugStep ? str_replace('<br/>', '', $this->lang->bug->tplStep) . $bugStep : $this->lang->bug->tplStep;
|
||||
|
||||
$bugSteps .= $this->lang->bug->tplResult;
|
||||
$i = 1;
|
||||
$bugResult = '';
|
||||
foreach($steps as $stepId)
|
||||
{
|
||||
if(!isset($stepResults[$stepId]) or empty($stepResults[$stepId]['real'])) continue;
|
||||
$bugSteps .= $i . '. ' . $stepResults[$stepId]['real'] . "<br />";
|
||||
$bugResult .= $i . '. ' . $stepResults[$stepId]['real'] . "<br />";
|
||||
$i++;
|
||||
}
|
||||
$bugSteps .= $bugResult ? str_replace('<br/>', '', $this->lang->bug->tplResult) . $bugResult : $this->lang->bug->tplResult;
|
||||
|
||||
$bugSteps .= $this->lang->bug->tplExpect;
|
||||
$i = 1;
|
||||
$bugExpect = '';
|
||||
foreach($steps as $stepId)
|
||||
{
|
||||
if(!isset($caseSteps[$stepId])) continue;
|
||||
|
||||
$step = $caseSteps[$stepId];
|
||||
if($step->expect) $bugSteps .= $i . '. ' . $step->expect . "<br />";
|
||||
if($step->expect) $bugExpect .= $i . '. ' . $step->expect . "<br />";
|
||||
$i++;
|
||||
}
|
||||
$bugSteps .= $bugExpect ? str_replace('<br/>', '', $this->lang->bug->tplExpect) . $bugExpect : $this->lang->bug->tplExpect;
|
||||
}
|
||||
else
|
||||
{
|
||||
$bugSteps .= $this->lang->bug->tplStep;
|
||||
$bugSteps .= $this->lang->bug->tplResult;
|
||||
$bugSteps .= $this->lang->bug->tplExpect;
|
||||
}
|
||||
|
||||
return array('title' => $title, 'steps' => $bugSteps, 'storyID' => $run->case->story, 'moduleID' => $run->case->module, 'version' => $run->case->version);
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
<?php if($extView = $this->getExtViewFile(__FILE__)){include $extView; return helper::cd();}?>
|
||||
<style>
|
||||
.histories-list > li{word-break: break-all; word-wrap: break-word;}
|
||||
</style>
|
||||
<?php if(!empty($blockHistory)):?>
|
||||
<div class="panel block-histories histories" data-textDiff="<?php echo $lang->action->textDiff;?>" data-original="<?php echo $lang->action->original;?>">
|
||||
<?php else:?>
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
$lang->company->common = 'Company';
|
||||
$lang->company->index = "Home";
|
||||
$lang->company->edit = "Edit Company";
|
||||
$lang->company->view = "Company Info";
|
||||
$lang->company->view = "Company Information";
|
||||
$lang->company->browse = "User List";
|
||||
$lang->company->dynamic = "Dynamic";
|
||||
$lang->company->orgView = 'View';
|
||||
@@ -24,7 +24,7 @@ $lang->company->address = 'Mailing Address';
|
||||
$lang->company->zipcode = 'Zip Code';
|
||||
$lang->company->website = 'Website';
|
||||
$lang->company->backyard = 'Intranet';
|
||||
$lang->company->guest = 'Anonymous Login';
|
||||
$lang->company->guest = 'Guest Login';
|
||||
$lang->company->admins = 'Administrators';
|
||||
|
||||
$lang->company->product = $lang->productCommon;
|
||||
|
||||
@@ -619,7 +619,11 @@ class doc extends control
|
||||
|
||||
$libs = $this->doc->getAllLibsByType($type, $pager, $product);
|
||||
$subLibs = array();
|
||||
if($type == 'product' or $type == 'project') $subLibs = $this->doc->getSubLibGroups($type, array_keys($libs));
|
||||
if($type == 'product' or $type == 'project')
|
||||
{
|
||||
$subLibs = $this->doc->getSubLibGroups($type, array_keys($libs));
|
||||
if($this->cookie->browseType == 'bylist') $this->view->users = $this->loadModel('user')->getPairs('noletter');
|
||||
}
|
||||
if($type == 'custom') $this->view->itemCounts = $this->doc->statLibCounts(array_keys($libs));
|
||||
|
||||
$this->view->type = $type;
|
||||
@@ -739,7 +743,7 @@ class doc extends control
|
||||
public function objectLibs($type, $objectID, $from = 'doc')
|
||||
{
|
||||
$this->from = $from;
|
||||
setcookie('from', $from, $this->config->cookieLife, $this->config->webRoot);
|
||||
setcookie('from', $from, $this->config->cookieLife, $this->config->webRoot);
|
||||
|
||||
$table = $type == 'product' ? TABLE_PRODUCT : TABLE_PROJECT;
|
||||
$object = $this->dao->select('id,name')->from($table)->where('id')->eq($objectID)->fetch();
|
||||
|
||||
@@ -26,9 +26,6 @@
|
||||
.col-md-size .table .c-datetime {display: none;}
|
||||
|
||||
.table-files .btn {padding:0 6px;}
|
||||
.table-files .c-actions .btn > .icon {opacity: 0;}
|
||||
.table-files .c-actions .btn > .icon.text-yellow,
|
||||
.table-files tr:hover .c-actions .btn > .icon {opacity: 1;}
|
||||
|
||||
#docsTree li > a > .icon {opacity: .65;}
|
||||
|
||||
|
||||
@@ -17,12 +17,6 @@ function browseBySearch()
|
||||
$('#queryBox').addClass('show');
|
||||
}
|
||||
|
||||
function setBrowseType(type)
|
||||
{
|
||||
$.cookie('browseType', type, {expires:config.cookieLife, path:config.webRoot});
|
||||
location.href = location.href;
|
||||
}
|
||||
|
||||
$(function(){
|
||||
$('#' + browseType + 'Tab').addClass('active');
|
||||
if(browseType == "bysearch")
|
||||
|
||||
@@ -16,6 +16,12 @@ function toggleAcl(acl)
|
||||
}
|
||||
}
|
||||
|
||||
function setBrowseType(type)
|
||||
{
|
||||
$.cookie('browseType', type, {expires:config.cookieLife, path:config.webRoot});
|
||||
location.href = location.href;
|
||||
}
|
||||
|
||||
$(document).ready(function()
|
||||
{
|
||||
$('.libs-group.sort').sortable(
|
||||
|
||||
@@ -44,6 +44,7 @@ $lang->doc->acl = 'Right';
|
||||
$lang->doc->groups = 'Groups';
|
||||
$lang->doc->users = 'Users';
|
||||
$lang->doc->item = ' Item';
|
||||
$lang->doc->num = 'Docs';
|
||||
$lang->doc->searchResult = 'Search Result';
|
||||
|
||||
$lang->doc->moduleDoc = 'By Module';
|
||||
|
||||
@@ -44,6 +44,7 @@ $lang->doc->acl = '权限';
|
||||
$lang->doc->groups = '分组';
|
||||
$lang->doc->users = '用户';
|
||||
$lang->doc->item = '项';
|
||||
$lang->doc->num = '文档数量';
|
||||
$lang->doc->searchResult = '搜索结果';
|
||||
|
||||
$lang->doc->moduleDoc = '按模块浏览';
|
||||
|
||||
@@ -562,12 +562,12 @@ class docModel extends model
|
||||
->add('version', 1)
|
||||
->setDefault('product,project,module', 0)
|
||||
->stripTags($this->config->doc->editor->create['id'], $this->config->allowedTags)
|
||||
->stripTags($this->config->doc->markdown->create['id'], $this->config->allowedTags)
|
||||
->cleanInt('product,project,module')
|
||||
->join('groups', ',')
|
||||
->join('users', ',')
|
||||
->remove('files,labels,uid')
|
||||
->get();
|
||||
$doc->contentMarkdown = strip_tags($this->post->contentMarkdown, $this->config->allowedTags);
|
||||
if($doc->acl == 'private') $doc->users = $this->app->user->account;
|
||||
$condition = "lib = '$doc->lib' AND module = $doc->module";
|
||||
|
||||
@@ -638,6 +638,7 @@ class docModel extends model
|
||||
->join('users', ',')
|
||||
->remove('comment,files,labels,uid')
|
||||
->get();
|
||||
if($doc->contentType == 'markdown') $doc->content = strip_tags($this->post->content, $this->config->allowedTags);
|
||||
if($doc->acl == 'private') $doc->users = $oldDoc->addedBy;
|
||||
|
||||
$oldDocContent = $this->dao->select('*')->from(TABLE_DOCCONTENT)->where('doc')->eq($docID)->andWhere('version')->eq($oldDoc->version)->fetch();
|
||||
|
||||
@@ -11,11 +11,14 @@
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php $spliter = (empty($this->app->user->feedback) && !$this->cookie->feedbackView && $this->from == 'doc') ? true : false;?>
|
||||
<?php $spliter = (empty($this->app->user->feedback) && !$this->cookie->feedbackView) ? true : false;?>
|
||||
<div class="main-row <?php if($spliter) echo 'split-row';?>" id="mainRow">
|
||||
<?php if($spliter):?>
|
||||
<?php include './side.html.php';?>
|
||||
<?php endif;?>
|
||||
<?php if($this->cookie->browseType == 'bylist'):?>
|
||||
<?php include dirname(__FILE__) . '/alllibsbylist.html.php';?>
|
||||
<?php else:?>
|
||||
<div class="main-col" data-min-width="400">
|
||||
<div class="panel block-files block-sm no-margin">
|
||||
<div class="panel-heading">
|
||||
@@ -25,6 +28,12 @@
|
||||
<?php if($type == 'project') $panelTitle = $lang->projectCommon;?>
|
||||
<i class="icon icon-folder-open-o text-muted"></i> <?php echo $panelTitle;?>
|
||||
</div>
|
||||
<nav class="panel-actions btn-toolbar">
|
||||
<div class="btn-group">
|
||||
<?php echo html::a('javascript:setBrowseType("bylist")', "<i class='icon icon-bars'></i>", '', "title='{$lang->doc->browseTypeList['list']}' class='btn btn-icon'");?>
|
||||
<?php echo html::a('javascript:setBrowseType("bygrid")', "<i class='icon icon-cards-view'></i>", '', "title='{$lang->doc->browseTypeList['grid']}' class='btn btn-icon text-primary'");?>
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="row row-grid files-grid" data-size="300">
|
||||
@@ -36,7 +45,7 @@
|
||||
<div class="col">
|
||||
<a class="file" href="<?php echo $link;?>">
|
||||
<i class="file-icon icon <?php echo $icon;?>"></i>
|
||||
<div class="file-name"><?php echo $lib->name;?></div>
|
||||
<div class="file-name"><?php echo ($type == 'custom' && strpos($lib->collector, $this->app->user->account) !== false ? "<i class='icon icon-star text-yellow'></i> " : '') . $lib->name;?></div>
|
||||
<?php if($type == 'custom'):?>
|
||||
<div class="text-primary file-info"><?php echo $itemCounts[$lib->id] . $lang->doc->item;?></div>
|
||||
<?php else:?>
|
||||
@@ -45,7 +54,9 @@
|
||||
</a>
|
||||
<?php if($type == 'custom'):?>
|
||||
<div class="actions">
|
||||
<?php common::printLink('doc', 'collect', "objectID=$lib->id&objectType=lib", "<i class='icon icon-star-empty'></i>", 'hiddenwin', "title='{$lang->doc->collect}' class='btn btn-link'")?>
|
||||
<?php $star = strpos($lib->collector, ',' . $this->app->user->account . ',') !== false ? 'icon-star text-yellow' : 'icon-star-empty';?>
|
||||
<?php $collectTitle = strpos($lib->collector, ',' . $this->app->user->account . ',') !== false ? $lang->doc->cancelCollection : $lang->doc->collect;?>
|
||||
<a data-url="<?php echo $this->createLink('doc', 'collect', "objectID=$lib->id&objectType=doclib");?>" title="<?php echo $collectTitle;?>" class='btn btn-link ajaxCollect'><i class='icon <?php echo $star;?>'></i></a>
|
||||
<?php common::printLink('doc', 'editLib', "libID=$lib->id", "<i class='icon icon-edit'></i>", '', "title='{$lang->edit}' class='btn btn-link iframe'")?>
|
||||
<?php common::printLink('doc', 'deleteLib', "libID=$lib->id", "<i class='icon icon-trash'></i>", 'hiddenwin', "title='{$lang->delete}' class='btn btn-link'")?>
|
||||
<?php common::printLink('tree', 'browse', "rootID=$lib->id&type=doc", "<i class='icon icon-cog'></i>", '', "title='{$lang->tree->manage}' class='btn btn-link'")?>
|
||||
@@ -58,5 +69,6 @@
|
||||
<div class='table-footer'><?php $pager->show('right', 'pagerjs');?></div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
<div class="main-col" data-min-width="400">
|
||||
<div class="panel block-files block-sm no-margin">
|
||||
<div class="panel-heading">
|
||||
<div class="panel-title font-normal">
|
||||
<?php $panelTitle = '';?>
|
||||
<?php if($type == 'custom') $panelTitle = $lang->doc->custom;?>
|
||||
<?php if($type == 'product') $panelTitle = $lang->productCommon;?>
|
||||
<?php if($type == 'project') $panelTitle = $lang->projectCommon;?>
|
||||
<i class="icon icon-folder-open-o text-muted"></i> <?php echo $panelTitle;?>
|
||||
</div>
|
||||
<nav class="panel-actions btn-toolbar">
|
||||
<div class="btn-group">
|
||||
<?php echo html::a('javascript:setBrowseType("bylist")', "<i class='icon icon-bars'></i>", '', "title='{$lang->doc->browseTypeList['list']}' class='btn btn-icon text-primary'");?>
|
||||
<?php echo html::a('javascript:setBrowseType("bygrid")', "<i class='icon icon-cards-view'></i>", '', "title='{$lang->doc->browseTypeList['grid']}' class='btn btn-icon'");?>
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
<div class="panel-body has-table">
|
||||
<table class="table table-borderless table-hover table-files">
|
||||
<thead>
|
||||
<tr>
|
||||
<?php $name = '';?>
|
||||
<?php if($type == 'product') $name = $lang->product->name;?>
|
||||
<?php if($type == 'project') $name = $lang->project->name;?>
|
||||
<?php if($type == 'custom') $name = $lang->doc->libName;?>
|
||||
<th class="c-name"><?php echo $name;?></th>
|
||||
<th class="c-num"><?php echo $lang->doc->num;?></th>
|
||||
<?php if($type != 'custom'):?>
|
||||
<th class="c-user"><?php echo $lang->doc->addedBy;?></th>
|
||||
<th class="c-datetime"><?php echo $lang->doc->addedDate;?></th>
|
||||
<?php else:?>
|
||||
<th class="c-actions-4"><?php echo $lang->actions;?></th>
|
||||
<?php endif;?>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($libs as $lib):?>
|
||||
<?php $link = $type != 'custom' ? $this->createLink('doc', 'objectLibs', "type=$type&objectID=$lib->id") : $this->createLink('doc', 'browse', "libID=$lib->id");?>
|
||||
<tr>
|
||||
<td class="c-name"><?php echo html::a($link, $lib->name);?></td>
|
||||
<td class="c-num">
|
||||
<?php if($type == 'custom'):?>
|
||||
<?php echo $itemCounts[$lib->id] . $lang->doc->item;?>
|
||||
<?php else:?>
|
||||
<?php echo count($subLibs[$lib->id]) . $lang->doc->item;?>
|
||||
<?php endif;?>
|
||||
</td>
|
||||
<?php if($type != 'custom'):?>
|
||||
<td class="c-user"><?php if($lib->createdBy) echo zget($users, $lib->createdBy);?></td>
|
||||
<td class="c-datetime"><?php if($lib->createdDate != '00-00-00 00:00:00') echo formatTime($lib->createdDate, 'm-d h:i');?></td>
|
||||
<?php else:?>
|
||||
<td class="c-actions">
|
||||
<?php $star = strpos($lib->collector, ',' . $this->app->user->account . ',') !== false ? 'icon-star text-yellow' : 'icon-star-empty';?>
|
||||
<?php $collectTitle = strpos($lib->collector, ',' . $this->app->user->account . ',') !== false ? $lang->doc->cancelCollection : $lang->doc->collect;?>
|
||||
<a data-url="<?php echo $this->createLink('doc', 'collect', "objectID=$lib->id&objectType=doclib");?>" title="<?php echo $collectTitle;?>" class='btn btn-link ajaxCollect'><i class='icon <?php echo $star;?>'></i></a>
|
||||
<?php common::printLink('doc', 'editLib', "libID=$lib->id", "<i class='icon icon-edit'></i>", '', "title='{$lang->edit}' class='btn btn-link iframe'")?>
|
||||
<?php common::printLink('doc', 'deleteLib', "libID=$lib->id", "<i class='icon icon-trash'></i>", 'hiddenwin', "title='{$lang->delete}' class='btn btn-link'")?>
|
||||
<?php common::printLink('tree', 'browse', "rootID=$lib->id&type=doc", "<i class='icon icon-cog'></i>", '', "title='{$lang->tree->manage}' class='btn btn-link'")?>
|
||||
</td>
|
||||
<?php endif;?>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class='table-footer'><?php $pager->show('right', 'pagerjs');?></div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -15,6 +15,9 @@
|
||||
<?php if($this->from == 'doc'):?>
|
||||
<?php include './side.html.php';?>
|
||||
<?php endif;?>
|
||||
<?php if($this->cookie->browseType == 'bylist'):?>
|
||||
<?php include dirname(__FILE__) . '/objectlibsbylist.html.php';?>
|
||||
<?php else:?>
|
||||
<div class="main-col" data-min-width="400">
|
||||
<div class="panel block-files block-sm no-margin">
|
||||
<div class="panel-heading">
|
||||
@@ -22,6 +25,10 @@
|
||||
<i class="icon icon-folder-open-o text-muted"></i> <?php echo $object->name;?>
|
||||
</div>
|
||||
<nav class="panel-actions btn-toolbar">
|
||||
<div class="btn-group">
|
||||
<?php echo html::a('javascript:setBrowseType("bylist")', "<i class='icon icon-bars'></i>", '', "title='{$lang->doc->browseTypeList['list']}' class='btn btn-icon'");?>
|
||||
<?php echo html::a('javascript:setBrowseType("bygrid")', "<i class='icon icon-cards-view'></i>", '', "title='{$lang->doc->browseTypeList['grid']}' class='btn btn-icon text-primary'");?>
|
||||
</div>
|
||||
<div class="dropdown">
|
||||
<button type="button" title="<?php echo $lang->customConfig;?>" class="btn btn-icon" data-toggle="dropdown"><i class="icon icon-cog"></i></button>
|
||||
<div class="dropdown-menu pull-right col-lg" id="pageSetting">
|
||||
@@ -83,6 +90,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<?php js::set('type', 'doc');?>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
<div class="main-col" data-min-width="400">
|
||||
<div class="panel block-files block-sm no-margin">
|
||||
<div class="panel-heading">
|
||||
<div class="panel-title font-normal">
|
||||
<i class="icon icon-folder-open-o text-muted"></i> <?php echo $object->name;?>
|
||||
</div>
|
||||
<nav class="panel-actions btn-toolbar">
|
||||
<div class="btn-group">
|
||||
<?php echo html::a('javascript:setBrowseType("bylist")', "<i class='icon icon-bars'></i>", '', "title='{$lang->doc->browseTypeList['list']}' class='btn btn-icon text-primary'");?>
|
||||
<?php echo html::a('javascript:setBrowseType("bygrid")', "<i class='icon icon-cards-view'></i>", '', "title='{$lang->doc->browseTypeList['grid']}' class='btn btn-icon'");?>
|
||||
</div>
|
||||
<div class="dropdown">
|
||||
<button type="button" title="<?php echo $lang->customConfig;?>" class="btn btn-icon" data-toggle="dropdown"><i class="icon icon-cog"></i></button>
|
||||
<div class="dropdown-menu pull-right col-lg" id="pageSetting">
|
||||
<form class='with-padding load-indicator' id='pageSettingForm' method='post' target='hiddenwin' action='<?php echo $this->createLink('custom', 'ajaxSaveCustomFields', 'module=doc§ion=custom&key=objectLibs');?>'>
|
||||
<div><?php echo $lang->customConfig;?></div>
|
||||
<div class="row row-grid with-padding">
|
||||
<?php foreach($customObjectLibs as $libType => $libTypeName):?>
|
||||
<div class="col-xs-12">
|
||||
<?php $checked = (strpos(",$showLibs,", ",$libType,") !== false) ? " checked ='checked'" : "";?>
|
||||
<div class="checkbox-primary">
|
||||
<input type="checkbox" name="fields[]" value="<?php echo $libType;?>" <?php echo $checked;?> id="fields<?php echo $libType;?>">
|
||||
<label for="fields<?php echo $libType;?>"><?php echo $libTypeName;?></label>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach;?>
|
||||
</div>
|
||||
<div>
|
||||
<?php echo html::submitButton($lang->save);?>
|
||||
<?php echo html::commonButton($lang->cancel, '', "btn close-dropdown");?>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
<div class='panel-body has-table'>
|
||||
<table class="table table-borderless table-hover table-files">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="c-name"><?php echo $lang->doc->libName;?></th>
|
||||
<th class="c-num"><?php echo $lang->doc->num;?></th>
|
||||
<th class="c-actions-4"><?php echo $lang->actions;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($libs as $libID => $lib):?>
|
||||
<?php if($libID == 'project' and $from != 'doc') continue;?>
|
||||
<?php if(strpos($config->doc->custom->objectLibs, 'files') === false && $libID == 'files') continue;?>
|
||||
<?php if(strpos($config->doc->custom->objectLibs, 'customFiles') === false && isset($lib->main) && !$lib->main) continue;?>
|
||||
|
||||
<?php $libLink = inlink('browse', "libID=$libID&browseType=all¶m=0&orderBy=id_desc&from=$from");?>
|
||||
<?php if($libID == 'project') $libLink = inlink('allLibs', "type=project&product=$object->id");?>
|
||||
<?php if($libID == 'files') $libLink = inlink('showFiles', "type=$type&objectID=$object->id");?>
|
||||
<tr>
|
||||
<td class="c-name"><?php echo html::a($libLink, $lib->name);?></td>
|
||||
<td class="c-num"><?php echo $lib->allCount . $lang->doc->item;?></td>
|
||||
<td class="c-actions">
|
||||
<?php if($libID != 'project' and $libID != 'files'):?>
|
||||
<?php $star = strpos($lib->collector, ',' . $this->app->user->account . ',') !== false ? 'icon-star text-yellow' : 'icon-star-empty';?>
|
||||
<?php $collectTitle = strpos($lib->collector, ',' . $this->app->user->account . ',') !== false ? $lang->doc->cancelCollection : $lang->doc->collect;?>
|
||||
<a data-url="<?php echo $this->createLink('doc', 'collect', "objectID=$libID&objectType=doclib");?>" title="<?php echo $collectTitle;?>" class='btn btn-link ajaxCollect'><i class='icon <?php echo $star;?>'></i></a>
|
||||
<?php common::printLink('doc', 'editLib', "libID=$libID", "<i class='icon icon-edit'></i>", '', "title='{$lang->edit}' class='btn btn-link iframe'")?>
|
||||
<?php if(empty($lib->main)) common::printLink('doc', 'deleteLib', "libID=$libID", "<i class='icon icon-trash'></i>", 'hiddenwin', "title='{$lang->delete}' class='btn btn-link'")?>
|
||||
<?php common::printLink('tree', 'browse', "rootID=$libID&type=doc", "<i class='icon icon-cog'></i>", '', "title='{$lang->doc->manageType}' class='btn btn-link'")?>
|
||||
<?php endif;?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -114,7 +114,7 @@ class groupModel extends model
|
||||
*/
|
||||
public function getPairs()
|
||||
{
|
||||
return $this->dao->select('id, name')->from(TABLE_GROUP)->fetchPairs();
|
||||
return $this->dao->select('id, name')->from(TABLE_GROUP)->orderBy('id')->fetchPairs();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -33,32 +33,34 @@
|
||||
<?php else:?>
|
||||
<table class="table has-sort-head table-fixed" id='projectList'>
|
||||
<thead>
|
||||
<tr>
|
||||
<tr class='text-center'>
|
||||
<th class='w-id'><?php echo $lang->idAB;?></th>
|
||||
<th class='w-160px'><?php echo $lang->project->code;?></th>
|
||||
<th class="text-left"><?php echo $lang->project->name;?></th>
|
||||
<th class='w-date'><?php echo $lang->project->begin;?></th>
|
||||
<th class='w-date'><?php echo $lang->project->end;?></th>
|
||||
<th class='w-status'><?php echo $lang->statusAB;?></th>
|
||||
<th class='w-user'><?php echo $lang->team->role;?></th>
|
||||
<th class='w-date'><?php echo $lang->team->join;?></th>
|
||||
<th class='w-160px text-left'><?php echo $lang->project->code;?></th>
|
||||
<th class='c-name text-left'><?php echo $lang->project->name;?></th>
|
||||
<th class='c-date'><?php echo $lang->project->begin;?></th>
|
||||
<th class='c-date'><?php echo $lang->project->end;?></th>
|
||||
<th class='c-status'><?php echo $lang->statusAB;?></th>
|
||||
<th class='c-user'><?php echo $lang->team->role;?></th>
|
||||
<th class='c-date'><?php echo $lang->team->join;?></th>
|
||||
<th class='w-110px'><?php echo $lang->team->hours;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($projects as $project):?>
|
||||
<?php $projectLink = $this->createLink('project', 'browse', "projectID=$project->id");?>
|
||||
<tr>
|
||||
<tr class='text-center'>
|
||||
<td><?php echo html::a($projectLink, $project->id);?></td>
|
||||
<td class='text-left'><?php echo $project->code;?></td>
|
||||
<td class='text-left'><?php echo html::a($projectLink, $project->name);?></td>
|
||||
<td><?php echo $project->begin;?></td>
|
||||
<td><?php echo $project->end;?></td>
|
||||
<?php if(isset($project->delay)):?>
|
||||
<td class='project-delay'><?php echo $lang->project->delayed;?></td>
|
||||
<?php else:?>
|
||||
<td class='project-<?php echo $project->status?>'><?php echo $lang->project->statusList[$project->status];?></td>
|
||||
<?php endif;?>
|
||||
<td class="c-status">
|
||||
<?php if(isset($project->delay)):?>
|
||||
<span class="status-delayed"><span class="label label-dot"></span> <?php echo $lang->project->delayed;?></span>
|
||||
<?php else:?>
|
||||
<span class="status-<?php echo $project->status?>"><span class="label label-dot"></span> <?php echo zget($lang->project->statusList, $project->status, '');?></span>
|
||||
<?php endif;?>
|
||||
</td>
|
||||
<td><?php echo $project->role;?></td>
|
||||
<td><?php echo $project->join;?></td>
|
||||
<td><?php echo $project->hours;?></td>
|
||||
|
||||
@@ -214,6 +214,7 @@ class product extends control
|
||||
}
|
||||
|
||||
$rootID = key($this->products);
|
||||
if($this->session->product) $rootID = $this->session->product;
|
||||
$this->product->setMenu($this->products, $rootID);
|
||||
|
||||
$this->view->title = $this->lang->product->create;
|
||||
@@ -382,9 +383,6 @@ class product extends control
|
||||
|
||||
$this->product->setMenu($this->products, $productID);
|
||||
|
||||
$actions = $this->dao->select('*')->from(TABLE_ACTION)->where('product')->like("%,$productID,%")->orderBy('date_desc')->limit(6)->fetchAll();
|
||||
if($actions) $this->loadModel('action')->transformActions($actions);
|
||||
|
||||
$releases = $this->dao->select('*')->from(TABLE_RELEASE)->where('deleted')->eq(0)->andWhere('product')->eq($productID)->orderBy('date')->fetchAll();
|
||||
|
||||
$this->view->title = $product->name . $this->lang->colon . $this->lang->product->view;
|
||||
@@ -396,7 +394,7 @@ class product extends control
|
||||
$this->view->groups = $this->loadModel('group')->getPairs();
|
||||
$this->view->lines = array('') + $this->loadModel('tree')->getLinePairs();
|
||||
$this->view->branches = $this->loadModel('branch')->getPairs($productID);
|
||||
$this->view->actions = $actions;
|
||||
$this->view->dynamics = $this->loadModel('action')->getDynamic('all', 'all', 'date_desc', $pager = null, $productID);
|
||||
$this->view->releases = $releases;
|
||||
|
||||
$this->display();
|
||||
@@ -464,7 +462,7 @@ class product extends control
|
||||
public function dynamic($productID = 0, $type = 'today', $param = '', $recTotal = 0, $date = '', $direction = 'next')
|
||||
{
|
||||
/* Save session. */
|
||||
$uri = $this->app->getURI(true);
|
||||
$uri = $this->app->getURI(true);
|
||||
$this->session->set('productList', $uri);
|
||||
$this->session->set('productPlanList', $uri);
|
||||
$this->session->set('releaseList', $uri);
|
||||
|
||||
@@ -352,11 +352,11 @@ class productModel extends model
|
||||
public function create()
|
||||
{
|
||||
$product = fixer::input('post')
|
||||
->setIF($this->post->acl != 'custom', 'whitelist', '')
|
||||
->setDefault('status', 'normal')
|
||||
->setDefault('createdBy', $this->app->user->account)
|
||||
->setDefault('createdDate', helper::now())
|
||||
->setDefault('createdVersion', $this->config->version)
|
||||
->setIF($this->post->acl != 'custom', 'whitelist', '')
|
||||
->setDefault('status', 'normal')
|
||||
->setDefault('createdBy', $this->app->user->account)
|
||||
->setDefault('createdDate', helper::now())
|
||||
->setDefault('createdVersion', $this->config->version)
|
||||
->join('whitelist', ',')
|
||||
->stripTags($this->config->product->editor->create['id'], $this->config->allowedTags)
|
||||
->remove('uid')
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<ul class="timeline timeline-tag-left">
|
||||
<?php foreach($actions as $action):?>
|
||||
<?php foreach($dynamics as $action):?>
|
||||
<li <?php if($action->major) echo "class='active'";?>>
|
||||
<div>
|
||||
<span class="timeline-tag"><?php echo $action->date;?></span>
|
||||
|
||||
@@ -1090,6 +1090,12 @@ class project extends control
|
||||
if(!isset($allProducts[$product->id])) $allProducts[$product->id] = $product->name;
|
||||
if($product->branch) $linkedBranches[$product->branch] = $product->branch;
|
||||
}
|
||||
$this->loadModel('productplan');
|
||||
$productPlans = array(0 => '');
|
||||
foreach($linkedProducts as $product)
|
||||
{
|
||||
$productPlans[$product->id] = $this->productplan->getPairs($product->id);
|
||||
}
|
||||
|
||||
$this->view->title = $title;
|
||||
$this->view->position = $position;
|
||||
@@ -1102,6 +1108,7 @@ class project extends control
|
||||
$this->view->groups = $this->loadModel('group')->getPairs();
|
||||
$this->view->allProducts = $allProducts;
|
||||
$this->view->linkedProducts = $linkedProducts;
|
||||
$this->view->productPlans = $productPlans;
|
||||
$this->view->branchGroups = $this->loadModel('branch')->getByProducts(array_keys($linkedProducts), '', $linkedBranches);
|
||||
|
||||
$this->display();
|
||||
@@ -1362,9 +1369,6 @@ class project extends control
|
||||
$this->project->setMenu($this->projects, $project->id);
|
||||
$this->app->loadLang('bug');
|
||||
|
||||
$actions = $this->dao->select('*')->from(TABLE_ACTION)->where('project')->eq("$projectID")->orderBy('date_desc')->limit(6)->fetchAll();
|
||||
if($actions) $this->loadModel('action')->transformActions($actions);
|
||||
|
||||
list($dateList, $interval) = $this->project->getDateList($project->begin, $project->end, 'noweekend', 0, 'Y-m-d');
|
||||
$chartData = $this->project->buildBurnData($projectID, $dateList, 'noweekend');
|
||||
|
||||
@@ -1377,7 +1381,8 @@ class project extends control
|
||||
$this->view->branchGroups = $this->loadModel('branch')->getByProducts(array_keys($products), '', $linkedBranches);
|
||||
$this->view->planGroups = $this->project->getPlans($products);
|
||||
$this->view->groups = $this->loadModel('group')->getPairs();
|
||||
$this->view->actions = $actions;
|
||||
$this->view->actions = $this->loadModel('action')->getList('project', $projectID);
|
||||
$this->view->dynamics = $this->loadModel('action')->getDynamic('all', 'all', 'date_desc', $pager = null, 'all', $projectID);
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter');
|
||||
$this->view->teamMembers = $this->project->getTeamMembers($projectID);
|
||||
$this->view->docLibs = $this->loadModel('doc')->getLibsByObject('project', $projectID);
|
||||
@@ -1656,7 +1661,7 @@ class project extends control
|
||||
if($from == 'buildCreate' && $this->session->buildCreate) $browseProjectLink = $this->session->buildCreate;
|
||||
|
||||
$this->project->updateProducts($projectID);
|
||||
if(dao::isError()) dis(js::error(dao::getError()));
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
die(js::locate($browseProjectLink));
|
||||
}
|
||||
|
||||
@@ -2301,7 +2306,7 @@ class project extends control
|
||||
public function importPlanStories($projectID, $planID)
|
||||
{
|
||||
$planStories = $planProducts = array();
|
||||
$planStory = $this->loadModel('story')->getPlanStories($planID);
|
||||
$planStory = $this->loadModel('story')->getPlanStories($planID, 'changed,active,reviewing');
|
||||
if(!empty($planStory))
|
||||
{
|
||||
$planStories = array_keys($planStory);
|
||||
|
||||
@@ -7,3 +7,4 @@
|
||||
#burnLegend > div:before {content: ' '; display: block; position: absolute; width: 20px; left: 0; top: 8px; height: 2px; background: #EEEEEE;}
|
||||
#burnLegend > div.line-real:before {background: #006AF1;}
|
||||
|
||||
.block-dynamic .panel-body {height: 230px; overflow: auto; position: relative;}
|
||||
|
||||
@@ -177,7 +177,7 @@ function loadPlans(product, branchID)
|
||||
{
|
||||
if(typeof(planID) == 'undefined') planID = 0;
|
||||
planID = $("select#plans" + productID).val() != '' ? $("select#plans" + productID).val() : planID;
|
||||
$.get(createLink('product', 'ajaxGetPlans', "productID=" + productID + '&branch=' + branchID + '&planID=' + planID + '&fieldID&needCreate=&expired=' + (config.currentMethod == 'create' ? 'unexpired' : '')), function(data)
|
||||
$.get(createLink('product', 'ajaxGetPlans', "productID=" + productID + '&branch=' + branchID + '&planID=' + planID + '&fieldID&needCreate=&expired=' + ((config.currentMethod == 'create' || config.currentMethod == 'edit') ? 'unexpired' : '')), function(data)
|
||||
{
|
||||
if(data)
|
||||
{
|
||||
|
||||
@@ -133,6 +133,17 @@
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr <?php if($config->global->flow == 'onlyTask') echo "class='hidden'";?>>
|
||||
<th><?php echo $lang->project->linkPlan;?></th>
|
||||
<td id="plansBox" colspan="2">
|
||||
<div class='row'>
|
||||
<?php foreach($linkedProducts as $product):?>
|
||||
<?php $plans = zget($productPlans, $product->id, array(0 => ''));?>
|
||||
<div class="col-sm-4" id="plan<?php echo $product->id;?>"><?php echo html::select("plans[" . $product->id . "]", $plans, $product->plan, "class='form-control chosen'");?></div>
|
||||
<?php endforeach;?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->project->desc;?></th>
|
||||
<td colspan='2'><?php echo html::textarea('desc', htmlspecialchars($project->desc), "rows='6' class='form-control kindeditor' hidefocus='true'");?></td>
|
||||
|
||||
@@ -46,16 +46,13 @@
|
||||
else
|
||||
{
|
||||
echo "<div class='btn-group dropdown-hover' id='createActionMenu'>";
|
||||
if(common::hasPriv('project', 'importPlanStories'))
|
||||
{
|
||||
echo "<button type='button' class='btn btn-link dropdown-toggle btn-icon'>";
|
||||
echo "<i class='icon-link muted'></i> {$lang->project->linkStory} <span class='caret'></span>";
|
||||
echo '</button>';
|
||||
echo "<ul class='dropdown-menu pull-right'>";
|
||||
echo "<li>" . html::a($this->createLink('project', 'linkStory', "project=$project->id"), $lang->project->linkStory). "</li>";
|
||||
echo "<li>" . html::a('#linkStoryByPlan', $lang->project->linkStoryByPlan, '', 'data-toggle="modal"') . "</li>";
|
||||
echo '</ul>';
|
||||
}
|
||||
echo "<button type='button' class='btn btn-link dropdown-toggle btn-icon'>";
|
||||
echo "<i class='icon-link muted'></i> {$lang->project->linkStory} <span class='caret'></span>";
|
||||
echo '</button>';
|
||||
echo "<ul class='dropdown-menu pull-right'>";
|
||||
if(common::hasPriv('project', 'linkStory')) echo "<li>" . html::a($this->createLink('project', '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>';
|
||||
}
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<ul class="timeline timeline-tag-left">
|
||||
<?php foreach($actions as $action):?>
|
||||
<?php foreach($dynamics as $action):?>
|
||||
<li <?php if($action->major) echo "class='active'";?>>
|
||||
<div class='text-ellipsis'>
|
||||
<span class="timeline-tag"><?php echo $action->date;?></span>
|
||||
|
||||
@@ -38,11 +38,11 @@ $lang->report->singleColor[] = 'F6BD0F';
|
||||
|
||||
$lang->report->projectDeviation = $lang->projectCommon . ' Deviation';
|
||||
$lang->report->productSummary = $lang->productCommon . ' Summary';
|
||||
$lang->report->bugCreate = 'Bug Submission Report';
|
||||
$lang->report->bugAssign = 'Bug Assignment Report';
|
||||
$lang->report->workload = 'Workload';
|
||||
$lang->report->workloadAB = 'Workload';
|
||||
$lang->report->bugOpenedDate = 'Bug Created From';
|
||||
$lang->report->bugCreate = 'Bug Reported Statement';
|
||||
$lang->report->bugAssign = 'Bug Assigned Statement';
|
||||
$lang->report->workload = 'Team Workload Statement';
|
||||
$lang->report->workloadAB = 'Workload Statement';
|
||||
$lang->report->bugOpenedDate = 'Bug reported from';
|
||||
$lang->report->taskAssignedDate = 'From';
|
||||
$lang->report->beginAndEnd = ' From';
|
||||
$lang->report->dept = 'Dept';
|
||||
@@ -50,9 +50,9 @@ $lang->report->deviationChart = $lang->projectCommon . ' Deviation Chart';
|
||||
|
||||
$lang->reportList->project->lists[10] = $lang->projectCommon . ' Deviation|report|projectdeviation';
|
||||
$lang->reportList->product->lists[10] = $lang->productCommon . ' Summary|report|productsummary';
|
||||
$lang->reportList->test->lists[10] = 'Bugs Reported|report|bugcreate';
|
||||
$lang->reportList->test->lists[13] = 'Bugs Assigned|report|bugassign';
|
||||
$lang->reportList->staff->lists[10] = 'Workload|report|workload';
|
||||
$lang->reportList->test->lists[10] = 'Bugs Reported Statement|report|bugcreate';
|
||||
$lang->reportList->test->lists[13] = 'Bugs Assigned Statement|report|bugassign';
|
||||
$lang->reportList->staff->lists[10] = 'Team Workload Statement|report|workload';
|
||||
|
||||
$lang->report->id = 'ID';
|
||||
$lang->report->project = $lang->projectCommon;
|
||||
|
||||
@@ -1685,6 +1685,7 @@ class storyModel extends model
|
||||
->leftJoin(TABLE_PRODUCT)->alias('t4')->on('t2.product = t4.id')
|
||||
->where($storyQuery)
|
||||
->andWhere('t1.project')->eq((int)$projectID)
|
||||
->andWhere('t2.deleted')->eq(0)
|
||||
->orderBy($orderBy)
|
||||
->page($pager, 't2.id')
|
||||
->fetchAll('id');
|
||||
|
||||
@@ -822,6 +822,11 @@ class taskModel extends model
|
||||
->setDefault('assignedDate', $now)
|
||||
->remove('comment,showModule')
|
||||
->get();
|
||||
if($oldTask->status != 'done' and $oldTask->status != 'closed' and $task->left == 0)
|
||||
{
|
||||
dao::$errors[] = sprintf($this->lang->error->notempty, $this->lang->task->left);
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!empty($oldTask->team))
|
||||
{
|
||||
|
||||
@@ -39,10 +39,12 @@
|
||||
<th class='w-80px'><?php echo empty($task->team) ? $lang->task->assign : $lang->task->transferTo;?></th>
|
||||
<td class='w-p25-f'><?php echo html::select('assignedTo', $members, empty($task->team) ? $task->assignedTo : $task->nextUser, "class='form-control chosen'");?></td><td></td>
|
||||
</tr>
|
||||
<?php if($task->status != 'done' and $task->status != 'closed'):?>
|
||||
<tr>
|
||||
<th><?php echo $lang->task->left;?></th>
|
||||
<td><div class='input-group'><?php echo html::input('left', $task->left, "class='form-control' autocomplete='off'");?> <span class='input-group-addon'><?php echo $lang->task->hour;?></span></div></td><td></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
<th><?php echo $lang->comment;?></th>
|
||||
<td colspan='2'><?php echo html::textarea('comment', '', "rows='6' class='form-control w-p98'");?></td>
|
||||
|
||||
@@ -321,7 +321,7 @@ class testreportModel extends model
|
||||
*/
|
||||
public function getTaskCases($tasks, $idList = '')
|
||||
{
|
||||
return $this->dao->select('t2.*,t1.assignedTo,t1.lastRunner,t1.lastRunDate,t1.lastRunResult,t1.status')->from(TABLE_TESTRUN)->alias('t1')
|
||||
return $this->dao->select('t2.*,t1.task,t1.assignedTo,t1.lastRunner,t1.lastRunDate,t1.lastRunResult,t1.status')->from(TABLE_TESTRUN)->alias('t1')
|
||||
->leftJoin(TABLE_CASE)->alias('t2')->on('t1.case=t2.id')
|
||||
->where('t1.task')->in(array_keys($tasks))
|
||||
->beginIF($idList)->andWhere('t2.id')->in($idList)->fi()
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<tr>
|
||||
<td><?php echo sprintf('%03d', $case->id) . html::hidden('cases[]', $case->id)?></td>
|
||||
<td><span class='label-pri label-pri-<?php echo $case->pri?>' title='<?php echo zget($lang->testcase->priList, $case->pri);?>'><?php echo zget($lang->testcase->priList, $case->pri);?></span></td>
|
||||
<td class='text-left' title='<?php echo $case->title?>'><?php echo html::a($sysURL . $this->createLink('testcase', 'view', "caseID=$case->id", '', true), $case->title, '', "data-toggle='modal' data-type='iframe' data-width='90%'");?></td>
|
||||
<td class='text-left' title='<?php echo $case->title?>'><?php echo html::a($sysURL . $this->createLink('testcase', 'view', "caseID=$case->id&version=$case->version&from=testtask&taskID=$case->task", '', true), $case->title, '', "data-toggle='modal' data-type='iframe' data-width='90%'");?></td>
|
||||
<td><?php echo zget($lang->testcase->typeList, $case->type);?></td>
|
||||
<td><?php echo zget($users, $case->assignedTo);?></td>
|
||||
<td><?php echo zget($users, $case->lastRunner);?></td>
|
||||
|
||||
@@ -260,9 +260,9 @@ class testtask extends control
|
||||
if(!$task) die(js::error($this->lang->notFound) . js::locate('back'));
|
||||
$productID = $task->product;
|
||||
$this->testtask->setMenu($this->products, $productID, $task->branch, $taskID);
|
||||
setcookie('preProductID', $productID, $this->config->cookieLife, $this->config->webRoot);
|
||||
setcookie('preTaskID', $taskID, $this->config->cookieLife, $this->config->webRoot);
|
||||
|
||||
if($this->cookie->preProductID != $productID)
|
||||
if($this->cookie->preTaskID != $taskID)
|
||||
{
|
||||
$_COOKIE['taskCaseModule'] = 0;
|
||||
setcookie('taskCaseModule', 0, $this->config->cookieLife, $this->config->webRoot);
|
||||
|
||||
@@ -28,3 +28,19 @@ function adjustPriBoxWidth()
|
||||
var addonWidth = $('#ownerAndPriBox .input-group-addon').outerWidth();
|
||||
$('#pri,#pri_chosen .chosen-single').css('width', boxWidth - beginWidth -addonWidth);
|
||||
}
|
||||
|
||||
function createBug(obj)
|
||||
{
|
||||
var $form = $(obj).closest('form');
|
||||
var params = $form.data('params');
|
||||
var stepIdList = '';
|
||||
$form.find('.step .step-id :checkbox').each(function()
|
||||
{
|
||||
if($(this).prop('checked')) stepIdList += $(this).val() + '_';
|
||||
});
|
||||
|
||||
var onlybody = config.onlybody;
|
||||
config.onlybody = 'no';
|
||||
window.open(createLink('bug', 'create', params + ',stepIdList=' + stepIdList), '_blank');
|
||||
config.onlybody = onlybody;
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
<?php $params = isset($testtask) ? ",testtask=$testtask->id,projectID=$testtask->project,buildID=$testtask->build" : '';?>
|
||||
<tr class='result-detail hide' id='tr-detail_<?php echo $trCount++; ?>'>
|
||||
<td colspan='7' class='pd-0'>
|
||||
<form action='<?php echo $this->createLink('bug', 'create', "product=$case->product&branch=$case->branch&extras=caseID=$case->id,version=$case->version,resultID=$result->id,runID=$runID" . $params)?>' target='_blank' method='post'>
|
||||
<form data-params='<?php echo "product=$case->product&branch=$case->branch&extras=caseID=$case->id,version=$case->version,resultID=$result->id,runID=$runID" . $params?>' method='post'>
|
||||
<table class='table table-condensed resultSteps'>
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -82,7 +82,7 @@
|
||||
<tr class='step <?php echo $stepClass?>'>
|
||||
<td class='step-id'>
|
||||
<?php if($result->caseResult == 'fail'):?>
|
||||
<?php $inputName = $stepResult['type'] != 'group' ? 'stepIDList[]' : '';?>
|
||||
<?php $inputName = $stepResult['type'] != 'group' ? 'stepIdList[]' : '';?>
|
||||
<div class='checkbox-primary'>
|
||||
<input type='checkbox' id='<?php echo $inputName;?>' name='<?php echo $inputName;?>' value='<?php echo $key;?>'/>
|
||||
<label><?php echo $stepId;?></label>
|
||||
@@ -113,7 +113,7 @@
|
||||
<?php if($result->caseResult == 'fail'):?>
|
||||
<tr>
|
||||
<td></td><td></td><td></td><td></td><td></td><td></td>
|
||||
<td><?php echo html::submitButton($lang->testcase->createBug);?></td>
|
||||
<td><?php echo html::commonButton($lang->testcase->createBug, "onclick='createBug(this)'", "btn btn-primary createBtn");?></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
</tbody>
|
||||
|
||||
@@ -530,10 +530,13 @@ class todoModel extends model
|
||||
*/
|
||||
public function close($todoID)
|
||||
{
|
||||
$now = helper::now();
|
||||
$this->dao->update(TABLE_TODO)
|
||||
->set('status')->eq('closed')
|
||||
->set('closedBy')->eq($this->app->user->account)
|
||||
->set('closedDate')->eq(helper::now())
|
||||
->set('closedDate')->eq($now)
|
||||
->set('assignedTo')->eq('closed')
|
||||
->set('assignedDate')->eq($now)
|
||||
->where('id')->eq((int)$todoID)
|
||||
->exec();
|
||||
$this->loadModel('action')->create('todo', $todoID, 'closed', '', 'closed');
|
||||
|
||||
@@ -1,13 +1,5 @@
|
||||
.adbox{margin-top:20px;}
|
||||
|
||||
.card.ad{margin-bottom:0px;}
|
||||
.card.ad > .img-wrapper {
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
height: 115px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.card {
|
||||
position: relative;
|
||||
display: block;
|
||||
@@ -61,6 +53,9 @@
|
||||
height: 115px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.card.ad.ad-ranzhi > .img-wrapper {background-size: 100%;}
|
||||
|
||||
.card.ad > .img-wrapper > img{display: none;}
|
||||
.card.ad > .card-heading {text-align: center;}
|
||||
.card.ad > .card-reveal > .card-heading { padding: 12px 10px 10px 15px;}
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
$(function(){$.ajustModalPosition('fit', $('.modal-dialog'))});
|
||||
@@ -337,6 +337,7 @@ class upgradeModel extends model
|
||||
case '9_8_3': $confirmContent .= file_get_contents($this->getUpgradeFile('9.8.3'));
|
||||
case '10_0_alpha': $confirmContent .= file_get_contents($this->getUpgradeFile('10.0.alpha'));
|
||||
case '10_0_beta': $confirmContent .= file_get_contents($this->getUpgradeFile('10.0.beta'));
|
||||
case '10_0': $confirmContent .= file_get_contents($this->getUpgradeFile('10.0'));
|
||||
}
|
||||
return str_replace('zt_', $this->config->db->prefix, $confirmContent);
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
<div class='panel-body row'>
|
||||
<?php foreach($lang->install->product as $product):?>
|
||||
<div class='col-md-<?php echo ceil(12 / count($lang->install->product));?>'>
|
||||
<a class="card ad" href="<?php echo $lang->install->{$product}->url;?>" target="_blank">
|
||||
<a class="card ad ad-<?php echo $product;?>" href="<?php echo $lang->install->{$product}->url;?>" target="_blank">
|
||||
<div class="img-wrapper" style="background-image:url(<?php echo $defaultTheme . $lang->install->{$product}->logo;?>)"><img src="<?php echo $defaultTheme . $lang->install->{$product}->logo;?>" alt=""></div>
|
||||
<div class="card-reveal">
|
||||
<h5 class="card-heading"><?php echo $lang->install->{$product}->name?></h5>
|
||||
|
||||
@@ -842,7 +842,7 @@ class userModel extends model
|
||||
/* Judge whether the project is delayed. */
|
||||
foreach($projects as $project)
|
||||
{
|
||||
if($project->status != 'done')
|
||||
if($project->status != 'done' and $project->status != 'closed' and $project->status != 'suspended')
|
||||
{
|
||||
$delay = helper::diffDate(helper::today(), $project->end);
|
||||
if($delay > 0) $project->delay = $delay;
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
<th class='w-150px<?php echo zget($visibleFields, 'dept', ' hidden')?>'><?php echo $lang->user->dept;?></th>
|
||||
<th class='w-130px required'><?php echo $lang->user->account;?></th>
|
||||
<th class='w-130px required'><?php echo $lang->user->realname;?></th>
|
||||
<th class='w-120px required'><?php echo $lang->user->role;?></th>
|
||||
<th class='w-120px'><?php echo $lang->user->role;?></th>
|
||||
<th class='w-120px'><?php echo $lang->user->group;?></th>
|
||||
<th class='<?php echo zget($visibleFields, 'email', "$minWidth hidden", $minWidth)?>'><?php echo $lang->user->email;?></th>
|
||||
<th class='w-90px<?php echo zget($visibleFields, 'gender', ' hidden')?>'><?php echo $lang->user->gender;?></th>
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
<th class='w-150px<?php echo zget($visibleFields, 'dept', ' hidden')?>'> <?php echo $lang->user->dept;?></th>
|
||||
<th class='<?php echo $minWidth?> required'><?php echo $lang->user->account;?></th>
|
||||
<th class='<?php echo $minWidth?> required'><?php echo $lang->user->realname;?></th>
|
||||
<th class='w-120px required'><?php echo $lang->user->role;?></th>
|
||||
<th class='w-120px'><?php echo $lang->user->role;?></th>
|
||||
<th class='<?php echo $minWidth . zget($visibleFields, 'commiter', ' hidden')?>'><?php echo $lang->user->commiter;?></th>
|
||||
<th class='<?php echo $minWidth . zget($visibleFields, 'email', ' hidden')?>'> <?php echo $lang->user->email;?></th>
|
||||
<th class='w-120px<?php echo zget($visibleFields, 'join', ' hidden')?>'> <?php echo $lang->user->join;?></th>
|
||||
|
||||
@@ -9,3 +9,4 @@
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
.divider + .divider{display:none;}
|
||||
.body-modal .main-header > h2{width: 100%; overflow:hidden; text-overflow: ellipsis; white-space: nowrap;}
|
||||
|
||||
Reference in New Issue
Block a user