Merge branch 'master' of github.com:easysoft/zentaopms
This commit is contained in:
@@ -39,6 +39,26 @@ class html extends baseHTML
|
||||
return parent::a($href, $title, $misc, $newline);
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成input输入标签。
|
||||
* Create tags like "<input type='text' />"
|
||||
*
|
||||
* @param string $name the name of the text input tag.
|
||||
* @param string $value the default value.
|
||||
* @param string $attrib other attribs.
|
||||
* @static
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
static public function input($name, $value = "", $attrib = "", $autocomplete = false)
|
||||
{
|
||||
$id = "id='$name'";
|
||||
if(strpos($attrib, 'id=') !== false) $id = '';
|
||||
$value = str_replace("'", ''', $value);
|
||||
$autocomplete = $autocomplete ? 'autocomplete="on"' : 'autocomplete="off"';
|
||||
return "<input type='text' name='$name' {$id} value='$value' $attrib $autocomplete />\n";
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成多选按钮。
|
||||
* Create tags like "<input type='checkbox' />"
|
||||
|
||||
@@ -49,8 +49,8 @@ var browseType = '<?php echo $browseType;?>';
|
||||
<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", "<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->edit, '', "class='iframe'");?></li>
|
||||
<li><?php common::printLink('doc', 'deleteLib', "libID=$libID", "<i class='icon icon-close'></i>" . $lang->delete, 'hiddenwin');?></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-close'></i>" . $lang->doc->deleteLib, 'hiddenwin');?></li>
|
||||
</ul>
|
||||
</div>
|
||||
<?php common::printLink('doc', 'create', "libID=$libID&moduleID=$moduleID", "<i class='icon icon-plus'></i> " . $this->lang->doc->create, '', "class='btn btn-primary'");?>
|
||||
|
||||
@@ -100,7 +100,7 @@
|
||||
<?php
|
||||
$params = "bugID=$bug->id";
|
||||
common::printIcon('bug', 'confirmBug', $params, $bug, 'list', 'confirm', '', 'iframe', true);
|
||||
common::printIcon('bug', 'resolve', $params, $bug, 'list', 'check', '', 'iframe', true);
|
||||
common::printIcon('bug', 'resolve', $params, $bug, 'list', 'checked', '', 'iframe', true);
|
||||
common::printIcon('bug', 'close', $params, $bug, 'list', '', '', 'iframe', true);
|
||||
common::printIcon('bug', 'create', "product=$bug->product&branch=$bug->branch&extra=$params", $bug, 'list', 'copy');
|
||||
common::printIcon('bug', 'edit', $params, $bug, 'list');
|
||||
|
||||
@@ -322,8 +322,8 @@
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<tr class='text-top'>
|
||||
<th class='w-70px'><?php echo $lang->story->legendBugs;?></th>
|
||||
<tr>
|
||||
<th class='text-top' class='w-70px'><?php echo $lang->story->legendBugs;?></th>
|
||||
<td class='pd-0'>
|
||||
<ul class='list-unstyled'>
|
||||
<?php
|
||||
@@ -335,8 +335,8 @@
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class='text-top'>
|
||||
<th><?php echo $lang->story->legendCases;?></th>
|
||||
<tr>
|
||||
<th class='text-top'><?php echo $lang->story->legendCases;?></th>
|
||||
<td class='pd-0'>
|
||||
<ul class='list-unstyled'>
|
||||
<?php
|
||||
@@ -349,8 +349,8 @@
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<tr class='text-top'>
|
||||
<th class='w-80px'><?php echo $lang->story->legendLinkStories;?></th>
|
||||
<tr>
|
||||
<th class='text-top' class='w-80px'><?php echo $lang->story->legendLinkStories;?></th>
|
||||
<td class='pd-0'>
|
||||
<ul class='list-unstyled'>
|
||||
<?php
|
||||
@@ -363,8 +363,8 @@
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class='text-top'>
|
||||
<th><?php echo $lang->story->legendChildStories;?></th>
|
||||
<tr>
|
||||
<th class='text-top'><?php echo $lang->story->legendChildStories;?></th>
|
||||
<td class='pd-0'>
|
||||
<ul class='list-unstyled'>
|
||||
<?php
|
||||
|
||||
@@ -593,9 +593,10 @@ class testcase extends control
|
||||
$title = "CASE #$case->id $case->title - " . $libraries[$case->lib];
|
||||
$position[] = html::a($this->createLink('testsuite', 'library', "libID=$case->lib"), $libraries[$case->lib]);
|
||||
|
||||
$this->view->libID = $case->lib;
|
||||
$this->view->libName = $libraries[$case->lib];
|
||||
$this->view->libraries = $libraries;
|
||||
$this->view->libID = $case->lib;
|
||||
$this->view->libName = $libraries[$case->lib];
|
||||
$this->view->libraries = $libraries;
|
||||
$this->view->linkedCaseID = $this->testcase->getLinkedCaseID($case->lib, $caseID);
|
||||
$this->view->moduleOptionMenu = $this->tree->getOptionMenu($case->lib, $viewType = 'caselib', $startModuleID = 0);
|
||||
}
|
||||
else
|
||||
|
||||
@@ -139,6 +139,7 @@ $lang->testcase->confirmDelete = 'Do you want to delete this Test Case?';
|
||||
$lang->testcase->confirmBatchDelete = 'Do you want to batch delete these Test Cases?';
|
||||
$lang->testcase->ditto = 'Ditto';
|
||||
$lang->testcase->dittoNotice = 'This Case does not belong to the Product as the previous one!';
|
||||
$lang->testcase->haveLinkCase = 'It has linked case, update this one, the linked case will change.';
|
||||
|
||||
$lang->testcase->reviewList[0] = 'NO';
|
||||
$lang->testcase->reviewList[1] = 'YES';
|
||||
|
||||
@@ -139,6 +139,7 @@ $lang->testcase->confirmDelete = '您确认要删除该测试用例吗?';
|
||||
$lang->testcase->confirmBatchDelete = '您确认要批量删除这些测试用例吗?';
|
||||
$lang->testcase->ditto = '同上';
|
||||
$lang->testcase->dittoNotice = '该用例与上一用例不属于同一产品!';
|
||||
$lang->testcase->haveLinkCase = '此用例存在相关用例,更新后,其相关用例会一并更新。';
|
||||
|
||||
$lang->testcase->reviewList[0] = '否';
|
||||
$lang->testcase->reviewList[1] = '是';
|
||||
|
||||
@@ -604,6 +604,24 @@ class testcaseModel extends model
|
||||
return $caseCounts;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check have linked cases or not.
|
||||
*
|
||||
* @param int $libID
|
||||
* @param int $caseID$
|
||||
* @access public
|
||||
* @return int
|
||||
*/
|
||||
public function getLinkedCaseID($libID, $caseID)
|
||||
{
|
||||
$linkedCaseID = $this->dao->select('id')->from(TABLE_CASE)
|
||||
->where('lib')->eq($libID)
|
||||
->andWhere('fromCaseID')->eq($caseID)
|
||||
->andWhere('deleted')->eq(0)
|
||||
->fetch('id');
|
||||
return $linkedCaseID;
|
||||
}
|
||||
|
||||
/**
|
||||
* Update a case.
|
||||
*
|
||||
@@ -613,7 +631,10 @@ class testcaseModel extends model
|
||||
*/
|
||||
public function update($caseID)
|
||||
{
|
||||
$oldCase = $this->getById($caseID);
|
||||
$oldCase = $this->getById($caseID);
|
||||
$isLibCase = ($oldCase->lib and empty($oldCase->product));
|
||||
$linkedCases = '';
|
||||
if($isLibCase) $linkedCases = $this->dao->select('id')->from(TABLE_CASE)->where('fromCaseID')->eq($caseID)->fetchPairs();
|
||||
if(!empty($_POST['lastEditedDate']) and $oldCase->lastEditedDate != $this->post->lastEditedDate)
|
||||
{
|
||||
dao::$errors[] = $this->lang->error->editedByOther;
|
||||
@@ -666,6 +687,10 @@ class testcaseModel extends model
|
||||
->get();
|
||||
if(!$this->forceNotReview() and $stepChanged) $case->status = 'wait';
|
||||
$this->dao->update(TABLE_CASE)->data($case)->autoCheck()->batchCheck($this->config->testcase->edit->requiredFields, 'notempty')->where('id')->eq((int)$caseID)->exec();
|
||||
if($isLibCase and $linkedCases)
|
||||
{
|
||||
foreach($linkedCases as $linkedCaseID) $this->dao->update(TABLE_CASE)->data($case)->autoCheck()->batchCheck($this->config->testcase->edit->requiredFields, 'notempty')->where('id')->eq((int)$linkedCaseID)->exec();
|
||||
}
|
||||
if(!$this->dao->isError())
|
||||
{
|
||||
if($stepChanged)
|
||||
@@ -685,6 +710,15 @@ class testcaseModel extends model
|
||||
$this->dao->insert(TABLE_CASESTEP)->data($step)->autoCheck()->exec();
|
||||
if($step->type == 'group') $parentStepID = $this->dao->lastInsertID();
|
||||
if($step->type == 'step') $parentStepID = 0;
|
||||
|
||||
if($isLibCase and $linkedCases)
|
||||
{
|
||||
foreach($linkedCases as $linkedCaseID)
|
||||
{
|
||||
$step->case = $linkedCaseID;
|
||||
$this->dao->insert(TABLE_CASESTEP)->data($step)->autoCheck()->exec();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -125,6 +125,7 @@
|
||||
<?php echo html::hidden('lastEditedDate', $case->lastEditedDate);?>
|
||||
<?php echo html::submitButton();?>
|
||||
<input type='button' value='<?php echo $lang->testcase->buttonToList;?>' class='btn btn-wide' onclick='location.href="<?php echo $isLibCase ? $this->createLink('testsuite', 'library', "libID=$libID") : $this->createLink('testcase', 'browse', "productID=$productID");?>"' />
|
||||
<?php if($isLibCase and $linkedCaseID) echo '<span class="text-danger">' . $lang->testcase->haveLinkCase . '</span>'; ?>
|
||||
</div>
|
||||
<?php include '../../common/view/action.html.php';?>
|
||||
</div>
|
||||
|
||||
@@ -169,6 +169,7 @@ class testtask extends control
|
||||
|
||||
if($projectID != 0)
|
||||
{
|
||||
$this->app->loadLang('build');
|
||||
$this->view->products = $products;
|
||||
$this->view->projectID = $projectID;
|
||||
}
|
||||
|
||||
@@ -40,7 +40,15 @@
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
<th class='w-80px'><?php echo $lang->testtask->build;?></th>
|
||||
<td class='w-p35-f'><span id='buildBox'><?php echo html::select('build', $builds, $build, "class='form-control chosen'");?></span></td>
|
||||
<td class='w-p35-f'>
|
||||
<div class='input-group' id='buildBox'>
|
||||
<?php echo html::select('build', empty($builds) ? '' : $builds, $build, "class='form-control chosen'");?>
|
||||
<?php if(isset($projectID) and $projectID and empty($builds)):?>
|
||||
<span class='input-group-addon'><?php echo html::a(helper::createLink('build', 'create', "projectID=$projectID", '', true), $lang->build->create, '', "data-toggle='modal' data-type='iframe' data-width='95%'")?> </span>
|
||||
</div>
|
||||
<div class='hidden'><?php echo ' ' . html::a("javascript:void(0)", $lang->refresh, '', "class='refresh' onclick='loadProjectBuilds($projectID)'");?></div>
|
||||
<?php endif;?>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@@ -9,17 +9,17 @@
|
||||
* @version $Id: en.php 5119 2013-07-12 08:06:42Z wyd621@gmail.com $
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
$lang->upgrade->common = 'Upgrade';
|
||||
$lang->upgrade->common = 'Update';
|
||||
$lang->upgrade->result = 'Result';
|
||||
$lang->upgrade->fail = 'Failed';
|
||||
$lang->upgrade->success = 'Upgraded';
|
||||
$lang->upgrade->success = 'Updated';
|
||||
$lang->upgrade->tohome = 'Visit ZenTao';
|
||||
$lang->upgrade->license = 'ZenTao is under Z PUBLIC LICENSE(ZPL) 1.2.';
|
||||
$lang->upgrade->warnning= 'Warning!';
|
||||
$lang->upgrade->checkExtension = 'Check Extension';
|
||||
$lang->upgrade->consistency = 'Check Consistency';
|
||||
$lang->upgrade->warnningContent = <<<EOT
|
||||
<p>Please backup your database before upgrading ZenTao!</p>
|
||||
<p>Please backup your database before updating ZenTao!</p>
|
||||
<pre>
|
||||
1. Use phpMyAdmin to backup.
|
||||
2. Use mysqlCommand to backup.
|
||||
@@ -36,11 +36,11 @@ $lang->upgrade->setStatusFile = '<h4>Please finish the following actions</h
|
||||
<li>Or delete "<strong style="color:#ed980f">%s</strong>" and create <strong style="color:#ed980f">ok.txt</strong> and leave it blank.</li>
|
||||
</ul>
|
||||
<p><strong style="color:red">I have read and done as instructed above. <a href="upgrade.php">Continue upgrading.</a></strong></p>';
|
||||
$lang->upgrade->selectVersion = 'Select Version';
|
||||
$lang->upgrade->selectVersion = 'Version';
|
||||
$lang->upgrade->continue = 'Continue';
|
||||
$lang->upgrade->noteVersion = "Select the compatible version, or it might cause data loss.";
|
||||
$lang->upgrade->fromVersion = 'From';
|
||||
$lang->upgrade->toVersion = 'Upgrade to';
|
||||
$lang->upgrade->toVersion = 'To';
|
||||
$lang->upgrade->confirm = 'Confirm SQL';
|
||||
$lang->upgrade->sureExecute = 'Execute';
|
||||
$lang->upgrade->forbiddenExt = 'Extension is not compatible with the version. It has been deactivated:';
|
||||
|
||||
Reference in New Issue
Block a user