This commit is contained in:
daitingting
2015-11-13 15:17:23 +08:00
71 changed files with 460 additions and 251 deletions
+6 -1
View File
@@ -89,7 +89,12 @@ class branch extends control
*/
public function delete($branchID, $confirm = 'no')
{
if($confirm == 'no') die(js::confirm($this->lang->branch->confirmDelete, inlink('delete', "branchID=$branchID&confirm=yes")));
if($confirm == 'no')
{
$this->app->loadLang('product');
$productType = $this->branch->getProductType($branchID);
die(js::confirm(str_replace('%branch%', $this->lang->product->branchName[$productType], $this->lang->branch->confirmDelete), inlink('delete', "branchID=$branchID&confirm=yes")));
}
$this->branch->delete(TABLE_BRANCH, $branchID);
die(js::reload('parent'));
+2 -1
View File
@@ -3,6 +3,7 @@ $lang->branch->common = 'Branch';
$lang->branch->manage = 'Branch manage';
$lang->branch->delete = 'Branch delete';
$lang->branch->manageTitle = '%s Manage';
$lang->branch->all = 'All';
$lang->branch->confirmDelete = 'Branch deletion, will affect the branch of the demand, module, plan, release, Bug, testcase and so on, please consider carefully. Are you sure delete the branch?';
$lang->branch->confirmDelete = '%branch% deletion, will affect the %branch% of the demand, module, plan, release, Bug, testcase and so on, please consider carefully. Are you sure delete the %branch%?';
+1 -1
View File
@@ -6,4 +6,4 @@ $lang->branch->delete = '分支删除';
$lang->branch->manageTitle = '%s管理';
$lang->branch->all = '所有';
$lang->branch->confirmDelete = '分支删除,会影响关联该分支的需求、模块、计划、发布、Bug、用例等等,请慎重考虑。是否删除改分支?';
$lang->branch->confirmDelete = '%branch%删除,会影响关联该%branch%的需求、模块、计划、发布、Bug、用例等等,请慎重考虑。是否删除该%branch%';
+3 -2
View File
@@ -3,6 +3,7 @@ $lang->branch->common = '分支';
$lang->branch->manage = '分支管理';
$lang->branch->delete = '分支刪除';
$lang->branch->all = '所有';
$lang->branch->manageTitle = '%s管理';
$lang->branch->all = '所有';
$lang->branch->confirmDelete = '分支刪除,會影響關聯該分支的需求、模組、計劃、發佈、Bug、用例等等,請慎重考慮。是否刪除改分支?';
$lang->branch->confirmDelete = '%branch%刪除,會影響關聯該%branch%的需求、模組、計劃、發佈、Bug、用例等等,請慎重考慮。是否刪除該%branch%';
+15
View File
@@ -99,4 +99,19 @@ class branchModel extends model
return $branchGroups;
}
/**
* Get product bype by branch.
*
* @param int $branchID
* @access public
* @return void
*/
public function getProductType($branchID)
{
return $this->dao->select('t2.type')->from(TABLE_BRANCH)->alias('t1')
->leftJoin(TABLE_PRODUCT)->alias('t2')->on('t1.product=t2.id')
->where('t1.id')->eq($branchID)
->fetch('type');
}
}
+11 -7
View File
@@ -61,11 +61,12 @@ class bug extends control
* @access public
* @return void
*/
public function browse($productID = 0, $branch = 0, $browseType = 'unclosed', $param = 0, $orderBy = '', $recTotal = 0, $recPerPage = 20, $pageID = 1)
public function browse($productID = 0, $branch = '', $browseType = 'unclosed', $param = 0, $orderBy = '', $recTotal = 0, $recPerPage = 20, $pageID = 1)
{
/* Set browseType, productID, moduleID and queryID. */
$browseType = strtolower($browseType);
$productID = $this->product->saveState($productID, $this->products);
if($branch === '') $branch = $this->session->branch;
$moduleID = ($browseType == 'bymodule') ? (int)$param : 0;
$queryID = ($browseType == 'bysearch') ? (int)$param : 0;
@@ -122,7 +123,7 @@ class bug extends control
$this->config->bug->search['params']['plan']['values'] = $this->loadModel('productplan')->getPairs($productID);
$this->config->bug->search['params']['module']['values'] = $this->tree->getOptionMenu($productID, $viewType = 'bug', $startModuleID = 0);
$this->config->bug->search['params']['project']['values'] = $this->product->getProjectPairs($productID);
$this->config->bug->search['params']['openedBuild']['values'] = $this->loadModel('build')->getProductBuildPairs($productID);
$this->config->bug->search['params']['openedBuild']['values'] = $this->loadModel('build')->getProductBuildPairs($productID, 0, $params = '');
$this->config->bug->search['params']['resolvedBuild']['values'] = $this->config->bug->search['params']['openedBuild']['values'];
if($this->session->currentProductType == 'normal')
{
@@ -141,7 +142,7 @@ class bug extends control
/* Process the openedBuild and resolvedBuild fields. */
$productIdList = array();
foreach($bugs as $bug) $productIdList[$bug->id] = $bug->product;
$builds = $this->loadModel('build')->getProductBuildPairs(array_unique($productIdList));
$builds = $this->loadModel('build')->getProductBuildPairs(array_unique($productIdList), 0, $params = '');
foreach($bugs as $key => $bug)
{
$openBuildIdList = explode(',', $bug->openedBuild);
@@ -166,7 +167,7 @@ class bug extends control
$this->view->productID = $productID;
$this->view->productName = $this->products[$productID];
$this->view->builds = $this->loadModel('build')->getProductBuildPairs($productID);
$this->view->moduleTree = $this->tree->getTreeMenu($productID, $viewType = 'bug', $startModuleID = 0, array('treeModel', 'createBugLink'));
$this->view->moduleTree = $this->tree->getTreeMenu($productID, $viewType = 'bug', $startModuleID = 0, array('treeModel', 'createBugLink'), '', $branch);
$this->view->browseType = $browseType;
$this->view->bugs = $bugs;
$this->view->users = $users;
@@ -228,7 +229,7 @@ class bug extends control
* @access public
* @return void
*/
public function create($productID, $branch = 0, $extras = '')
public function create($productID, $branch = '', $extras = '')
{
$this->view->users = $this->user->getPairs('nodeleted|devfirst|noclosed');
if(empty($this->products)) $this->locate($this->createLink('product', 'create'));
@@ -265,6 +266,7 @@ class bug extends control
/* Get product, then set menu. */
$productID = $this->product->saveState($productID, $this->products);
if($branch === '') $branch = $this->session->branch;
$branches = $this->session->currentProductType == 'normal' ? array() : $this->loadModel('branch')->getPairs($productID);
$this->bug->setMenu($this->products, $productID, $branch);
@@ -386,7 +388,7 @@ class bug extends control
* @access public
* @return void
*/
public function batchCreate($productID, $branch = 0, $projectID = 0, $moduleID = 0)
public function batchCreate($productID, $branch = '', $projectID = 0, $moduleID = 0)
{
if(!empty($_POST))
{
@@ -397,6 +399,7 @@ class bug extends control
/* Get product, then set menu. */
$productID = $this->product->saveState($productID, $this->products);
if($branch === '') $branch = $this->session->branch;
$this->bug->setMenu($this->products, $productID, $branch);
/* If projectID is setted, get builds and stories of this project. */
@@ -441,6 +444,7 @@ class bug extends control
$this->view->moduleOptionMenu = $this->tree->getOptionMenu($productID, $viewType = 'bug', $startModuleID = 0, $branch);
$this->view->moduleID = $moduleID;
$this->view->branch = $branch;
$this->view->branches = $this->loadModel('branch')->getPairs($productID);
$this->display();
}
@@ -486,7 +490,7 @@ class bug extends control
$this->view->branchName = $this->session->currentProductType == 'normal' ? '' : $this->loadModel('branch')->getById($bug->branch);
$this->view->users = $this->user->getPairs('noletter');
$this->view->actions = $this->action->getList('bug', $bugID);
$this->view->builds = $this->loadModel('build')->getProductBuildPairs($productID);
$this->view->builds = $this->loadModel('build')->getProductBuildPairs($productID, $branch = 0, $params = '');
$this->view->preAndNext = $this->loadModel('common')->getPreAndNextObject('bug', $bugID);
$this->display();
+51 -13
View File
@@ -332,13 +332,16 @@ class bugModel extends model
*/
public function getActiveAndPostponedBugs($products, $projectID, $pager = null)
{
return $this->dao->select('*')->from(TABLE_BUG)
->where("((status = 'resolved' AND resolution = 'postponed') OR (status = 'active'))")
->andWhere('toTask')->eq(0)
->andWhere('toStory')->eq(0)
->beginIF(!empty($products))->andWhere('product')->in($products)->fi()
->beginIF(empty($products))->andWhere('project')->eq($projectID)->fi()
->andWhere('deleted')->eq(0)
return $this->dao->select('t1.*')->from(TABLE_BUG)->alias('t1')
->leftJoin(TABLE_PROJECTPRODUCT)->alias('t2')->on('t1.product = t2.product')
->where("((t1.status = 'resolved' AND t1.resolution = 'postponed') OR (t1.status = 'active'))")
->andWhere('t1.toTask')->eq(0)
->andWhere('t1.toStory')->eq(0)
->beginIF(!empty($products))->andWhere('t1.product')->in($products)->fi()
->beginIF(empty($products))->andWhere('t1.project')->eq($projectID)->fi()
->andWhere('t2.project')->eq($projectID)
->andWhere("(t2.branch = '0' OR t1.branch = '0' OR t2.branch = t1.branch)")
->andWhere('t1.deleted')->eq(0)
->orderBy('id desc')
->page($pager)
->fetchAll();
@@ -613,10 +616,7 @@ class bugModel extends model
->remove('comment,files,labels')
->get();
if($bug->resolvedBuild != 'trunk')
{
$bug->testtask = $this->dao->select('id')->from(TABLE_TESTTASK)->where('build')->eq($bug->resolvedBuild)->orderBy('id_desc')->limit(1)->fetch('id');
}
if($bug->resolvedBuild != 'trunk') $bug->testtask = $this->dao->select('id')->from(TABLE_TESTTASK)->where('build')->eq($bug->resolvedBuild)->orderBy('id_desc')->limit(1)->fetch('id');
$this->dao->update(TABLE_BUG)->data($bug)
->autoCheck()
@@ -625,6 +625,9 @@ class bugModel extends model
->checkIF($bug->resolution == 'fixed', 'resolvedBuild','notempty')
->where('id')->eq((int)$bugID)
->exec();
/* Link bug to build and release. */
$this->linkBugToBuild($bugID, $bug->resolvedBuild);
}
/**
@@ -649,9 +652,10 @@ class bugModel extends model
$modules = array();
while($module = $stmt->fetch()) $modules[$module->id] = $module;
foreach($bugIDList as $bugID)
foreach($bugIDList as $i => $bugID)
{
$oldBug = $bugs[$bugID];
if($oldBug->resolution == 'fixed' and $oldBug->resolvedBuild != $resolvedBuild) unset($bugIDList[$i]);
if($oldBug->status != 'active') continue;
$assignedTo = $oldBug->openedBy;
@@ -685,6 +689,9 @@ class bugModel extends model
$this->dao->update(TABLE_BUG)->data($bug)->where('id')->eq($bugID)->exec();
}
/* Link bug to build and release. */
$this->linkBugToBuild($bugIDList, $resolvedBuild);
}
/**
@@ -1041,7 +1048,7 @@ class bugModel extends model
{
$datas = $this->dao->select('openedBuild as name, count(openedBuild) as value')->from(TABLE_BUG)->where($this->reportCondition())->groupBy('openedBuild')->orderBy('value DESC')->fetchAll('name');
if(!$datas) return array();
$builds = $this->loadModel('build')->getProductBuildPairs($this->session->product);
$builds = $this->loadModel('build')->getProductBuildPairs($this->session->product, $branch = 0, $params = '');
/* Deal with the situation that a bug maybe associate more than one openedBuild. */
foreach($datas as $buildIDList => $data)
@@ -1695,4 +1702,35 @@ class bugModel extends model
}
return true;
}
/**
* Link bug to build and release
*
* @param string|array $bugs
* @param int $resolvedBuild
* @access public
* @return bool
*/
public function linkBugToBuild($bugs, $resolvedBuild)
{
if(empty($resolvedBuild) or $resolvedBuild == 'trunk') return true;
if(is_array($bugs)) $bugs = join(',', $bugs);
$buildBugs = $this->dao->select('bugs')->from(TABLE_BUILD)->where('id')->eq($resolvedBuild)->fetch('bugs');
$buildBugs .= ',' . $bugs;
$buildBugs = explode(',', trim($buildBugs, ','));
$buildBugs = array_unique($buildBugs);
$this->dao->update(TABLE_BUILD)->set('bugs')->eq(join(',', $buildBugs))->where('id')->eq($resolvedBuild)->exec();
$release = $this->dao->select('id,bugs')->from(TABLE_RELEASE)->where('build')->eq($resolvedBuild)->andWhere('deleted')->eq('0')->fetch();
if($release)
{
$releaseBugs = $release->bugs .',' . $bugs;
$releaseBugs = explode(',', trim($releaseBugs, ','));
$releaseBugs = array_unique($releaseBugs);
$this->dao->update(TABLE_RELEASE)->set('bugs')->eq(join(',', $releaseBugs))->where('id')->eq($release->id)->exec();
}
return true;
}
}
+5 -1
View File
@@ -14,7 +14,11 @@
<div id='titlebar'>
<div class='heading'>
<span class='prefix'><?php echo html::icon($lang->icons['bug']);?></span>
<strong><small class='text-muted'><?php echo html::icon($lang->icons['batchCreate']);?></small> <?php echo $lang->bug->common . $lang->colon . $lang->bug->batchCreate;?></strong>
<strong>
<small class='text-muted'><?php echo html::icon($lang->icons['batchCreate']);?></small>
<?php if($this->session->currentProductType !== 'normal') echo '<span class="label label-info">' . $branches[$branch] . '</span>';?>
<?php echo $lang->bug->common . $lang->colon . $lang->bug->batchCreate;?>
</strong>
<div class='actions'>
<?php if(common::hasPriv('file', 'uploadImages')) echo html::a($this->createLink('file', 'uploadImages', 'module=bug&params=' . helper::safe64Encode("productID=$productID&projectID=$projectID&moduleID=$moduleID")), $lang->uploadImages, '', "data-toggle='modal' data-type='iframe' class='btn' data-width='600px'")?>
<?php echo html::commonButton($lang->pasteText, "data-toggle='myModal'")?>
+1 -1
View File
@@ -67,7 +67,7 @@ js::set('moduleID', $moduleID);
<div class='side-body'>
<div class='panel panel-sm'>
<div class='panel-heading nobr'>
<?php echo html::icon($lang->icons['product']);?> <strong><?php echo $productName;?></strong>
<?php echo html::icon($lang->icons['product']);?> <strong><?php echo $branch ? $branches[$branch] : $productName;?></strong>
</div>
<div class='panel-body'>
<?php echo $moduleTree;?>
+3 -33
View File
@@ -106,7 +106,8 @@ class build extends control
$this->view->position[] = $this->lang->build->edit;
$this->view->productGroups = $productGroups;
$this->view->products = $products;
$this->view->branches = $build->productType == 'normal' ? array() : $this->loadModel('branch')->getPairs($build->product);
$this->view->product = isset($productGroups[$build->product]) ? $productGroups[$build->product] : '';
$this->view->branches = (isset($productGroups[$build->product]) and $productGroups[$build->product]->type == 'normal') ? array() : $this->loadModel('branch')->getPairs($build->product);
$this->view->build = $build;
$this->view->users = $this->loadModel('user')->getPairs('nodeleted', $build->builder);
$this->view->orderBy = $orderBy;
@@ -255,37 +256,6 @@ class build extends control
if($varName == 'testTaskBuild') die(html::select('build', $this->build->getProjectBuildPairs($projectID, $productID, $branch, 'noempty'), $build, "class='form-control'"));
}
/**
* AJAX: get builds of a branch in html select.
*
* @param int $productID
* @param int $branchID
* @param string $operation the operation of creating a release or editing.
* @param string $build build to selected.
* @access public
* @return string
*/
public function ajaxGetBranchBuilds($productID, $branchID, $operation, $build = '')
{
$builds = $this->build->getProductBuildPairs($productID, $branchID, 'notrunk', false);
$releasedBuilds = $this->loadModel('release')->getReleaseBuilds($productID, $branchID);
if($operation == 'editRelease')
{
foreach($releasedBuilds as $buildID)
{
if($build == $buildID) continue;
unset($builds[$buildID]);
}
}
if($operation == 'createRelease')
{
foreach($releasedBuilds as $buildID) unset($builds[$buildID]);
}
die(html::select('build', $builds, $build, "class='form-control'"));
}
/**
* Link stories
*
@@ -415,7 +385,7 @@ class build extends control
$this->config->bug->search['params']['plan']['values'] = $this->loadModel('productplan')->getForProducts(array($build->product => $build->product));
$this->config->bug->search['params']['module']['values'] = $this->loadModel('tree')->getOptionMenu($build->product, $viewType = 'bug', $startModuleID = 0);
$this->config->bug->search['params']['project']['values'] = $this->loadModel('product')->getProjectPairs($build->product);
$this->config->bug->search['params']['openedBuild']['values'] = $this->build->getProductBuildPairs($build->product);
$this->config->bug->search['params']['openedBuild']['values'] = $this->build->getProductBuildPairs($build->product, $branch = 0, $params = '');
$this->config->bug->search['params']['resolvedBuild']['values'] = $this->config->bug->search['params']['openedBuild']['values'];
unset($this->config->bug->search['fields']['branch']);
unset($this->config->bug->search['params']['branch']);
-1
View File
@@ -2,5 +2,4 @@
.contentDiv .panel-heading {line-height: 14px;}
.red {color:red}
.green {color:green}
#unlinkBugList, #unlinkStoryList{margin-bottom:5px;}
input[type=checkbox].ml-10px{margin-left:10px;}
+2 -1
View File
@@ -1,4 +1,5 @@
.tabs{position:relative;}
.tabs .tab-content{padding:0px;border:0px;}
.tabs .tab-content .tab-pane .action{position: absolute; right: 0px; top: 0px;}
.tabs .tab-content .tab-pane #querybox{margin:0px}
.tabs .tab-content .tab-pane #querybox{margin:0px; border-right:1px solid #ddd; border-left:1px solid #ddd;}
.tabs .tab-content .tab-pane #querybox form{padding-left:0px;}
+18 -21
View File
@@ -45,10 +45,11 @@ class buildModel extends model
*/
public function getProjectBuilds($projectID)
{
return $this->dao->select('t1.*, t2.name as projectName, t3.name as productName')
return $this->dao->select('t1.*, t2.name as projectName, t3.name as productName, t4.name as branchName')
->from(TABLE_BUILD)->alias('t1')
->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project = t2.id')
->leftJoin(TABLE_PRODUCT)->alias('t3')->on('t1.product = t3.id')
->leftJoin(TABLE_BRANCH)->alias('t4')->on('t1.branch = t4.id')
->where('t1.project')->eq((int)$projectID)
->andWhere('t1.deleted')->eq(0)
->orderBy('t1.date DESC, t1.id desc')
@@ -70,23 +71,21 @@ class buildModel extends model
if(strpos($params, 'noempty') === false) $sysBuilds = array('' => '');
if(strpos($params, 'notrunk') === false) $sysBuilds = $sysBuilds + array('trunk' => 'Trunk');
$projectBuilds = $this->dao->select('t1.id, t1.name, t3.status as releaseStatus')->from(TABLE_BUILD)->alias('t1')
$projectBuilds = $this->dao->select('t1.id, t1.name, t4.name as branchName')->from(TABLE_BUILD)->alias('t1')
->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project = t2.id')
->leftJoin(TABLE_RELEASE)->alias('t3')->on('t1.id = t3.build')
->leftJoin(TABLE_BRANCH)->alias('t4')->on('t1.branch = t4.id')
->where('t1.project')->eq((int)$projectID)
->beginIF($productID)->andWhere('t1.product')->eq((int)$productID)->fi()
->beginIF($branch)->andWhere('t1.branch')->eq($branch)->fi()
->beginIF(strpos($params, 'nodone') !== false)->andWhere('t2.status')->ne('done')->fi()
->beginIF(strpos($params, 'noterminate') !== false)->andWhere('t3.status')->ne('terminate')->fi()
->andWhere('t1.deleted')->eq(0)
->orderBy('t1.date desc, t1.id desc')->fetchAll('id');
/* Set builds and filter terminate releases. */
$builds = array();
foreach($projectBuilds as $buildID => $build)
{
if((strpos($params, 'noterminate') !== false) and ($build->releaseStatus === 'terminate')) continue;
$builds[$buildID] = $build->name;
}
foreach($projectBuilds as $buildID => $build) $builds[$buildID] = $build->name;
if(!$builds) return $sysBuilds;
/* if the build has been released, replace build name with release name. */
@@ -108,39 +107,37 @@ class buildModel extends model
* @access public
* @return string
*/
public function getProductBuildPairs($products, $branch = 0, $params = '', $replace = true)
public function getProductBuildPairs($products, $branch = 0, $params = 'noterminate, nodone', $replace = true)
{
$sysBuilds = array();
if(strpos($params, 'noempty') === false) $sysBuilds = array('' => '');
if(strpos($params, 'notrunk') === false) $sysBuilds = $sysBuilds + array('trunk' => 'Trunk');
$productBuilds = $this->dao->select('t1.id, t1.name, t1.project, t2.status as projectStatus, t3.status as releaseStatus')->from(TABLE_BUILD)->alias('t1')
$productBuilds = $this->dao->select('t1.id, t1.name, t1.project, t4.name as branchName')->from(TABLE_BUILD)->alias('t1')
->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project = t2.id')
->leftJoin(TABLE_RELEASE)->alias('t3')->on('t1.id = t3.build')
->leftJoin(TABLE_BRANCH)->alias('t4')->on('t1.branch = t4.id')
->where('t1.product')->in($products)
->beginIF($branch)->andWhere('t1.branch')->eq($branch)->fi()
->beginIF(strpos($params, 'nodone') !== false)->andWhere('t2.status')->ne('none')->fi()
->beginIF(strpos($params, 'noterminate') !== false)->andWhere('t3.status')->ne('terminate')->fi()
->andWhere('t1.deleted')->eq(0)
->orderBy('t1.date desc, t1.id desc')->fetchAll('id');
/* Set builds and filter done projects and terminate releases. */
$builds = array();
foreach($productBuilds as $key => $build)
{
if((strpos($params, 'nodone') !== false) and ($build->projectStatus === 'done')) continue;
if((strpos($params, 'noterminate') !== false) and ($build->releaseStatus === 'terminate')) continue;
$builds[$key] = $build->name;
}
foreach($productBuilds as $key => $build) $builds[$key] = ((strpos($params, 'withbranch') !== false and $build->branchName) ? $build->branchName . '/' : '') . $build->name;
if(!$builds) return $sysBuilds;
/* if the build has been released and replace is true, replace build name with release name. */
$releases = $this->dao->select('build, name')->from(TABLE_RELEASE)
->where('build')->in(array_keys($builds))
->beginIF($branch)->andWhere('branch')->in("0,$branch")->fi()
->andWhere('deleted')->eq(0)
->fetchPairs('');
if($replace)
{
foreach($releases as $buildID => $releaseName) $builds[$buildID] = $releaseName;
$releases = $this->dao->select('build, name')->from(TABLE_RELEASE)
->where('build')->in(array_keys($builds))
->beginIF($branch)->andWhere('branch')->in("0,$branch")->fi()
->andWhere('deleted')->eq(0)
->fetchPairs();
foreach($releases as $buildID => $releaseName) $builds[$buildID] = ((strpos($params, 'withbranch') !== false and $productBuilds[$buildID]->branchName) ? $productBuilds[$buildID]->branchName . '/' : '') . $releaseName;
}
return $sysBuilds + $builds;
+7 -1
View File
@@ -28,7 +28,13 @@
<td class='w-p25-f'>
<div class='input-group'>
<?php echo html::select('product', $products, $build->product, "onchange='loadBranches(this.value);' class='form-control chosen'");?>
<?php if($build->productType != 'normal') echo html::select('branch', $branches, $build->branch, "class='form-control' style='width:100px'");?>
<?php
if($build->productType != 'normal')
{
if($product->branch) $branches = array($product->branch => $branches[$product->branch]);
echo html::select('branch', $branches, $build->branch, "class='form-control' style='width:100px'");
}
?>
</div>
</td><td></td>
</tr>
+1 -1
View File
@@ -177,7 +177,7 @@ $lang->product->menu->plan = array('link' => '計劃|productplan|browse|produ
$lang->product->menu->release = array('link' => '發佈|release|browse|productID=%s', 'subModule' => 'release');
$lang->product->menu->roadmap = '路線圖|product|roadmap|productID=%s';
$lang->product->menu->doc = array('link' => '文檔|product|doc|productID=%s', 'subModule' => 'doc');
$lang->product->menu->branch = '分支|branch|manage|productID=%s';
$lang->product->menu->branch = '%branch%|branch|manage|productID=%s';
$lang->product->menu->module = '模組|tree|browse|productID=%s&view=story';
$lang->product->menu->view = array('link' => '概況|product|view|productID=%s', 'alias' => 'edit');
$lang->product->menu->project = "{$lang->projectCommon}|product|project|status=all&productID=%s";
+2 -2
View File
@@ -159,8 +159,8 @@ class commonModel extends model
if(stripos($method, 'downnotify') !== false) return true;
}
if(stripos($method, 'ajaxgetdropmenu') !== false and $this->app->user->account == 'guest') return true;
if(stripos($method, 'ajaxgetmatcheditems') !== false and $this->app->user->account == 'guest') return true;
if(stripos($method, 'ajaxgetdropmenu') !== false) return true;
if(stripos($method, 'ajaxgetmatcheditems') !== false) return true;
if($method == 'ajaxgetdetail' and $this->app->viewType == 'mhtml') return true;
if($module == 'misc' and $method == 'qrcode') return true;
if($module == 'misc' and $method == 'about') return true;
+1 -1
View File
@@ -87,7 +87,7 @@ js::set('confirmDelete', $lang->user->confirmDelete);
{
common::printIcon('user', 'unlock', "userID=$user->account", '', 'list', '', "hiddenwin");
}
if($user->bindRanzhi) common::printIcon('user', 'unbind', "userID=$user->account", '', 'list', 'unlink', "hiddenwin");
if($user->ranzhi) common::printIcon('user', 'unbind', "userID=$user->account", '', 'list', 'unlink', "hiddenwin");
?>
</td>
</tr>
+8
View File
@@ -38,6 +38,14 @@ class custom extends control
$this->app->loadLang($module);
$this->app->loadConfig('story');
$fieldList = $this->lang->$module->$field;
if($module == 'bug' and $field == 'typeList')
{
unset($fieldList['designchange']);
unset($fieldList['newfeature']);
unset($fieldList['trackthings']);
}
if(!empty($_POST))
{
if($module == 'story' && $field == 'review')
+1 -1
View File
@@ -48,7 +48,7 @@ $lang->group->copyOptions['copyPriv'] = 'Copy priviledge';
$lang->group->copyOptions['copyUser'] = 'Copy user';
$lang->group->versions[''] = 'History';
$lang->group->versions['7_4'] = 'Zentao 7.4';
$lang->group->versions['7_4_beta'] = 'Zentao 7.4.beta';
$lang->group->versions['7_3'] = 'Zentao 7.3';
$lang->group->versions['7_2'] = 'Zentao 7.2';
$lang->group->versions['7_1'] = 'Zentao 7.1';
+7 -4
View File
@@ -78,6 +78,7 @@ $lang->resource->my->profile = 'profile';
$lang->resource->my->dynamic = 'dynamic';
$lang->resource->my->editProfile = 'editProfile';
$lang->resource->my->changePassword = 'changePassword';
$lang->resource->my->unbind = 'unbind';
$lang->my->methodOrder[0] = 'index';
$lang->my->methodOrder[5] = 'todo';
@@ -91,6 +92,7 @@ $lang->my->methodOrder[40] = 'profile';
$lang->my->methodOrder[45] = 'dynamic';
$lang->my->methodOrder[50] = 'editProfile';
$lang->my->methodOrder[55] = 'changePassword';
$lang->my->methodOrder[60] = 'unbind';
/* Todo. */
$lang->resource->todo = new stdclass();
@@ -1103,7 +1105,8 @@ $lang->changelog['7.3'][] = 'cron-openProcess';
$lang->changelog['7.3'][] = 'mail-sendCloud';
$lang->changelog['7.3'][] = 'mail-sendcloudUser';
$lang->changelog['7.4'][] = 'release-changeStatus';
$lang->changelog['7.4'][] = 'user-unbind';
$lang->changelog['7.4'][] = 'branch-manage';
$lang->changelog['7.4'][] = 'branch-delete';
$lang->changelog['7.4.beta'][] = 'release-changeStatus';
$lang->changelog['7.4.beta'][] = 'user-unbind';
$lang->changelog['7.4.beta'][] = 'branch-manage';
$lang->changelog['7.4.beta'][] = 'branch-delete';
$lang->changelog['7.4.beta'][] = 'my-unbind';
+1 -1
View File
@@ -48,7 +48,7 @@ $lang->group->copyOptions['copyPriv'] = '复制权限';
$lang->group->copyOptions['copyUser'] = '复制用户';
$lang->group->versions[''] = '修改历史';
$lang->group->versions['7_4'] = '禅道7.4';
$lang->group->versions['7_4_beta'] = '禅道7.4.beta';
$lang->group->versions['7_3'] = '禅道7.3';
$lang->group->versions['7_2'] = '禅道7.2';
$lang->group->versions['7_1'] = '禅道7.1';
+1
View File
@@ -48,6 +48,7 @@ $lang->group->copyOptions['copyPriv'] = '複製權限';
$lang->group->copyOptions['copyUser'] = '複製用戶';
$lang->group->versions[''] = '修改歷史';
$lang->group->versions['7_4_beta'] = '禪道7.4.beta';
$lang->group->versions['7_3'] = '禪道7.3';
$lang->group->versions['7_2'] = '禪道7.2';
$lang->group->versions['7_1'] = '禪道7.1';
+21
View File
@@ -465,4 +465,25 @@ class my extends control
$this->display();
}
/**
* Unbind ranzhi
*
* @param string $confirm
* @access public
* @return void
*/
public function unbind($confirm = 'no')
{
$this->loadModel('user');
if($confirm == 'no')
{
die(js::confirm($this->lang->user->confirmUnbind, $this->createLink('my', 'unbind', "confirm=yes")));
}
else
{
$this->user->unbind($this->app->user->account);
die(js::locate($this->createLink('my', 'profile'), 'parent'));
}
}
}
+1
View File
@@ -15,6 +15,7 @@ $lang->my->profile = 'Profile';
$lang->my->dynamic = 'Dynamic';
$lang->my->editProfile = 'Edit profile';
$lang->my->changePassword = 'Change password';
$lang->my->unbind = 'Unbind ranzhi';
$lang->my->taskMenu = new stdclass();
$lang->my->taskMenu->assignedToMe = 'To me';
+1
View File
@@ -15,6 +15,7 @@ $lang->my->profile = '我的档案';
$lang->my->dynamic = '我的动态';
$lang->my->editProfile = '修改档案';
$lang->my->changePassword = '修改密码';
$lang->my->unbind = '解除然之绑定';
$lang->my->taskMenu = new stdclass();
$lang->my->taskMenu->assignedToMe = '指派给我';
+1
View File
@@ -15,6 +15,7 @@ $lang->my->profile = '我的檔案';
$lang->my->dynamic = '我的動態';
$lang->my->editProfile = '修改檔案';
$lang->my->changePassword = '修改密碼';
$lang->my->unbind = '解除然之綁定';
$lang->my->taskMenu = new stdclass();
$lang->my->taskMenu->assignedToMe = '指派給我';
+9
View File
@@ -114,6 +114,15 @@
<th><?php echo $lang->user->zipcode;?></th>
<td><?php echo $user->zipcode;?></td>
</tr>
<?php if($user->ranzhi):?>
<tr>
<th><?php echo $lang->user->ranzhi;?></th>
<td>
<?php echo $user->ranzhi . ' ';?>
<?php if(common::hasPriv('my', 'unbind')) echo html::a($this->createLink('my', 'unbind'), "<i class='icon-unlink'></i>", 'hiddenwin', "class='bin-icon' title='{$lang->user->unbind}'");?>
</td>
</tr>
<?php endif;?>
</table>
</div>
<?php include '../../common/view/footer.html.php';?>
+1 -1
View File
@@ -32,7 +32,7 @@
<th> <?php common::printOrderLink('build', $orderBy, $vars, $lang->testtask->build);?></th>
<th class='w-80px'><?php common::printOrderLink('begin', $orderBy, $vars, $lang->testtask->begin);?></th>
<th class='w-80px'><?php common::printOrderLink('end', $orderBy, $vars, $lang->testtask->end);?></th>
<th class='w-50px'><?php common::printOrderLink('status', $orderBy, $vars, $lang->statusAB);?></th>
<th class='w-80px'><?php common::printOrderLink('status', $orderBy, $vars, $lang->statusAB);?></th>
<th class='w-100px'><?php echo $lang->actions;?></th>
</tr>
</thead>
+1
View File
@@ -90,6 +90,7 @@ $lang->product->typeList['normal'] = '正常';
$lang->product->typeList['branch'] = '多分支';
$lang->product->typeList['platform'] = '多平台';
$lang->product->branchName['normal'] = '';
$lang->product->branchName['branch'] = '分支';
$lang->product->branchName['platform'] = '平台';
+3 -3
View File
@@ -295,7 +295,7 @@ class productplan extends control
}
else
{
$allStories = $this->story->getProductStories($this->view->product->id, $plan->branch, $moduleID = '0', $status = 'draft,active,changed');
$allStories = $this->story->getProductStories($this->view->product->id, $plan->branch ? "0,{$plan->branch}" : 0, $moduleID = '0', $status = 'draft,active,changed');
}
$this->view->allStories = $allStories;
@@ -395,8 +395,8 @@ class productplan extends control
$this->config->bug->search['params']['plan']['values'] = $this->productplan->getForProducts(array($plan->product => $plan->product));
$this->config->bug->search['params']['module']['values'] = $this->loadModel('tree')->getOptionMenu($productID, $viewType = 'bug', $startModuleID = 0);
$this->config->bug->search['params']['project']['values'] = $this->product->getProjectPairs($productID);
$this->config->bug->search['params']['openedBuild']['values'] = $this->loadModel('build')->getProductBuildPairs($productID);
$this->config->bug->search['params']['resolvedBuild']['values'] = $this->build->getProductBuildPairs($productID);
$this->config->bug->search['params']['openedBuild']['values'] = $this->loadModel('build')->getProductBuildPairs($productID, $branch = 0, $params = '');
$this->config->bug->search['params']['resolvedBuild']['values'] = $this->build->getProductBuildPairs($productID, $branch = 0, $params = '');
$this->loadModel('search')->setSearchParams($this->config->bug->search);
if($browseType == 'bySearch')
+1 -1
View File
@@ -264,7 +264,7 @@ class productplanModel extends model
public function unlinkBug($bugID)
{
$planID = $this->dao->findByID($bugID)->from(TABLE_BUG)->fetch('plan');
$this->dao->update(TABLE_STORY)->set('plan')->eq(0)->where('id')->eq((int)$bugID)->exec();
$this->dao->update(TABLE_BUG)->set('plan')->eq(0)->where('id')->eq((int)$bugID)->exec();
$this->loadModel('action')->create('bug', $bugID, 'unlinkedfromplan', '', $planID);
}
}
+5 -7
View File
@@ -15,8 +15,8 @@
<div id='titlebar'>
<div class='heading'>
<i class='icon-flag'></i>
<?php if($product->type !== 'normal') echo '<span class="label label-info label-badge">' . $branches[$branch] . '</span>';?>
<?php echo $lang->productplan->browse;?>
<?php if($product->type !== 'normal') echo '<span class="label label-info">' . $branches[$branch] . '</span>';?>
</div>
<div class='actions'>
<?php common::printIcon('productplan', 'create', "productID=$product->id&branch=$branch", '', 'button', 'plus');?>
@@ -29,10 +29,9 @@
<tr class='colhead'>
<th class='w-id'> <?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?></th>
<th> <?php common::printOrderLink('title', $orderBy, $vars, $lang->productplan->title);?></th>
<th class='w-p50'> <?php common::printOrderLink('desc', $orderBy, $vars, $lang->productplan->desc);?></th>
<th class='w-100px'> <?php common::printOrderLink('begin', $orderBy, $vars, $lang->productplan->begin);?></th>
<th class='w-100px'> <?php common::printOrderLink('end', $orderBy, $vars, $lang->productplan->end);?></th>
<th class="w-110px {sorter: false}"><?php echo $lang->actions;?></th>
<th class='w-120px'> <?php common::printOrderLink('begin', $orderBy, $vars, $lang->productplan->begin);?></th>
<th class='w-120px'> <?php common::printOrderLink('end', $orderBy, $vars, $lang->productplan->end);?></th>
<th class="w-120px {sorter: false}"><?php echo $lang->actions;?></th>
</tr>
</thead>
<tbody>
@@ -43,7 +42,6 @@
<?php echo $plan->id;?>
</td>
<td class='text-left' title="<?php echo $plan->title?>"><?php echo html::a(inlink('view', "id=$plan->id"), $plan->title);?></td>
<td class='text-left content'><div class='article-content'><?php echo $plan->desc;?></div></td>
<td><?php echo $plan->begin;?></td>
<td><?php echo $plan->end;?></td>
<td class='text-center'>
@@ -64,7 +62,7 @@
</tbody>
<tfoot>
<tr>
<td colspan='6'>
<td colspan='5'>
<?php echo html::selectButton();?>
<?php if(common::hasPriv('productplan', 'batchEdit')) echo html::submitButton($lang->edit);?>
<?php $pager->show();?>
+2 -2
View File
@@ -120,7 +120,7 @@
echo "<div class='btn-group'>" . html::selectButton() . '</div>';
echo "<div class='btn-group dropup'>";
$actionLink = inlink('batchUnlinkStory', "planID=$plan->id&orderBy=$orderBy");
echo html::commonButton($lang->productplan->unlinkStory, ($canBatchUnlink ? '' : 'disabled') . "onclick=\"setFormAction('$actionLink')\"");
echo html::commonButton($lang->productplan->unlinkStory, ($canBatchUnlink ? '' : 'disabled') . "onclick=\"setFormAction('$actionLink', '', this)\"");
echo "<button type='button' class='btn dropdown-toggle' data-toggle='dropdown'><span class='caret'></span></button>";
echo "<ul class='dropdown-menu'>";
echo "<li class='dropdown-submenu'>";
@@ -135,7 +135,7 @@
foreach($plans as $planID => $planName)
{
$actionLink = $this->createLink('story', 'batchChangePlan', "planID=$planID&oldPlanID=$plan->id");
echo "<li class='option' data-key='$planID'>" . html::a('#', $planName, '', "onclick=\"setFormAction('$actionLink', 'hiddenwin')\"") . "</li>";
echo "<li class='option' data-key='$planID'>" . html::a('#', $planName, '', "onclick=\"setFormAction('$actionLink', 'hiddenwin', this)\"") . "</li>";
}
if($withSearch) echo "<li class='menu-search'><div class='input-group input-group-sm'><input type='text' class='form-control' placeholder=''><span class='input-group-addon'><i class='icon-search'></i></span></div></li>";
echo '</ul>';
+9 -4
View File
@@ -351,21 +351,24 @@ class project extends control
die(js::locate(inlink('importTask', "toProject=$toProject&fromProject=$fromProject"), 'parent'));
}
$project = $this->commonAction($toProject);
$projects = $this->project->getProjectsToImport();
$project = $this->commonAction($toProject);
$branches = $this->project->getProjectBranches($toProject);
$tasks = $this->project->getTasks2Imported($branches);
$projects = $this->project->getProjectsToImport(array_keys($tasks));
unset($projects[$toProject]);
unset($tasks[$toProject]);
if($fromProject == 0)
{
$tasks2Imported = array();
foreach($projects as $id => $projectName)
{
$tasks2Imported = array_merge($tasks2Imported, $this->project->getTasks2Imported($id));
$tasks2Imported = array_merge($tasks2Imported, $tasks[$id]);
}
}
else
{
$tasks2Imported = $this->project->getTasks2Imported($fromProject);
$tasks2Imported = $tasks[$fromProject];
}
/* Save session. */
@@ -506,6 +509,7 @@ class project extends control
unset($this->config->bug->search['fields']['resolvedBuild']);
unset($this->config->bug->search['fields']['resolvedDate']);
unset($this->config->bug->search['fields']['closedDate']);
unset($this->config->bug->search['fields']['branch']);
unset($this->config->bug->search['params']['resolvedBy']);
unset($this->config->bug->search['params']['closedBy']);
unset($this->config->bug->search['params']['status']);
@@ -516,6 +520,7 @@ class project extends control
unset($this->config->bug->search['params']['resolvedBuild']);
unset($this->config->bug->search['params']['resolvedDate']);
unset($this->config->bug->search['params']['closedDate']);
unset($this->config->bug->search['params']['branch']);
$this->loadModel('search')->setSearchParams($this->config->bug->search);
/* Assign. */
+14
View File
@@ -31,3 +31,17 @@ $(function()
$('#importTeams a').click(function(){importTeam($(this).data('id')); $('#importTeamModal').modal('hide')});
});
function addItem()
{
var item = $('#addItem').html().replace(/%i%/g, i);
$('#submit').before('<tr class="addedItem">' + item + '</tr>');
var accounts = $('#submit').closest('table').find('tr.addedItem:last').find('select:first')
accounts.trigger('liszt:updated');
accounts.chosen(defaultChosenOptions);
i ++;
}
function deleteItem(obj)
{
$(obj).closest('.addedItem').remove();
}
+31 -14
View File
@@ -800,17 +800,16 @@ class projectModel extends model
/**
* Get projects to import
*
*
* @param array $projectIds
* @access public
* @return void
* @return array
*/
public function getProjectsToImport()
public function getProjectsToImport($projectIds)
{
$projects = $this->dao->select('distinct t1.*')->from(TABLE_PROJECT)->alias('t1')
->leftJoin(TABLE_TASK)->alias('t2')->on('t1.id=t2.project')
->where('t2.status')->notIN('done,closed')
->andWhere('t2.deleted')->eq(0)
->andWhere('t1.deleted')->eq(0)
$projects = $this->dao->select('*')->from(TABLE_PROJECT)
->where('id')->in($projectIds)
->andWhere('deleted')->eq(0)
->orderBy('id desc')
->fetchAll('id');
@@ -876,18 +875,22 @@ class projectModel extends model
}
/**
* Get rasks can be imported.
* Get tasks can be imported.
*
* @param int $projectID
* @param array $branches
* @access public
* @return array
*/
public function getTasks2Imported($fromProject)
public function getTasks2Imported($branches)
{
$this->loadModel('task');
$tasks = array();
$projectTasks = $this->task->getProjectTasks($fromProject, 'wait,doing,pause,cancel');
$tasks = array_merge($tasks, $projectTasks);
$tasks = $this->dao->select('t1.*, t2.id AS storyID, t2.title AS storyTitle, t2.version AS latestStoryVersion, t2.status AS storyStatus, t3.realname AS assignedToRealName')->from(TABLE_TASK)->alias('t1')
->leftJoin(TABLE_STORY)->alias('t2')->on('t1.story = t2.id')
->leftJoin(TABLE_USER)->alias('t3')->on('t1.assignedTo = t3.account')
->where('t1.status')->in('wait, doing, pause, cancel')
->andWhere('t1.deleted')->eq(0)
->andWhere("(t1.story = 0 OR t2.branch in ('0','" . join("','", $branches) . "'))")
->fetchGroup('project', 'id');
return $tasks;
}
@@ -1662,4 +1665,18 @@ class projectModel extends model
$this->dao->update(TABLE_PROJECT)->set('`order`')->eq($newOrder)->where('id')->eq($id)->exec();
}
}
/**
* Get branches of project.
*
* @param int $projectID
* @access public
* @return array
*/
public function getProjectBranches($projectID)
{
return $this->dao->select('product, branch')->from(TABLE_PROJECTPRODUCT)
->where('project')->eq($projectID)
->fetchPairs();
}
}
+10 -3
View File
@@ -32,7 +32,7 @@
<th><?php echo $lang->build->filePath;?></th>
<th class='w-date'><?php echo $lang->build->date;?></th>
<th class='w-user'><?php echo $lang->build->builder;?></th>
<th class='w-90px'><?php echo $lang->actions;?></th>
<th class='w-120px'><?php echo $lang->actions;?></th>
</tr>
</thead>
<tbody>
@@ -40,14 +40,21 @@
<tr class='text-center'>
<td><?php echo $build->id;?></td>
<td><?php echo $build->productName;?></td>
<td class='text-left'><?php echo html::a($this->createLink('build', 'view', "build=$build->id"), $build->name);?></td>
<td class='text-left'>
<?php if($build->branchName) echo "<span class='label label-info label-badge'>{$build->branchName}</span>"?>
<?php echo html::a($this->createLink('build', 'view', "build=$build->id"), $build->name);?>
</td>
<td class='text-left' title="<?php echo $build->scmPath?>"><?php strpos($build->scmPath, 'http') === 0 ? printf(html::a($build->scmPath)) : printf($build->scmPath);?></td>
<td class='text-left' title="<?php echo $build->filePath?>"><?php strpos($build->filePath, 'http') === 0 ? printf(html::a($build->filePath)) : printf($build->filePath);?></td>
<td><?php echo $build->date?></td>
<td><?php echo $users[$build->builder]?></td>
<td class='text-right'>
<?php
common::printIcon('testtask', 'create', "product=$build->product&project=$project->id&build=$build->id", '', 'list', 'check');
if(common::hasPriv('build', 'linkstory') and common::hasPriv('build', 'view'))
{
echo html::a($this->createLink('build', 'view', "buildID=$build->id&type=story&link=true"), "<i class='icon icon-link'></i>", '', "class='btn-icon' title='{$lang->build->linkStory}'");
}
common::printIcon('testtask', 'create', "product=$build->product&project=$project->id&build=$build->id", '', 'list', 'bullhorn');
$lang->project->bug = $lang->project->viewBug;
common::printIcon('project', 'bug', "project=$project->id&orderBy=status&build=$build->id", '', 'list');
common::printIcon('build', 'edit', "buildID=$build->id", '', 'list');
+1 -1
View File
@@ -58,7 +58,7 @@
</tbody>
<tfoot>
<tr>
<td colspan='7' class='text-left'>
<td colspan='8' class='text-left'>
<div class='table-actions clearfix'>
<?php
+33 -14
View File
@@ -32,6 +32,8 @@
<th><?php echo $lang->team->role;?></th>
<th class='w-100px'><?php echo $lang->team->days;?></th>
<th class='w-100px'><?php echo $lang->team->hours;?></th>
<th class="w-40px"> <?php echo $lang->actions;?></th>
<th class="w-40px"> <?php echo $lang->delete;?></th>
</tr>
</thead>
<?php $i = 1; $memberCount = 0;?>
@@ -47,47 +49,64 @@
<input type='hidden' name='modes[]' value='update' />
<input type='hidden' name='accounts[]' value='<?php echo $member->account;?>' />
</td>
<td><a href='javascript:;' onclick='addItem()' class='btn btn-block'><i class='icon-plus'></i></a></td>
<td><a href='javascript:;' onclick='deleteItem()' class='disabled btn btn-block'><i class='icon icon-remove'></i></a></td>
</tr>
<?php $i ++; $memberCount ++;?>
<?php endforeach;?>
<?php foreach($members2Import as $member2Import):?>
<tr>
<td><?php echo html::select("accounts[$memberCount]", $users, $member2Import->account, "class='select-2 chosen' onchange='setRole(this.value, $i)'");?></td>
<tr class='addedItem'>
<td><?php echo html::select("accounts[]", $users, $member2Import->account, "class='select-2 chosen' onchange='setRole(this.value, $i)'");?></td>
<td><input type='text' name='roles[]' id='role<?php echo $i;?>' class='form-control' value='<?php echo $member2Import->role;?>' /></td>
<td><input type='text' name='days[]' id='days<?php echo $i;?>' class='form-control' value='<?php echo $project->days?>'/></td>
<td>
<input type='text' name='hours[]' id='hours<?php echo $i;?>' class='form-control' value='<?php echo $member2Import->hours;?>' />
<input type='hidden' name='modes[]' value='create' />
</td>
<td><a href='javascript:;' onclick='addItem()' class='btn btn-block'><i class='icon-plus'></i></a></td>
<td><a href='javascript:;' onclick='deleteItem(this)' class='btn btn-block'><i class='icon icon-remove'></i></a></td>
</tr>
<?php $i ++; $memberCount ++;?>
<?php endforeach;?>
<?php
$count = count($users) - 1;
if($count > PROJECTMODEL::LINK_MEMBERS_ONE_TIME) $count = PROJECTMODEL::LINK_MEMBERS_ONE_TIME;
?>
<?php for($j = 0; $j < $count; $j ++):?>
<tr>
<td><?php echo html::select("accounts[$memberCount]", $users, '', "class='select-2 chosen' onchange='setRole(this.value, $i)'");?></td>
<td><input type='text' name='roles[]' id='role<?php echo ($i);?>' class='form-control' /></td>
<td><input type='text' name='days[]' id='days<?php echo ($i);?>' class='form-control' value='<?php echo $project->days?>'/></td>
<?php for($j = 0; $j < 5; $j ++):?>
<tr class='addedItem'>
<td><?php echo html::select("accounts[]", $users, '', "class='select-2 chosen' onchange='setRole(this.value, $i)'");?></td>
<td><input type='text' name='roles[]' id='role<?php echo ($i);?>' class='form-control' /></td>
<td><input type='text' name='days[]' id='days<?php echo ($i);?>' class='form-control' value='<?php echo $project->days?>'/></td>
<td>
<input type='text' name='hours[]' id='hours<?php echo ($i);?>' class='form-control' value='7' />
<input type='hidden' name='modes[]' value='create' />
</td>
<td><a href='javascript:;' onclick='addItem()' class='btn btn-block'><i class='icon-plus'></i></a></td>
<td><a href='javascript:;' onclick='deleteItem(this)' class='btn btn-block'><i class='icon icon-remove'></i></a></td>
</tr>
<?php $i ++; $memberCount ++;?>
<?php endfor;?>
<tr>
<td colspan='4' class='text-center'>
<?php js::set('i', $i);?>
<tr id='submit'>
<td colspan='6' class='text-center'>
<?php echo html::submitButton() ?>
</td>
</tr>
</table>
</form>
<?php $i = '%i%';?>
<table class='hidden'>
<tr id='addItem' class='hidden'>
<td><?php echo html::select("accounts[]", $users, '', "class='select-2' onchange='setRole(this.value, $i)'");?></td>
<td><input type='text' name='roles[]' id='role<?php echo ($i);?>' class='form-control' /></td>
<td><input type='text' name='days[]' id='days<?php echo ($i);?>' class='form-control' value='<?php echo $project->days?>'/></td>
<td>
<input type='text' name='hours[]' id='hours<?php echo ($i);?>' class='form-control' value='7' />
<input type='hidden' name='modes[]' value='create' />
</td>
<td><a href='javascript:;' onclick='addItem()' class='btn btn-block'><i class='icon-plus'></i></a></td>
<td><a href='javascript:;' onclick='deleteItem(this)' class='btn btn-block'><i class='icon icon-remove'></i></a></td>
</tr>
</table>
</div>
<div class='modal fade' id='importTeamModal'>
<div class='modal-dialog mw-700px'>
+3 -3
View File
@@ -64,7 +64,7 @@ class release extends control
die(js::locate(inlink('view', "releaseID=$releaseID"), 'parent'));
}
$builds = $this->loadModel('build')->getProductBuildPairs($productID, $branch);
$builds = $this->loadModel('build')->getProductBuildPairs($productID, $branch, 'notrunk|withbranch', false);
$releaseBuilds = $this->release->getReleaseBuilds($productID, $branch);
foreach($releaseBuilds as $build) unset($builds[$build]);
unset($builds['trunk']);
@@ -114,7 +114,7 @@ class release extends control
$this->view->position[] = $this->lang->release->edit;
$this->view->release = $release;
$this->view->build = $build;
$this->view->builds = $this->loadModel('build')->getProductBuildPairs($release->product, $release->branch, 'notrunk', false);
$this->view->builds = $this->loadModel('build')->getProductBuildPairs($release->product, $release->branch, 'notrunk|withbranch', false);
$this->display();
}
@@ -444,7 +444,7 @@ class release extends control
$this->config->bug->search['params']['plan']['values'] = $this->loadModel('productplan')->getForProducts(array($release->product => $release->product));
$this->config->bug->search['params']['module']['values'] = $this->loadModel('tree')->getOptionMenu($release->product, $viewType = 'bug', $startModuleID = 0);
$this->config->bug->search['params']['project']['values'] = $this->loadModel('product')->getProjectPairs($release->product);
$this->config->bug->search['params']['openedBuild']['values'] = $this->loadModel('build')->getProductBuildPairs($release->product);
$this->config->bug->search['params']['openedBuild']['values'] = $this->loadModel('build')->getProductBuildPairs($release->product, $branch = 0, $params = '');
$this->config->bug->search['params']['resolvedBuild']['values'] = $this->config->bug->search['params']['openedBuild']['values'];
unset($this->config->bug->search['fields']['branch']);
unset($this->config->bug->search['params']['branch']);
-1
View File
@@ -2,5 +2,4 @@
.contentDiv .panel-heading {line-height: 14px;}
.red {color:red}
.green {color:green}
#unlinkBugList, #unlinkStoryList{margin-bottom:5px;}
input[type=checkbox].ml-10px{margin-left:10px;}
+2 -1
View File
@@ -1,3 +1,4 @@
.tabs{position:relative;}
.tabs .tab-content .tab-pane #querybox{margin:0px}
.tabs .tab-content{padding:0px; border:0px;}
.tabs .tab-content .tab-pane #querybox{margin:0px; border-left:1px solid #ddd; border-right:1px solid #ddd;}
.tabs .tab-content .tab-pane #querybox form{padding-left:0px;}
-23
View File
@@ -2,26 +2,3 @@ $(document).ready(function()
{
$("a.preview").modalTrigger({width:1000, type:'iframe'});
})
/**
* Load branch builds.
*
* @param int $branchID
* @access public
* @return void
*/
function loadBranchBuilds(branchID)
{
if(page == 'create')
{
oldReleasedBuild = $('#build').val() ? $('#build').val() : 0;
link = createLink('build', 'ajaxGetBranchBuilds', 'productID=' + productID + '&branchID=' + branchID + '&operation=createRelease&build=' + oldReleasedBuild);
$('#buildBox').load(link, function(){$('#build').chosen(defaultChosenOptions);});
}
else
{
link = createLink('build', 'ajaxGetBranchBuilds', 'productID=' + productID + '&branchID=' + branchID + '&operation=editRelease&build=' + oldReleasedBuild);
$('#buildBox').load(link, function(){$('#build').chosen(defaultChosenOptions);});
}
}
+1 -1
View File
@@ -59,7 +59,7 @@ $lang->release->exportTypeList['bug'] = 'Bug';
$lang->release->exportTypeList['leftbug'] = '遺留Bug';
$lang->release->statusList[''] = '';
$lang->release->statusList['normal'] = '正常維護';
$lang->release->statusList['normal'] = '正常';
$lang->release->statusList['terminate'] = '停止維護';
$lang->release->changeStatusList['normal'] = '激活';
+8
View File
@@ -116,8 +116,11 @@ class releaseModel extends model
$buildID = $this->dao->lastInsertID();
}
$branch = 0;
if($this->post->build) $branch = $this->dao->select('branch')->from(TABLE_BUILD)->where('id')->eq($this->post->build)->fetch('branch');
$release = fixer::input('post')
->add('product', (int)$productID)
->add('branch', (int)$branch)
->setDefault('stories', '')
->join('stories', ',')
->join('bugs', ',')
@@ -149,7 +152,12 @@ class releaseModel extends model
public function update($releaseID)
{
$oldRelease = $this->getByID($releaseID);
$branch = $oldRelease->branch;
if($oldRelease->build != $this->post->build) $branch = $this->dao->select('branch')->from(TABLE_BUILD)->where('id')->eq($this->post->build)->fetch('branch');
$release = fixer::input('post')->stripTags($this->config->release->editor->edit['id'], $this->config->allowedTags)
->add('branch', (int)$branch)
->remove('files,labels,allchecker')
->get();
$release = $this->loadModel('file')->processEditor($release, $this->config->release->editor->edit['id']);
+1 -1
View File
@@ -17,8 +17,8 @@
<div id='titlebar'>
<div class='heading'>
<i class='icon-tags'></i>
<?php if($product->type !== 'normal') echo '<span class="label label-info label-badge">' . $branches[$branch] . '</span>';?>
<?php echo $lang->release->browse;?>
<?php if($product->type !== 'normal') echo '<span class="label label-info">' . $branches[$branch] . '</span>';?>
</div>
<div class='actions'>
<?php common::printIcon('release', 'create', "product=$product->id&branch=$branch");?>
-6
View File
@@ -26,12 +26,6 @@ js::set('page' , 'create');
</div>
<form class='form-condensed' method='post' target='hiddenwin' id='dataform' enctype='multipart/form-data'>
<table class='table table-form'>
<?php if($product->type != 'normal'):?>
<tr>
<th class='w-110px'><?php echo $lang->product->branch;?></th>
<td><?php echo html::select('branch', $branches, $branch, "onchange='loadBranchBuilds(this.value)' class='form-control chosen'");?></td>
</tr>
<?php endif;?>
<tr>
<th class='w-110px'><?php echo $lang->release->name;?></th>
<td class='w-p25-f'>
-6
View File
@@ -28,12 +28,6 @@ js::set('oldReleasedBuild' , $release->build);
</div>
<form class='form-condensed' method='post' target='hiddenwin' id='dataform' enctype='multipart/form-data'>
<table class='table table-form'>
<?php if($product->type != 'normal'):?>
<tr>
<th class='w-110px'><?php echo $lang->product->branch;?></th>
<td><?php echo html::select('branch', $branches, $branch, "onchange='loadBranchBuilds(this.value)' class='form-control chosen'");?></td>
</tr>
<?php endif;?>
<tr>
<th class='w-90px'><?php echo $lang->release->name;?></th>
<td class='w-p25-f'><?php echo html::input('name', $release->name, "class='form-control'");?></td><td></td>
+4 -4
View File
@@ -23,7 +23,7 @@ class ssoModel extends model
*/
public function getBindUser($user)
{
return $this->dao->select('*')->from(TABLE_USER)->where('bindRanzhi')->eq($user)->andWhere('deleted')->eq('0')->fetch();
return $this->dao->select('*')->from(TABLE_USER)->where('ranzhi')->eq($user)->andWhere('deleted')->eq('0')->fetch();
}
/**
@@ -52,8 +52,8 @@ class ssoModel extends model
$password = md5($data->bindPassword);
$user = $this->dao->select('*')->from(TABLE_USER)->where('account')->eq($data->bindUser)->andWhere('password')->eq($password)->andWhere('deleted')->eq('0')->fetch();
if(empty($user))die(js::alert($this->lang->sso->bindNoUser));
$user->bindRanzhi = $this->session->ssoData->account;
$this->dao->update(TABLE_USER)->set('bindRanzhi')->eq($user->bindRanzhi)->where('id')->eq($user->id)->exec();
$user->ranzhi = $this->session->ssoData->account;
$this->dao->update(TABLE_USER)->set('ranzhi')->eq($user->ranzhi)->where('id')->eq($user->id)->exec();
}
elseif($data->bindType == 'add')
{
@@ -73,7 +73,7 @@ class ssoModel extends model
$user->realname = $data->realname;
$user->gender = isset($data->gender) ? $data->gender : '';
$user->email = $data->email;
$user->bindRanzhi = $this->session->ssoData->account;
$user->ranzhi = $this->session->ssoData->account;
$this->dao->insert(TABLE_USER)->data($user)
->autoCheck()
+1 -1
View File
@@ -782,7 +782,7 @@ class story extends control
*/
public function batchChangePlan($planID, $oldPlanID = 0)
{
$storyIDList = $this->post->storyIDList ? $this->post->storyIDList : die(js::locate($this->session->storyList, 'parent'));
$storyIDList = !empty($_POST['storyIDList']) ? $this->post->storyIDList : die(js::locate($this->session->storyList, 'parent'));
$allChanges = $this->story->batchChangePlan($storyIDList, $planID, $oldPlanID);
if(dao::isError()) die(js::error(dao::getError()));
foreach($allChanges as $storyID => $changes)
+4 -4
View File
@@ -743,14 +743,14 @@ class storyModel extends model
$story->lastEditedBy = $this->app->user->account;
$story->lastEditedDate = $now;
if(strpos(",{$oldStory->plan},", ",$planID,") !== false) continue;
if($this->session->currentProductType == 'normal' or empty($oldPlanID))
if($this->session->currentProductType == 'normal' or empty($oldPlanID) or $oldStory->branch)
{
$story->plan = $planID;
}
elseif($oldPlanID)
{
$story->plan = trim(str_replace(",$oldPlanID,", ',', ",$oldStory->plan,"), ',');
if(empty($story->branch) or empty($plan->branch) or ($plan->branch == $oldStory->branch)) $story->plan .= ",$planID";
if(empty($story->branch)) $story->plan .= ",$planID";
}
if($planID) $story->stage = 'planned';
@@ -1011,7 +1011,7 @@ class storyModel extends model
}
$stories = $this->dao->select('*')->from(TABLE_STORY)
->where('product')->in($productID)
->beginIF($branch)->andWhere("branch")->in("$branch")->fi()
->beginIF($branch)->andWhere("branch")->in($branch)->fi()
->beginIF(!empty($moduleIds))->andWhere('module')->in($moduleIds)->fi()
->beginIF($status and $status != 'all')->andWhere('status')->in($status)->fi()
->andWhere('deleted')->eq(0)
@@ -1134,7 +1134,7 @@ class storyModel extends model
*/
public function getByField($productID, $branch, $fieldName, $fieldValue, $orderBy, $pager, $operator = 'equal')
{
if(!$this->loadModel('common')->checkField(TABLE_STORY, $type)) return array();
if(!$this->loadModel('common')->checkField(TABLE_STORY, $fieldName)) return array();
$stories = $this->dao->select('*')->from(TABLE_STORY)
->where('product')->in($productID)
->andWhere('deleted')->eq(0)
+1 -1
View File
@@ -16,8 +16,8 @@
<span class='prefix'><?php echo html::icon($lang->icons['story']);?></span>
<strong>
<small class='text-muted'><?php echo html::icon($lang->icons['batchCreate']);?></small>
<?php if($product->type !== 'normal') echo '<span class="label label-info label-badge">' . $branches[$branch] . '</span>';?>
<?php echo $lang->story->batchCreate;?>
<?php if($product->type !== 'normal') echo '<span class="label label-info">' . $branches[$branch] . '</span>';?>
</strong>
<div class='actions'>
<?php if(common::hasPriv('file', 'uploadImages')) echo html::a($this->createLink('file', 'uploadImages', 'module=story&params=' . helper::safe64Encode("productID=$productID&moduleID=$moduleID")), $lang->uploadImages, '', "data-toggle='modal' data-type='iframe' class='btn' data-width='600px'")?>
+10 -5
View File
@@ -52,11 +52,12 @@ class testcase extends control
* @access public
* @return void
*/
public function browse($productID = 0, $branch = 0, $browseType = 'all', $param = 0, $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
public function browse($productID = 0, $branch = '', $browseType = 'all', $param = 0, $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
{
/* Set browseType, productID, moduleID and queryID. */
$browseType = strtolower($browseType);
$productID = $this->product->saveState($productID, $this->products);
if($branch === '') $branch = $this->session->branch;
$moduleID = ($browseType == 'bymodule') ? (int)$param : 0;
$queryID = ($browseType == 'bysearch') ? (int)$param : 0;
@@ -162,7 +163,7 @@ class testcase extends control
$this->view->position[] = $this->lang->testcase->common;
$this->view->productID = $productID;
$this->view->productName = $this->products[$productID];
$this->view->moduleTree = $this->tree->getTreeMenu($productID, $viewType = 'case', $startModuleID = 0, array('treeModel', 'createCaseLink'));
$this->view->moduleTree = $this->tree->getTreeMenu($productID, $viewType = 'case', $startModuleID = 0, array('treeModel', 'createCaseLink'), '', $branch);
$this->view->moduleID = $moduleID;
$this->view->pager = $pager;
$this->view->users = $this->user->getPairs('noletter');
@@ -184,10 +185,11 @@ class testcase extends control
* @access public
* @return void
*/
public function groupCase($productID = 0, $branch = 0, $groupBy = 'stroy')
public function groupCase($productID = 0, $branch = '', $groupBy = 'stroy')
{
$groupBy = empty($groupBy) ? 'stroy' : $groupBy;
$productID = $this->product->saveState($productID, $this->products);
if($branch === '') $branch = $this->session->branch;
$this->app->loadLang('testtask');
@@ -231,7 +233,7 @@ class testcase extends control
* @access public
* @return void
*/
public function create($productID, $branch = 0, $moduleID = 0, $from = '', $param = 0, $storyID = 0)
public function create($productID, $branch = '', $moduleID = 0, $from = '', $param = 0, $storyID = 0)
{
$testcaseID = $from == 'testcase' ? $param : 0;
$bugID = $from == 'bug' ? $param : 0;
@@ -267,6 +269,7 @@ class testcase extends control
/* Set productID and currentModuleID. */
$productID = $this->product->saveState($productID, $this->products);
if($branch === '') $branch = $this->session->branch;
if($storyID and empty($moduleID))
{
$story = $this->loadModel('story')->getByID($storyID);
@@ -371,7 +374,7 @@ class testcase extends control
* @access public
* @return void
*/
public function batchCreate($productID, $branch = 0, $moduleID = 0, $storyID = 0)
public function batchCreate($productID, $branch = '', $moduleID = 0, $storyID = 0)
{
$this->loadModel('story');
if(!empty($_POST))
@@ -384,6 +387,7 @@ class testcase extends control
/* Set productID and currentModuleID. */
$productID = $this->product->saveState($productID, $this->products);
if($branch === '') $branch = $this->session->branch;
if($storyID and empty($moduleID))
{
$story = $this->loadModel('story')->getByID($storyID);
@@ -417,6 +421,7 @@ class testcase extends control
$this->view->type = $type;
$this->view->title = $title;
$this->view->branch = $branch;
$this->view->branches = $this->loadModel('branch')->getPairs($productID);
$this->display();
}
+5 -1
View File
@@ -17,7 +17,11 @@
<div id='titlebar'>
<div class='heading'>
<span class='prefix'><?php echo html::icon($lang->icons['testcase']);?></span>
<strong><small class='text-muted'><?php echo html::icon($lang->icons['batchCreate']);?></small> <?php echo $lang->testcase->batchCreate;?></strong>
<strong>
<small class='text-muted'><?php echo html::icon($lang->icons['batchCreate']);?></small>
<?php if($this->session->currentProductType !== 'normal') echo '<span class="label label-info">' . $branches[$branch] . '</span>';?>
<?php echo $lang->testcase->batchCreate;?>
</strong>
<?php if($story):?>
<small class='text-muted'><?php echo html::icon($lang->icons['story']) . ' ' . $story->title ?></small>
<?php endif;?>
+1 -1
View File
@@ -24,7 +24,7 @@ js::set('batchDelete', $lang->testcase->confirmBatchDelete);
<a class='side-handle' data-id='testcaseTree'><i class='icon-caret-left'></i></a>
<div class='side-body'>
<div class='panel panel-sm'>
<div class='panel-heading nobr'><?php echo html::icon($lang->icons['product']);?> <strong><?php echo $productName;?></strong></div>
<div class='panel-heading nobr'><?php echo html::icon($lang->icons['product']);?> <strong><?php echo $branch ? $branches[$branch] : $productName;?></strong></div>
<div class='panel-body'>
<?php echo $moduleTree;?>
<div class='text-right'>
+4 -3
View File
@@ -49,13 +49,14 @@ class testtask extends control
* @access public
* @return void
*/
public function browse($productID = 0, $branch = 0, $type = 'wait', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
public function browse($productID = 0, $branch = '', $type = 'wait', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
{
/* Save session. */
$this->session->set('testtaskList', $this->app->getURI(true));
/* Set menu. */
$productID = $this->product->saveState($productID, $this->products);
if($branch === '') $branch = $this->session->branch;
$this->testtask->setMenu($this->products, $productID, $branch);
/* Load pager. */
@@ -418,7 +419,7 @@ class testtask extends control
$this->view->task = $task;
$this->view->projects = $this->product->getProjectPairs($productID);
$this->view->builds = $this->loadModel('build')->getProductBuildPairs($productID);
$this->view->builds = $this->loadModel('build')->getProductBuildPairs($productID, $branch = 0, $params = '');
$this->view->users = $this->loadModel('user')->getPairs('nodeleted', $task->owner);
$this->display();
@@ -818,7 +819,7 @@ class testtask extends control
$this->view->case = $case;
$this->view->results = $results;
$this->view->builds = $this->loadModel('build')->getProductBuildPairs($case->product);
$this->view->builds = $this->loadModel('build')->getProductBuildPairs($case->product, $branch = 0, $params = '');
$this->view->users = $this->loadModel('user')->getPairs('noclosed, noletter');
die($this->display());
+4 -4
View File
@@ -90,7 +90,7 @@ class treeModel extends model
if(strpos('story|bug|case', $type) !== false)
{
$product = $this->loadModel('product')->getById($rootID);
if($product->type != 'normal')
if($product and $product->type != 'normal')
{
$branches = array('null' => '') + $this->loadModel('branch')->getPairs($rootID, 'noempty');
if($branch)
@@ -370,6 +370,7 @@ class treeModel extends model
/* tree menu. */
$tree = '';
if(empty($branchGroups[$id])) $branchGroups[$id]['0'] = '';
foreach($branchGroups[$id] as $branch => $branchName)
{
$treeMenu = array();
@@ -447,13 +448,14 @@ class treeModel extends model
/* tree menu. */
$tree = '';
if(empty($branchGroups[$id])) $branchGroups[$id]['0'] = '';
foreach($branchGroups[$id] as $branch => $branchName)
{
$treeMenu = array();
$query = $this->dao->select('*')->from(TABLE_MODULE)->where("(root = $id and type = 'story')")
->andWhere('branch')->eq($branch)
->beginIF($startModulePath)->andWhere('path')->like($startModulePath)->fi()
->orderBy('grade desc, type, `order`')
->orderBy('grade desc, branch, type, `order`')
->get();
$stmt = $this->dbh->query($query);
while($module = $stmt->fetch())
@@ -464,8 +466,6 @@ class treeModel extends model
}
if(isset($treeMenu[0]) and $branch)
{
$link = helper::createLink('project', 'story', "project=$rootID&ordery=&status=byBrach&praram=$branch");
if($productNum > 1) $menu .= "<li>" . html::a($link, $product, '_self', "id='product$id'");
$treeMenu[0] = "<li>" . html::a($link, $branchName, '_self', "id='branch$branch'") . "<ul>{$treeMenu[0]}</ul></li>";
}
$tree .= isset($treeMenu[0]) ? $treeMenu[0] : '';
+1
View File
@@ -94,3 +94,4 @@ $lang->upgrade->fromVersions['7_1'] = '7.1';
$lang->upgrade->fromVersions['7_2'] = '7.2';
$lang->upgrade->fromVersions['7_2_4'] = '7.2.4';
$lang->upgrade->fromVersions['7_2_5'] = '7.2.5';
$lang->upgrade->fromVersions['7_3'] = '7.3';
+22
View File
@@ -127,6 +127,7 @@ class upgradeModel extends model
$this->adjustOrder7_3();
case '7_3':
$this->execSQL($this->getUpgradeFile('7.3'));
$this->adjustPriv7_4_beta();
default: if(!$this->isError()) $this->setting->updateVersion($this->config->version);
}
@@ -961,6 +962,27 @@ class upgradeModel extends model
return true;
}
/**
* Adjust priv for 7.4.beta
*
* @access public
* @return void
*/
public function adjustPriv7_4_beta()
{
$groups = $this->dao->select('id')->from(TABLE_GROUP)->where('name')->ne('guest')->fetchPairs('id', 'id');
foreach($groups as $groupID)
{
$groupPriv = new stdclass();
$groupPriv->group = $groupID;
$groupPriv->module = 'my';
$groupPriv->method = 'unbind';
$this->dao->replace(TABLE_GROUPPRIV)->data($groupPriv)->exec();
}
return true;
}
/**
* Judge any error occers.
*
+1 -1
View File
@@ -42,7 +42,7 @@ $lang->user->join = 'Join date';
$lang->user->visits = 'Visits';
$lang->user->ip = 'Last IP';
$lang->user->last = 'Last login';
$lang->user->bindRanzhi = 'Ranzhi account';
$lang->user->ranzhi = 'Ranzhi account';
$lang->user->status = 'Status';
$lang->user->ditto = 'Ditto';
$lang->user->originalPassword = 'Original password';
+1 -1
View File
@@ -42,7 +42,7 @@ $lang->user->join = '入职日期';
$lang->user->visits = '访问次数';
$lang->user->ip = '最后IP';
$lang->user->last = '最后登录';
$lang->user->bindRanzhi = '然之账号';
$lang->user->ranzhi = '然之账号';
$lang->user->status = '状态';
$lang->user->ditto = '同上';
$lang->user->originalPassword = '原密码';
+2 -3
View File
@@ -38,11 +38,11 @@ $lang->user->mobile = '手機';
$lang->user->phone = '電話';
$lang->user->address = '通訊地址';
$lang->user->zipcode = '郵編';
$lang->user->join = '入職時間';
$lang->user->join = '入職日期';
$lang->user->visits = '訪問次數';
$lang->user->ip = '最後IP';
$lang->user->last = '最後登錄';
$lang->user->bindRanzhi = '然之賬號';
$lang->user->ranzhi = '然之賬號';
$lang->user->status = '狀態';
$lang->user->ditto = '同上';
$lang->user->originalPassword = '原密碼';
@@ -140,7 +140,6 @@ $lang->user->placeholder->account = '英文、數字和下劃線的組合,
$lang->user->placeholder->password1 = '六位以上';
$lang->user->placeholder->role = '職位影響內容和用戶列表的順序。';
$lang->user->placeholder->group = '分組決定用戶的權限列表。';
$lang->user->placeholder->join = '入職日期';
$lang->user->placeholder->commiter = '版本控制系統(subversion)中的帳號';
$lang->user->placeholder->verify = '需要輸入你的密碼加以驗證';
+1 -1
View File
@@ -790,7 +790,7 @@ class userModel extends model
*/
public function unbind($account)
{
$this->dao->update(TABLE_USER)->set('bindRanzhi')->eq('')->where('account')->eq($account)->exec();
$this->dao->update(TABLE_USER)->set('ranzhi')->eq('')->where('account')->eq($account)->exec();
}
/**
+3 -3
View File
@@ -126,10 +126,10 @@
<th><?php echo $lang->user->zipcode;?></th>
<td><?php echo $user->zipcode;?></td>
</tr>
<?php if($user->bindRanzhi):?>
<?php if($user->ranzhi):?>
<tr>
<th><?php echo $lang->user->bindRanzhi;?></th>
<td><?php echo $user->bindRanzhi;?></td>
<th><?php echo $lang->user->ranzhi;?></th>
<td><?php echo $user->ranzhi;?></td>
</tr>
<?php endif;?>
</table>