Merge branch '15.2'

This commit is contained in:
wangyidong
2021-08-02 16:31:42 +08:00
63 changed files with 359 additions and 150 deletions
+1
View File
@@ -16,6 +16,7 @@ clean:
rm -fr lampp rm -fr lampp
common: common:
mkdir zentaopms mkdir zentaopms
cp -fr api zentaopms/
cp -fr bin zentaopms/ cp -fr bin zentaopms/
cp -fr config zentaopms/ && rm -fr zentaopms/config/my.php cp -fr config zentaopms/ && rm -fr zentaopms/config/my.php
cp -fr db zentaopms/ cp -fr db zentaopms/
+2
View File
@@ -137,6 +137,8 @@ $config->openMethods[] = 'sso.gettodolist';
$config->openMethods[] = 'file.read'; $config->openMethods[] = 'file.read';
$config->openMethods[] = 'index.changelog'; $config->openMethods[] = 'index.changelog';
$config->openMethods[] = 'my.preference'; $config->openMethods[] = 'my.preference';
$config->openMethods[] = 'my.changepassword';
$config->openMethods[] = 'my.profile';
/* Define the tables. */ /* Define the tables. */
define('TABLE_COMPANY', '`' . $config->db->prefix . 'company`'); define('TABLE_COMPANY', '`' . $config->db->prefix . 'company`');
+1 -1
View File
@@ -858,7 +858,7 @@ CREATE TABLE IF NOT EXISTS `zt_searchdict` (
) ENGINE=MyISAM DEFAULT CHARSET=utf8; ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- DROP TABLE IF EXISTS `zt_searchindex`; -- DROP TABLE IF EXISTS `zt_searchindex`;
CREATE TABLE IF NOT EXISTS `zt_searchindex` ( CREATE TABLE IF NOT EXISTS `zt_searchindex` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`objectType` char(20) NOT NULL, `objectType` char(20) NOT NULL,
`objectID` mediumint(9) NOT NULL, `objectID` mediumint(9) NOT NULL,
`title` text NOT NULL, `title` text NOT NULL,
+12 -13
View File
@@ -513,11 +513,9 @@ class router extends baseRouter
if($methodName == 'batchOperate') array_unshift($params, $this->rawMethod); // $params = array('close', 1); if($methodName == 'batchOperate') array_unshift($params, $this->rawMethod); // $params = array('close', 1);
if($methodName == 'browse') if($methodName == 'browse')
{ {
if(!(isset($params[0]) and $params[0] == 'bysearch')) if(!(isset($params[0]) and $params[0] == 'bysearch')) array_unshift($params, 'browse');
{
array_unshift($params, 'browse');
}
} }
array_unshift($params, $this->rawModule); // $params = array($module, 'close', 1); array_unshift($params, $this->rawModule); // $params = array($module, 'close', 1);
array_unshift($params, $methodName); // $params = array('operate', $module, 'close', 1); array_unshift($params, $methodName); // $params = array('operate', $module, 'close', 1);
array_unshift($params, $moduleName); // $params = array('flow', 'operate', $module, 'close', 1); array_unshift($params, $moduleName); // $params = array('flow', 'operate', $module, 'close', 1);
@@ -541,22 +539,23 @@ class router extends baseRouter
/* Prepend other params. */ /* Prepend other params. */
if($methodName == 'browse') if($methodName == 'browse')
{ {
if(isset($params['label']) and $params['label'] == 'bysearch') if(!(isset($params['mode']) and $params['mode'] == 'bysearch')) $params['mode'] = 'browse';
{
$params['label'] = '';
$params['mode'] = 'bysearch';
}
else
{
$params['mode'] = 'browse';
}
} }
$params['module'] = $this->rawModule; // $param = array('label' => 1, 'mode' => 'search', 'module' => $module); $params['module'] = $this->rawModule; // $param = array('label' => 1, 'mode' => 'search', 'module' => $module);
$params[$this->config->methodVar] = $methodName; // $param = array('label' => 1, 'mode' => 'search', 'module' => $module, 'f' => 'browse'); $params[$this->config->methodVar] = $methodName; // $param = array('label' => 1, 'mode' => 'search', 'module' => $module, 'f' => 'browse');
$params[$this->config->moduleVar] = $moduleName; // $param = array('label' => 1, 'mode' => 'search', 'module' => $module, 'f' => 'browse', 'm' => 'flow'); $params[$this->config->moduleVar] = $moduleName; // $param = array('label' => 1, 'mode' => 'search', 'module' => $module, 'f' => 'browse', 'm' => 'flow');
$params = array_reverse($params); // $params = array('m' => 'flow', 'f' => 'browse', 'module' => $module, 'mode' => 'search', 'label' => 1); $params = array_reverse($params); // $params = array('m' => 'flow', 'f' => 'browse', 'module' => $module, 'mode' => 'search', 'label' => 1);
/* Reset $_GET for setParamsByGET. */
$get = $params;
foreach($_GET as $key => $value)
{
if(!isset($get[$key])) $get[$key] = $value;
}
$_GET = $get;
$this->URI = $path . '?' . http_build_query($params); // $this->URI = '/index.php?m=flow&f=browse&module=$module&mode=search&label=1'; $this->URI = $path . '?' . http_build_query($params); // $this->URI = '/index.php?m=flow&f=browse&module=$module&mode=search&label=1';
} }
} }
+1
View File
@@ -111,6 +111,7 @@ class gitlab
if(!empty($commits)) if(!empty($commits))
{ {
$commit = $commits[0]; $commit = $commits[0];
$file->revision = $commit->id;
$file->committer = $commit->committer_name; $file->committer = $commit->committer_name;
$file->comment = $commit->message; $file->comment = $commit->message;
$file->date = date('Y-m-d H:i:s', strtotime($commit->committed_date)); $file->date = date('Y-m-d H:i:s', strtotime($commit->committed_date));
+10 -3
View File
@@ -49,8 +49,7 @@ class actionModel extends model
$action->date = helper::now(); $action->date = helper::now();
$action->extra = $extra; $action->extra = $extra;
if($objectType == 'story' and $actionType !== 'reviewed' and strpos('reviewclosed,passreviewed,clarifyreviewed', $actionType) !== false) $action->actor = 'System'; if($objectType == 'story' and $actionType !== 'reviewed' and strpos(',reviewclosed,passreviewed,clarifyreviewed,', ",$actionType,") !== false) $action->actor = 'System';
/* Use purifier to process comment. Fix bug #2683. */ /* Use purifier to process comment. Fix bug #2683. */
$action->comment = fixer::stripDataTags($comment); $action->comment = fixer::stripDataTags($comment);
@@ -928,6 +927,7 @@ class actionModel extends model
public function transformActions($actions) public function transformActions($actions)
{ {
$this->app->loadLang('todo'); $this->app->loadLang('todo');
$this->app->loadLang('stakeholder');
$requirements = array(); $requirements = array();
/* Get commiters. */ /* Get commiters. */
@@ -989,6 +989,13 @@ class actionModel extends model
if($object->type == 'project') $objectProject[$object->id] = $object->id; if($object->type == 'project') $objectProject[$object->id] = $object->id;
} }
} }
elseif($objectType == 'stakeholder'){
$objectName = $this->dao->select("t1.id, t2.realname")->from($table)->alias('t1')
->leftJoin(TABLE_USER)->alias('t2')->on("t1.{$field} = t2.account")
->where('t1.id')->in($objectIds)
->fetchPairs();
$objectProject = array();
}
else else
{ {
$objectName = $this->dao->select("id, $field AS name")->from($table)->where('id')->in($objectIds)->fetchPairs(); $objectName = $this->dao->select("id, $field AS name")->from($table)->where('id')->in($objectIds)->fetchPairs();
@@ -1029,7 +1036,7 @@ class actionModel extends model
$objectType = strtolower($action->objectType); $objectType = strtolower($action->objectType);
$action->originalDate = $action->date; $action->originalDate = $action->date;
$action->date = date(DT_MONTHTIME2, strtotime($action->date)); $action->date = date(DT_MONTHTIME2, strtotime($action->date));
$action->actionLabel = isset($this->lang->action->label->$actionType) ? $this->lang->action->label->$actionType : $action->action; $action->actionLabel = isset($this->lang->action->label->$actionType) ? $this->lang->action->label->$actionType : (isset($this->lang->$objectType->$actionType) ? $this->lang->$objectType->$actionType : $action->action);
$action->objectLabel = $objectType; $action->objectLabel = $objectType;
if(isset($this->lang->action->label->$objectType)) if(isset($this->lang->action->label->$objectType))
{ {
+1 -1
View File
@@ -34,7 +34,7 @@
<?php if($longBlock):?> <?php if($longBlock):?>
<td class='text-center'><?php echo $project->teamCount;?></td> <td class='text-center'><?php echo $project->teamCount;?></td>
<td class='text-right' title="<?php echo $project->consumed . ' ' . $lang->execution->workHour;?>"><?php echo $project->consumed . $lang->execution->workHourUnit;?></td> <td class='text-right' title="<?php echo $project->consumed . ' ' . $lang->execution->workHour;?>"><?php echo $project->consumed . $lang->execution->workHourUnit;?></td>
<?php $programBudget = in_array($this->app->getClientLang(), ['zh-cn','zh-tw']) ? round((float)$project->budget / 10000, 2) . $this->lang->project->tenThousand : round((float)$project->budget, 2);?> <?php $programBudget = in_array($this->app->getClientLang(), array('zh-cn','zh-tw')) ? round((float)$project->budget / 10000, 2) . $this->lang->project->tenThousand : round((float)$project->budget, 2);?>
<td class='text-right'><?php echo $project->budget != 0 ? zget($lang->project->currencySymbol, $project->budgetUnit) . ' ' . $programBudget : $lang->project->future;?></td> <td class='text-right'><?php echo $project->budget != 0 ? zget($lang->project->currencySymbol, $project->budgetUnit) . ' ' . $programBudget : $lang->project->future;?></td>
<td class='text-center'><?php echo $project->leftStories;?></td> <td class='text-center'><?php echo $project->leftStories;?></td>
<td class='text-center'><?php echo $project->leftTasks;?></td> <td class='text-center'><?php echo $project->leftTasks;?></td>
@@ -221,7 +221,7 @@ $(function()
<span><?php echo $lang->project->budget . ':';?></span> <span><?php echo $lang->project->budget . ':';?></span>
<span class='project-info'> <span class='project-info'>
<?php <?php
$projectBudget = in_array($this->app->getClientLang(), ['zh-cn','zh-tw']) ? round((float)$project->budget / 10000, 2) . $this->lang->project->tenThousand : round((float)$project->budget, 2); $projectBudget = in_array($this->app->getClientLang(), array('zh-cn','zh-tw')) ? round((float)$project->budget / 10000, 2) . $this->lang->project->tenThousand : round((float)$project->budget, 2);
echo $project->budget != 0 ? $projectBudget : $this->lang->project->future; echo $project->budget != 0 ? $projectBudget : $this->lang->project->future;
?> ?>
</span> </span>
@@ -229,7 +229,7 @@ $(function()
<div class="col-1-5"></div> <div class="col-1-5"></div>
</div> </div>
<div class="table-row text-center waterfall-title small col-12 center-block"> <div class="table-row text-center waterfall-title small col-12 center-block">
<?php $isChineseLang = in_array($this->app->getClientLang(), ['zh-cn','zh-tw']);?> <?php $isChineseLang = in_array($this->app->getClientLang(), array('zh-cn','zh-tw'));?>
<div class="col-1-5"><?php echo $isChineseLang ? $lang->project->pv . '(' . $lang->project->pvTitle . ')' : $lang->project->pv; ?></div> <div class="col-1-5"><?php echo $isChineseLang ? $lang->project->pv . '(' . $lang->project->pvTitle . ')' : $lang->project->pv; ?></div>
<div class="col-1-5"><?php echo $isChineseLang ? $lang->project->ev . '(' . $lang->project->evTitle . ')' : $lang->project->ev;?></div> <div class="col-1-5"><?php echo $isChineseLang ? $lang->project->ev . '(' . $lang->project->evTitle . ')' : $lang->project->ev;?></div>
<div class="col-1-5"><?php echo $isChineseLang ? $lang->project->ac . '(' . $lang->project->acTitle . ')' : $lang->project->ac;?></div> <div class="col-1-5"><?php echo $isChineseLang ? $lang->project->ac . '(' . $lang->project->acTitle . ')' : $lang->project->ac;?></div>
-3
View File
@@ -1287,9 +1287,6 @@ class bug extends control
$this->qa->setMenu($this->products, $productID, $bug->branch); $this->qa->setMenu($this->products, $productID, $bug->branch);
$this->view->title = $this->products[$productID] . $this->lang->colon . $this->lang->bug->resolve; $this->view->title = $this->products[$productID] . $this->lang->colon . $this->lang->bug->resolve;
$this->view->position[] = html::a($this->createLink('bug', 'browse', "productID=$productID"), $this->products[$productID]);
$this->view->position[] = $this->lang->bug->resolve;
$this->view->bug = $bug; $this->view->bug = $bug;
$this->view->users = $users; $this->view->users = $users;
$this->view->assignedTo = $assignedTo; $this->view->assignedTo = $assignedTo;
+5 -4
View File
@@ -1366,13 +1366,14 @@ EOD;
/** /**
* Create changes of one object. * Create changes of one object.
* *
* @param mixed $old the old object * @param mixed $old the old object
* @param mixed $new the new object * @param mixed $new the new object
* @param string $moduleName
* @static * @static
* @access public * @access public
* @return array * @return array
*/ */
public static function createChanges($old, $new) public static function createChanges($old, $new, $moduleName = '')
{ {
global $app, $config; global $app, $config;
@@ -1389,7 +1390,7 @@ EOD;
if($oldID && $oldStatus && $newStatus && !$newSubStatus && $oldStatus != $newStatus) if($oldID && $oldStatus && $newStatus && !$newSubStatus && $oldStatus != $newStatus)
{ {
$moduleName = $app->getModuleName(); if(empty($moduleName)) $moduleName = $app->getModuleName();
$field = $app->dbh->query('SELECT options FROM ' . TABLE_WORKFLOWFIELD . " WHERE `module` = '$moduleName' AND `field` = 'subStatus'")->fetch(); $field = $app->dbh->query('SELECT options FROM ' . TABLE_WORKFLOWFIELD . " WHERE `module` = '$moduleName' AND `field` = 'subStatus'")->fetch();
if(!empty($field->options)) $field->options = json_decode($field->options, true); if(!empty($field->options)) $field->options = json_decode($field->options, true);
+7 -1
View File
@@ -45,7 +45,13 @@
</tr> </tr>
<tr> <tr>
<th><?php echo $lang->doc->type;?></th> <th><?php echo $lang->doc->type;?></th>
<td><?php echo html::radio('type', $lang->doc->types, $doc->type);?></td> <td>
<?php
$typeList = $lang->doc->types;
if(!isset($lang->doc->types[$doc->type])) $typeList = $lang->doc->typeList;
echo html::radio('type', array($doc->type => zget($typeList, $doc->type)), $doc->type);
?>
</td>
</tr> </tr>
<tr id='contentBox' <?php if($doc->type == 'url') echo "class='hidden'"?>> <tr id='contentBox' <?php if($doc->type == 'url') echo "class='hidden'"?>>
<th><?php echo $lang->doc->content;?></th> <th><?php echo $lang->doc->content;?></th>
+2 -8
View File
@@ -1371,13 +1371,7 @@ class execution extends control
if(!empty($_POST)) if(!empty($_POST))
{ {
$oldPlans = $this->dao->select('plan')->from(TABLE_PROJECTPRODUCT)->where('project')->eq($executionID)->andWhere('plan')->ne(0)->fetchPairs('plan'); $oldPlans = $this->dao->select('plan')->from(TABLE_PROJECTPRODUCT)->where('project')->eq($executionID)->andWhere('plan')->ne(0)->fetchPairs('plan');
$oldPlanStories = $this->dao->select('t1.story')->from(TABLE_PROJECTSTORY)->alias('t1')
->leftJoin(TABLE_PROJECTPRODUCT)->alias('t2')->on('t1.project=t2.project')
->where('t1.project')->eq($executionID)
->andWhere('t2.plan')->in(array_keys($oldPlans))
->fetchAll('story');
$oldProducts = $this->execution->getProducts($executionID); $oldProducts = $this->execution->getProducts($executionID);
$changes = $this->execution->update($executionID); $changes = $this->execution->update($executionID);
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError())); if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
@@ -1411,7 +1405,7 @@ class execution extends control
if(!empty($newPlans) and !empty($diffResult)) if(!empty($newPlans) and !empty($diffResult))
{ {
$projectID = $this->dao->select('project')->from(TABLE_EXECUTION)->where('id')->eq($executionID)->fetch('project'); $projectID = $this->dao->select('project')->from(TABLE_EXECUTION)->where('id')->eq($executionID)->fetch('project');
$this->loadModel('productplan')->linkProject($executionID, $_POST['plans'], $oldPlanStories); $this->loadModel('productplan')->linkProject($executionID, $_POST['plans']);
$this->productplan->linkProject($projectID, $_POST['plans']); $this->productplan->linkProject($projectID, $_POST['plans']);
} }
+6 -5
View File
@@ -442,7 +442,7 @@ class executionModel extends model
$oldExecution = $this->dao->findById($executionID)->from(TABLE_EXECUTION)->fetch(); $oldExecution = $this->dao->findById($executionID)->from(TABLE_EXECUTION)->fetch();
/* Judgment of required items. */ /* Judgment of required items. */
if($this->post->code == '') if($oldExecution->type != 'stage' and $this->post->code == '')
{ {
dao::$errors['code'] = sprintf($this->lang->error->notempty, $this->lang->execution->code); dao::$errors['code'] = sprintf($this->lang->error->notempty, $this->lang->execution->code);
return false; return false;
@@ -502,7 +502,7 @@ class executionModel extends model
->checkIF($execution->begin != '', 'begin', 'date') ->checkIF($execution->begin != '', 'begin', 'date')
->checkIF($execution->end != '', 'end', 'date') ->checkIF($execution->end != '', 'end', 'date')
->checkIF($execution->end != '', 'end', 'gt', $execution->begin) ->checkIF($execution->end != '', 'end', 'gt', $execution->begin)
->check('code', 'unique', "id!=$executionID and deleted='0'") ->check('code', 'unique', "id!=$executionID and code!='' and deleted='0'")
->where('id')->eq($executionID) ->where('id')->eq($executionID)
->limit(1) ->limit(1)
->exec(); ->exec();
@@ -609,11 +609,11 @@ class executionModel extends model
$nameList[$executionName] = $executionName; $nameList[$executionName] = $executionName;
/* Check unique code for edited executions. */ /* Check unique code for edited executions. */
if(empty($executionCode)) if($projectModel == 'scrum' and empty($executionCode))
{ {
dao::$errors['code'][] = 'execution#' . $executionID . sprintf($this->lang->error->notempty, $this->lang->project->code); dao::$errors['code'][] = 'execution#' . $executionID . sprintf($this->lang->error->notempty, $this->lang->project->code);
} }
else elseif(!empty($executionCode))
{ {
/* Check unique code for edited executions. */ /* Check unique code for edited executions. */
if(isset($codeList[$executionCode])) dao::$errors['code'][] = 'execution#' . $executionID . sprintf($this->lang->error->unique, $this->lang->project->code, $executionCode); if(isset($codeList[$executionCode])) dao::$errors['code'][] = 'execution#' . $executionID . sprintf($this->lang->error->unique, $this->lang->project->code, $executionCode);
@@ -2190,7 +2190,7 @@ class executionModel extends model
$data->story = $storyID; $data->story = $storyID;
$data->version = $versions[$storyID]; $data->version = $versions[$storyID];
$data->order = ++$lastOrder; $data->order = ++$lastOrder;
$this->dao->insert(TABLE_PROJECTSTORY)->data($data)->exec(); $this->dao->replace(TABLE_PROJECTSTORY)->data($data)->exec();
$this->story->setStage($storyID); $this->story->setStage($storyID);
$this->linkCases($executionID, (int)$products[$storyID], $storyID); $this->linkCases($executionID, (int)$products[$storyID], $storyID);
@@ -3643,6 +3643,7 @@ class executionModel extends model
public function updateUserView($executionID, $objectType = 'sprint', $users = array()) public function updateUserView($executionID, $objectType = 'sprint', $users = array())
{ {
$this->loadModel('user')->updateUserView($executionID, $objectType, $users); $this->loadModel('user')->updateUserView($executionID, $objectType, $users);
$products = $this->getProducts($executionID, $withBranch = false); $products = $this->getProducts($executionID, $withBranch = false);
if(!empty($products)) $this->user->updateUserView(array_keys($products), 'product', $users); if(!empty($products)) $this->user->updateUserView(array_keys($products), 'product', $users);
} }
+1 -1
View File
@@ -64,7 +64,7 @@
<?php endif;?> <?php endif;?>
<td class='text-left'><?php echo $project->begin;?></td> <td class='text-left'><?php echo $project->begin;?></td>
<td class='text-left'><?php echo $project->end == LONG_TIME ? $this->lang->project->longTime : $project->end;?></td> <td class='text-left'><?php echo $project->end == LONG_TIME ? $this->lang->project->longTime : $project->end;?></td>
<?php $projectBudget = in_array($this->app->getClientLang(), ['zh-cn','zh-tw']) ? round((float)$project->budget / 10000, 2) . $this->lang->project->tenThousand : round((float)$project->budget, 2);?> <?php $projectBudget = in_array($this->app->getClientLang(), array('zh-cn','zh-tw')) ? round((float)$project->budget / 10000, 2) . $this->lang->project->tenThousand : round((float)$project->budget, 2);?>
<td class='text-right'><?php echo $project->budget != 0 ? zget($lang->project->currencySymbol, $project->budgetUnit) . ' ' . $projectBudget : $lang->project->future;?></td> <td class='text-right'><?php echo $project->budget != 0 ? zget($lang->project->currencySymbol, $project->budgetUnit) . ' ' . $projectBudget : $lang->project->future;?></td>
<td> <td>
<?php $userID = isset($PMList[$project->PM]) ? $PMList[$project->PM]->id : ''?> <?php $userID = isset($PMList[$project->PM]) ? $PMList[$project->PM]->id : ''?>
+1 -1
View File
@@ -11,7 +11,7 @@ $config->product->custom->batchEditFields = 'line,PO,QD,RD';
if($config->systemMode == 'new') $config->product->custom->batchEditFields .= ',program'; if($config->systemMode == 'new') $config->product->custom->batchEditFields .= ',program';
$config->product->list = new stdclass(); $config->product->list = new stdclass();
$config->product->list->exportFields = 'id,name,line,activeStories,changedStories,draftStories,closedStories,plans,releases,bugs,unResolvedBugs,assignToNullBugs'; $config->product->list->exportFields = 'id,program,name,line,activeRequirements,changedRequirements,draftRequirements,closedRequirements,activeStories,changedStories,draftStories,closedStories,plans,releases,bugs,unResolvedBugs,assignToNullBugs';
global $lang, $app; global $lang, $app;
$app->loadLang('story'); $app->loadLang('story');
+12 -7
View File
@@ -1238,13 +1238,18 @@ class product extends control
$productStats = $this->product->getStats($orderBy, null, $status); $productStats = $this->product->getStats($orderBy, null, $status);
foreach($productStats as $i => $product) foreach($productStats as $i => $product)
{ {
$product->line = zget($lines, $product->line, ''); $product->line = zget($lines, $product->line, '');
$product->activeStories = (int)$product->stories['active']; $product->activeRequirements = (int)$product->requirements['active'];
$product->changedStories = (int)$product->stories['changed']; $product->changedRequirements = (int)$product->requirements['changed'];
$product->draftStories = (int)$product->stories['draft']; $product->draftRequirements = (int)$product->requirements['draft'];
$product->closedStories = (int)$product->stories['closed']; $product->closedRequirements = (int)$product->requirements['closed'];
$product->unResolvedBugs = (int)$product->unResolved; $product->activeStories = (int)$product->stories['active'];
$product->assignToNullBugs = (int)$product->assignToNull; $product->changedStories = (int)$product->stories['changed'];
$product->draftStories = (int)$product->stories['draft'];
$product->closedStories = (int)$product->stories['closed'];
$product->unResolvedBugs = (int)$product->unResolved;
$product->assignToNullBugs = (int)$product->assignToNull;
$product->program = $product->programName;
if($this->post->exportType == 'selected') if($this->post->exportType == 'selected')
{ {
+5 -1
View File
@@ -26,7 +26,7 @@ $lang->product->other = 'Andere';
$lang->product->closed = 'Geschlossen'; $lang->product->closed = 'Geschlossen';
$lang->product->updateOrder = 'Ranking'; $lang->product->updateOrder = 'Ranking';
$lang->product->orderAction = "Rank {$lang->productCommon}"; $lang->product->orderAction = "Rank {$lang->productCommon}";
$lang->product->all = "Alle {$lang->productCommon}"; $lang->product->all = "{$lang->productCommon} List";
$lang->product->manageLine = "Manage {$lang->productCommon} Line"; $lang->product->manageLine = "Manage {$lang->productCommon} Line";
$lang->product->newLine = "Create {$lang->productCommon} Line"; $lang->product->newLine = "Create {$lang->productCommon} Line";
$lang->product->export = 'Exportiere Daten'; $lang->product->export = 'Exportiere Daten';
@@ -61,6 +61,10 @@ $lang->product->draftStories = 'Entwurf [S]';
$lang->product->draftStoriesTitle = 'Draft Stories'; $lang->product->draftStoriesTitle = 'Draft Stories';
$lang->product->closedStories = 'Geschlossene [S]'; $lang->product->closedStories = 'Geschlossene [S]';
$lang->product->closedStoriesTitle = 'Closed Stories'; $lang->product->closedStoriesTitle = 'Closed Stories';
$lang->product->activeRequirements = "Active {$lang->URCommon}";
$lang->product->changedRequirements = "Changed {$lang->URCommon}";
$lang->product->draftRequirements = "Draft {$lang->URCommon}";
$lang->product->closedRequirements = "Closed {$lang->URCommon}";
$lang->product->unResolvedBugs = 'Ungelöste [B]'; $lang->product->unResolvedBugs = 'Ungelöste [B]';
$lang->product->unResolvedBugsTitle = 'Active Bugs'; $lang->product->unResolvedBugsTitle = 'Active Bugs';
$lang->product->assignToNullBugs = 'Nicht zugewiesene [B]'; $lang->product->assignToNullBugs = 'Nicht zugewiesene [B]';
+5 -1
View File
@@ -24,7 +24,7 @@ $lang->product->mine = 'Mine';
$lang->product->other = 'Others'; $lang->product->other = 'Others';
$lang->product->closed = 'Closed'; $lang->product->closed = 'Closed';
$lang->product->updateOrder = 'Order'; $lang->product->updateOrder = 'Order';
$lang->product->all = "All {$lang->productCommon}s"; $lang->product->all = "{$lang->productCommon} List";
$lang->product->manageLine = "Manage {$lang->productCommon} Line"; $lang->product->manageLine = "Manage {$lang->productCommon} Line";
$lang->product->newLine = "Create {$lang->productCommon} Line"; $lang->product->newLine = "Create {$lang->productCommon} Line";
$lang->product->export = 'Export'; $lang->product->export = 'Export';
@@ -65,6 +65,10 @@ $lang->product->draftStories = 'Draft [S]';
$lang->product->draftStoriesTitle = 'Draft Stories'; $lang->product->draftStoriesTitle = 'Draft Stories';
$lang->product->closedStories = 'Closed [S]'; $lang->product->closedStories = 'Closed [S]';
$lang->product->closedStoriesTitle = 'Closed Stories'; $lang->product->closedStoriesTitle = 'Closed Stories';
$lang->product->activeRequirements = "Active {$lang->URCommon}";
$lang->product->changedRequirements = "Changed {$lang->URCommon}";
$lang->product->draftRequirements = "Draft {$lang->URCommon}";
$lang->product->closedRequirements = "Closed {$lang->URCommon}";
$lang->product->unResolvedBugs = 'Active [B]'; $lang->product->unResolvedBugs = 'Active [B]';
$lang->product->unResolvedBugsTitle = 'Active Bugs'; $lang->product->unResolvedBugsTitle = 'Active Bugs';
$lang->product->assignToNullBugs = 'Unassigned [B]'; $lang->product->assignToNullBugs = 'Unassigned [B]';
+5 -1
View File
@@ -26,7 +26,7 @@ $lang->product->other = 'Autres';
$lang->product->closed = 'Fermés'; $lang->product->closed = 'Fermés';
$lang->product->updateOrder = 'Ordre'; $lang->product->updateOrder = 'Ordre';
$lang->product->orderAction = "Rang {$lang->productCommon}"; $lang->product->orderAction = "Rang {$lang->productCommon}";
$lang->product->all = "Tous les {$lang->productCommon}s"; $lang->product->all = "{$lang->productCommon} List";
$lang->product->manageLine = "Manage {$lang->productCommon} Line"; $lang->product->manageLine = "Manage {$lang->productCommon} Line";
$lang->product->newLine = "Create {$lang->productCommon} Line"; $lang->product->newLine = "Create {$lang->productCommon} Line";
$lang->product->export = 'Export'; $lang->product->export = 'Export';
@@ -61,6 +61,10 @@ $lang->product->draftStories = 'Brouillon [S]';
$lang->product->draftStoriesTitle = 'Stories en Analyse'; $lang->product->draftStoriesTitle = 'Stories en Analyse';
$lang->product->closedStories = 'Fermées [S]'; $lang->product->closedStories = 'Fermées [S]';
$lang->product->closedStoriesTitle = 'Stories Fermées'; $lang->product->closedStoriesTitle = 'Stories Fermées';
$lang->product->activeRequirements = "Active {$lang->URCommon}";
$lang->product->changedRequirements = "Changed {$lang->URCommon}";
$lang->product->draftRequirements = "Draft {$lang->URCommon}";
$lang->product->closedRequirements = "Closed {$lang->URCommon}";
$lang->product->unResolvedBugs = 'Ouverts [B]'; $lang->product->unResolvedBugs = 'Ouverts [B]';
$lang->product->unResolvedBugsTitle = 'Bugs Ouverts'; $lang->product->unResolvedBugsTitle = 'Bugs Ouverts';
$lang->product->assignToNullBugs = 'Orphelins [B]'; $lang->product->assignToNullBugs = 'Orphelins [B]';
+5 -1
View File
@@ -26,7 +26,7 @@ $lang->product->other = 'Khác';
$lang->product->closed = 'Đã đóng'; $lang->product->closed = 'Đã đóng';
$lang->product->updateOrder = 'Sắp xếp'; $lang->product->updateOrder = 'Sắp xếp';
$lang->product->orderAction = "Đánh giá {$lang->productCommon}"; $lang->product->orderAction = "Đánh giá {$lang->productCommon}";
$lang->product->all = "Tất cả {$lang->productCommon}"; $lang->product->all = "{$lang->productCommon} List";
$lang->product->manageLine = "Manage {$lang->productCommon} Line"; $lang->product->manageLine = "Manage {$lang->productCommon} Line";
$lang->product->newLine = "Create {$lang->productCommon} Line"; $lang->product->newLine = "Create {$lang->productCommon} Line";
$lang->product->export = 'Xuất'; $lang->product->export = 'Xuất';
@@ -61,6 +61,10 @@ $lang->product->draftStories = 'Nháp [S]';
$lang->product->draftStoriesTitle = 'Câu chuyện nháp'; $lang->product->draftStoriesTitle = 'Câu chuyện nháp';
$lang->product->closedStories = 'Đã đóng [S]'; $lang->product->closedStories = 'Đã đóng [S]';
$lang->product->closedStoriesTitle = 'Câu chuyện đã đóng'; $lang->product->closedStoriesTitle = 'Câu chuyện đã đóng';
$lang->product->activeRequirements = "Active {$lang->URCommon}";
$lang->product->changedRequirements = "Changed {$lang->URCommon}";
$lang->product->draftRequirements = "Draft {$lang->URCommon}";
$lang->product->closedRequirements = "Closed {$lang->URCommon}";
$lang->product->unResolvedBugs = 'Kích hoạt [B]'; $lang->product->unResolvedBugs = 'Kích hoạt [B]';
$lang->product->unResolvedBugsTitle = 'Kích hoạt Bugs'; $lang->product->unResolvedBugsTitle = 'Kích hoạt Bugs';
$lang->product->assignToNullBugs = 'Chưa giao [B]'; $lang->product->assignToNullBugs = 'Chưa giao [B]';
+5 -1
View File
@@ -24,7 +24,7 @@ $lang->product->mine = '我负责';
$lang->product->other = '其他'; $lang->product->other = '其他';
$lang->product->closed = '已关闭'; $lang->product->closed = '已关闭';
$lang->product->updateOrder = '排序'; $lang->product->updateOrder = '排序';
$lang->product->all = "所有{$lang->productCommon}"; $lang->product->all = "{$lang->productCommon}列表";
$lang->product->manageLine = "维护{$lang->productCommon}线"; $lang->product->manageLine = "维护{$lang->productCommon}线";
$lang->product->newLine = "新建{$lang->productCommon}线"; $lang->product->newLine = "新建{$lang->productCommon}线";
$lang->product->export = '导出数据'; $lang->product->export = '导出数据';
@@ -65,6 +65,10 @@ $lang->product->draftStories = "草稿{$lang->SRCommon}";
$lang->product->draftStoriesTitle = "草稿{$lang->SRCommon}"; $lang->product->draftStoriesTitle = "草稿{$lang->SRCommon}";
$lang->product->closedStories = "已关闭{$lang->SRCommon}"; $lang->product->closedStories = "已关闭{$lang->SRCommon}";
$lang->product->closedStoriesTitle = "已关闭{$lang->SRCommon}"; $lang->product->closedStoriesTitle = "已关闭{$lang->SRCommon}";
$lang->product->activeRequirements = "激活{$lang->URCommon}";
$lang->product->changedRequirements = "已变更{$lang->URCommon}";
$lang->product->draftRequirements = "草稿{$lang->URCommon}";
$lang->product->closedRequirements = "已关闭{$lang->URCommon}";
$lang->product->unResolvedBugs = '未解决Bug'; $lang->product->unResolvedBugs = '未解决Bug';
$lang->product->unResolvedBugsTitle = '未解决Bug'; $lang->product->unResolvedBugsTitle = '未解决Bug';
$lang->product->assignToNullBugs = '未指派Bug'; $lang->product->assignToNullBugs = '未指派Bug';
+4
View File
@@ -65,6 +65,10 @@ $lang->product->draftStories = "草稿{$lang->SRCommon}";
$lang->product->draftStoriesTitle = "草稿{$lang->SRCommon}"; $lang->product->draftStoriesTitle = "草稿{$lang->SRCommon}";
$lang->product->closedStories = "已關閉{$lang->SRCommon}"; $lang->product->closedStories = "已關閉{$lang->SRCommon}";
$lang->product->closedStoriesTitle = "已關閉{$lang->SRCommon}"; $lang->product->closedStoriesTitle = "已關閉{$lang->SRCommon}";
$lang->product->activeRequirements = "激活{$lang->URCommon}";
$lang->product->changedRequirements = "已變更{$lang->URCommon}";
$lang->product->draftRequirements = "草稿{$lang->URCommon}";
$lang->product->closedRequirements = "已關閉{$lang->URCommon}";
$lang->product->unResolvedBugs = '未解決Bug'; $lang->product->unResolvedBugs = '未解決Bug';
$lang->product->unResolvedBugsTitle = '未解決Bug'; $lang->product->unResolvedBugsTitle = '未解決Bug';
$lang->product->assignToNullBugs = '未指派Bug'; $lang->product->assignToNullBugs = '未指派Bug';
+2 -1
View File
@@ -19,8 +19,9 @@
<?php endforeach;?> <?php endforeach;?>
</div> </div>
<div class="btn-toolbar pull-right"> <div class="btn-toolbar pull-right">
<?php common::printLink('product', 'export', "status=$browseType&orderBy=$orderBy", "<i class='icon-export muted'> </i>" . $lang->export, '', "class='btn btn-link export'")?>
<?php common::printLink('product', 'manageLine', '', "<i class='icon-edit'></i> &nbsp;" . $lang->product->line, '', 'class="btn btn-link iframe"', '', true);?> <?php common::printLink('product', 'manageLine', '', "<i class='icon-edit'></i> &nbsp;" . $lang->product->line, '', 'class="btn btn-link iframe"', '', true);?>
<?php common::printLink('product', 'create', '', '<i class="icon icon-plus"></i> ' . $lang->product->create, '', 'class="btn btn-primary"');?> <?php common::printLink('product', 'create', '', '<i class="icon icon-plus"></i>' . $lang->product->create, '', 'class="btn btn-primary"');?>
</div> </div>
</div> </div>
<div id="mainContent" class="main-row fade"> <div id="mainContent" class="main-row fade">
+1 -1
View File
@@ -76,7 +76,7 @@
<td class='c-status' title='<?php echo $status;?>'> <td class='c-status' title='<?php echo $status;?>'>
<span class="status-project status-<?php echo $project->status?>"><?php echo $status;?></span> <span class="status-project status-<?php echo $project->status?>"><?php echo $status;?></span>
</td> </td>
<?php $projectBudget = in_array($this->app->getClientLang(), ['zh-cn','zh-tw']) ? round((float)$project->budget / 10000, 2) . $this->lang->project->tenThousand : round((float)$project->budget, 2);?> <?php $projectBudget = in_array($this->app->getClientLang(), array('zh-cn','zh-tw')) ? round((float)$project->budget / 10000, 2) . $this->lang->project->tenThousand : round((float)$project->budget, 2);?>
<?php $budgetTitle = $project->budget != 0 ? zget($this->lang->project->currencySymbol, $project->budgetUnit) . ' ' . $projectBudget : $this->lang->project->future;?> <?php $budgetTitle = $project->budget != 0 ? zget($this->lang->project->currencySymbol, $project->budgetUnit) . ' ' . $projectBudget : $this->lang->project->future;?>
<?php $textStyle = $project->budget != 0 ? 'text-right' : 'text-center';?> <?php $textStyle = $project->budget != 0 ? 'text-right' : 'text-center';?>
<td title='<?php echo $budgetTitle;?>' class="text-ellipsis <?php echo $textStyle;?>"><?php echo $budgetTitle;?></td> <td title='<?php echo $budgetTitle;?>' class="text-ellipsis <?php echo $textStyle;?>"><?php echo $budgetTitle;?></td>
+1 -4
View File
@@ -582,14 +582,11 @@ class productplanModel extends model
* *
* @param int $projectID * @param int $projectID
* @param array $newPlans * @param array $newPlans
* @param array $oldPlanStories
* @access public * @access public
* @return void * @return void
*/ */
public function linkProject($projectID, $newPlans, $oldPlanStories = '') public function linkProject($projectID, $newPlans)
{ {
if(!empty($oldPlanStories)) $this->dao->delete()->from(TABLE_PROJECTSTORY)->where('project')->eq($projectID)->andWhere('story')->in(array_keys($oldPlanStories))->exec();
$this->loadModel('execution'); $this->loadModel('execution');
foreach($newPlans as $planID) foreach($newPlans as $planID)
{ {
+45 -13
View File
@@ -1,5 +1,6 @@
<?php <?php
/* Fields. */ /* Fields. */
$lang->program->id = '编号';
$lang->program->name = '项目集名称'; $lang->program->name = '项目集名称';
$lang->program->template = '项目集模板'; $lang->program->template = '项目集模板';
$lang->program->category = '项目集类型'; $lang->program->category = '项目集类型';
@@ -8,14 +9,27 @@ $lang->program->copy = '复制项目集';
$lang->program->status = '状态'; $lang->program->status = '状态';
$lang->program->PM = '负责人'; $lang->program->PM = '负责人';
$lang->program->budget = '预算'; $lang->program->budget = '预算';
$lang->program->progress = '项目进度'; $lang->program->budgetUnit = '预算单位';
$lang->program->children = '子项目集'; $lang->program->begin = '计划开始';
$lang->program->end = '计划完成';
$lang->program->stage = '阶段';
$lang->program->type = '类型';
$lang->program->pri = '优先级';
$lang->program->parent = '父项目集'; $lang->program->parent = '父项目集';
$lang->program->allInput = '项目集总投入';
$lang->program->teamCount = '总人数';
$lang->program->longTime = '长期';
$lang->program->view = '项目集详情'; $lang->program->view = '项目集详情';
$lang->program->exchangeRate = '汇率'; $lang->program->exchangeRate = '汇率';
$lang->program->openedBy = '由谁创建';
$lang->program->openedDate = '创建日期';
$lang->program->closedBy = '由谁关闭';
$lang->program->closedDate = '关闭日期';
$lang->program->canceledBy = '由谁取消';
$lang->program->canceledDate = '取消日期';
$lang->program->team = '团队';
$lang->program->order = '排序';
$lang->program->days = '可用工作日';
$lang->program->acl = '访问控制';
$lang->program->whitelist = '白名单';
$lang->program->deleted = '已删除';
/* Actions. */ /* Actions. */
$lang->program->common = '项目集'; $lang->program->common = '项目集';
@@ -24,6 +38,8 @@ $lang->program->create = '添加项目集';
$lang->program->createGuide = '选择项目模板'; $lang->program->createGuide = '选择项目模板';
$lang->program->edit = '编辑项目集'; $lang->program->edit = '编辑项目集';
$lang->program->browse = '项目集列表'; $lang->program->browse = '项目集列表';
$lang->program->view = '项目集详情';
$lang->program->copy = '复制项目集';
$lang->program->product = '产品列表'; $lang->program->product = '产品列表';
$lang->program->project = '项目集项目列表'; $lang->program->project = '项目集项目列表';
$lang->program->all = '所有项目集'; $lang->program->all = '所有项目集';
@@ -39,16 +55,11 @@ $lang->program->createStakeholder = '添加干系人';
$lang->program->unlinkStakeholder = '移除干系人'; $lang->program->unlinkStakeholder = '移除干系人';
$lang->program->batchUnlinkStakeholders = '批量移除干系人'; $lang->program->batchUnlinkStakeholders = '批量移除干系人';
$lang->program->unlink = '移除'; $lang->program->unlink = '移除';
$lang->program->moreProgram = '更多项目集';
$lang->program->confirmBatchUnlink = "您确定要批量移除这些干系人吗?";
$lang->program->stakeholderType = '干系人类型';
$lang->program->isStakeholderKey = '关键干系人';
$lang->program->importStakeholder = '从父项目集导入'; $lang->program->importStakeholder = '从父项目集导入';
$lang->program->unbindWhitelist = '移除白名单'; $lang->program->unbindWhitelist = '移除白名单';
$lang->program->importStakeholder = '从父项目集导入'; $lang->program->importStakeholder = '从父项目集导入';
$lang->program->manageMembers = '项目集团队'; $lang->program->manageMembers = '项目集团队';
$lang->program->beyondParentBudget = '已超出所属项目集的剩余预算'; $lang->program->beyondParentBudget = '已超出所属项目集的剩余预算';
$lang->program->parentBudget = '所属项目集剩余预算:';
$lang->program->beginLetterParent = "父项目集的开始日期:%s,开始日期不能小于父项目集的开始日期"; $lang->program->beginLetterParent = "父项目集的开始日期:%s,开始日期不能小于父项目集的开始日期";
$lang->program->endGreaterParent = "父项目集的完成日期:%s,完成日期不能大于父项目集的完成日期"; $lang->program->endGreaterParent = "父项目集的完成日期:%s,完成日期不能大于父项目集的完成日期";
$lang->program->beginGreateChild = "子项目集的最小开始日期:%s,父项目集的开始日期不能大于子项目集的最小开始日期"; $lang->program->beginGreateChild = "子项目集的最小开始日期:%s,父项目集的开始日期不能大于子项目集的最小开始日期";
@@ -61,12 +72,33 @@ $lang->program->changePRJUnit = '更新项目预算单位';
$lang->program->readjustTime = '重新调整项目集起止时间'; $lang->program->readjustTime = '重新调整项目集起止时间';
$lang->program->accessDenied = '你无权访问该项目集'; $lang->program->accessDenied = '你无权访问该项目集';
$lang->program->progress = '项目进度';
$lang->program->children = '子项目集';
$lang->program->allInput = '项目集总投入';
$lang->program->teamCount = '总人数';
$lang->program->longTime = '长期';
$lang->program->moreProgram = '更多项目集';
$lang->program->stakeholderType = '干系人类型';
$lang->program->parentBudget = '所属项目集剩余预算:';
$lang->program->isStakeholderKey = '关键干系人';
$lang->program->stakeholderTypeList['inside'] = '内部'; $lang->program->stakeholderTypeList['inside'] = '内部';
$lang->program->stakeholderTypeList['outside'] = '外部'; $lang->program->stakeholderTypeList['outside'] = '外部';
$lang->program->noProgram = '暂时没有项目集'; $lang->program->noProgram = '暂时没有项目集';
$lang->program->showClosed = '显示已关闭'; $lang->program->showClosed = '显示已关闭';
$lang->program->tips = '选择了父项目集,则可关联该父项目集下的产品。如果项目未选择任何项目集,则系统会默认创建一个和该项目同名的产品并关联该项目。'; $lang->program->tips = '选择了父项目集,则可关联该父项目集下的产品。如果项目未选择任何项目集,则系统会默认创建一个和该项目同名的产品并关联该项目。';
$lang->program->confirmBatchUnlink = "您确定要批量移除这些干系人吗?";
$lang->program->beginLetterParent = "父项目集的开始日期:%s,开始日期不能小于父项目集的开始日期";
$lang->program->endGreaterParent = "父项目集的完成日期:%s,完成日期不能大于父项目集的完成日期";
$lang->program->beginGreateChild = "子项目集的最小开始日期:%s,父项目集的开始日期不能大于子项目集的最小开始日期";
$lang->program->endLetterChild = "子项目的最大完成日期:%s,父项目的完成日期不能小于子项目的最大完成日期";
$lang->program->closeErrorMessage = '存在子项目集或项目为未关闭状态';
$lang->program->hasChildren = '该项目集有子项目集或项目存在,不能删除。';
$lang->program->confirmDelete = "您确定要删除吗?";
$lang->program->readjustTime = '重新调整项目集起止时间';
$lang->program->accessDenied = '你无权访问该项目集';
$lang->program->beyondParentBudget = '已超出所属项目集的剩余预算';
$lang->program->endList[31] = '一个月'; $lang->program->endList[31] = '一个月';
$lang->program->endList[93] = '三个月'; $lang->program->endList[93] = '三个月';
+1 -1
View File
@@ -70,7 +70,7 @@
<?php echo html::a($this->createLink('user', 'profile', "userID=$userID", '', true), $userName, '', "title='{$userName}' data-toggle='modal' data-type='iframe' data-width='600'");?> <?php echo html::a($this->createLink('user', 'profile', "userID=$userID", '', true), $userName, '', "title='{$userName}' data-toggle='modal' data-type='iframe' data-width='600'");?>
<?php endif;?> <?php endif;?>
</td> </td>
<?php $programBudget = in_array($this->app->getClientLang(), ['zh-cn','zh-tw']) ? round((float)$program->budget / 10000, 2) . $lang->project->tenThousand : round((float)$program->budget, 2);?> <?php $programBudget = in_array($this->app->getClientLang(), array('zh-cn','zh-tw')) ? round((float)$program->budget / 10000, 2) . $lang->project->tenThousand : round((float)$program->budget, 2);?>
<td class='text-right'><?php echo $program->budget != 0 ? zget($lang->project->currencySymbol, $program->budgetUnit) . ' ' . $programBudget : $lang->project->future;?></td> <td class='text-right'><?php echo $program->budget != 0 ? zget($lang->project->currencySymbol, $program->budgetUnit) . ' ' . $programBudget : $lang->project->future;?></td>
<td><?php echo $program->begin;?></td> <td><?php echo $program->begin;?></td>
<td><?php echo $program->end == LONG_TIME ? $lang->program->longTime : $program->end;?></td> <td><?php echo $program->end == LONG_TIME ? $lang->program->longTime : $program->end;?></td>
+3 -3
View File
@@ -11,7 +11,7 @@ $config->project->editor->activate = array('id' => 'comment', 'tools' => 'simple
$config->project->editor->view = array('id' => 'lastComment', 'tools' => 'simpleTools'); $config->project->editor->view = array('id' => 'lastComment', 'tools' => 'simpleTools');
$config->project->list = new stdclass(); $config->project->list = new stdclass();
$config->project->list->exportFields = 'id,name,code,template,product,status,begin,end,budget,PM,end,desc'; $config->project->list->exportFields = 'id,parent,name,linkedProducts,status,begin,end,budget,PM,end,desc';
$config->project->create = new stdclass(); $config->project->create = new stdclass();
$config->project->edit = new stdclass(); $config->project->edit = new stdclass();
@@ -92,14 +92,14 @@ $config->project->datatable->fieldList['estimate']['pri'] = '8';
$config->project->datatable->fieldList['consume']['title'] = 'consume'; $config->project->datatable->fieldList['consume']['title'] = 'consume';
$config->project->datatable->fieldList['consume']['fixed'] = 'no'; $config->project->datatable->fieldList['consume']['fixed'] = 'no';
$config->project->datatable->fieldList['consume']['width'] = '70'; $config->project->datatable->fieldList['consume']['width'] = '80';
$config->project->datatable->fieldList['consume']['maxWidth'] = '80'; $config->project->datatable->fieldList['consume']['maxWidth'] = '80';
$config->project->datatable->fieldList['consume']['required'] = 'no'; $config->project->datatable->fieldList['consume']['required'] = 'no';
$config->project->datatable->fieldList['consume']['sort'] = 'no'; $config->project->datatable->fieldList['consume']['sort'] = 'no';
$config->project->datatable->fieldList['consume']['pri'] = '7'; $config->project->datatable->fieldList['consume']['pri'] = '7';
$config->project->datatable->fieldList['progress']['title'] = 'progress'; $config->project->datatable->fieldList['progress']['title'] = 'progress';
$config->project->datatable->fieldList['progress']['fixed'] = 'right'; $config->project->datatable->fieldList['progress']['fixed'] = 'no';
$config->project->datatable->fieldList['progress']['width'] = '60'; $config->project->datatable->fieldList['progress']['width'] = '60';
$config->project->datatable->fieldList['progress']['required'] = 'no'; $config->project->datatable->fieldList['progress']['required'] = 'no';
$config->project->datatable->fieldList['progress']['sort'] = 'no'; $config->project->datatable->fieldList['progress']['sort'] = 'no';
+8 -9
View File
@@ -68,7 +68,7 @@ class project extends control
unset($fields[$key]); unset($fields[$key]);
} }
$projects = $this->project->getList($status, $orderBy, null); $projects = $this->project->getInfoList($status, 30, $orderBy, null);
$users = $this->loadModel('user')->getPairs('noletter'); $users = $this->loadModel('user')->getPairs('noletter');
foreach($projects as $i => $project) foreach($projects as $i => $project)
{ {
@@ -77,6 +77,10 @@ class project extends control
$project->model = zget($projectLang->modelList, $project->model); $project->model = zget($projectLang->modelList, $project->model);
$project->product = zget($projectLang->productList, $project->product); $project->product = zget($projectLang->productList, $project->product);
$project->budget = $project->budget . zget($projectLang->unitList, $project->budgetUnit); $project->budget = $project->budget . zget($projectLang->unitList, $project->budgetUnit);
$project->parent = $project->parentName;
$linkedProducts = $this->project->getProducts($project->id, false);
$project->linkedProducts = implode('', $linkedProducts);
if($this->post->exportType == 'selected') if($this->post->exportType == 'selected')
{ {
@@ -419,12 +423,7 @@ class project extends control
if($_POST) if($_POST)
{ {
$oldPlans = $this->dao->select('plan')->from(TABLE_PROJECTPRODUCT)->where('project')->eq($projectID)->fetchPairs('plan'); $oldPlans = $this->dao->select('plan')->from(TABLE_PROJECTPRODUCT)->where('project')->eq($projectID)->andWhere('plan')->ne(0)->fetchPairs('plan');
$oldPlanStories = $this->dao->select('t1.story')->from(TABLE_PROJECTSTORY)->alias('t1')
->leftJoin(TABLE_PROJECTPRODUCT)->alias('t2')->on('t1.project=t2.project')
->where('t1.project')->eq($projectID)
->andWhere('t2.plan')->in(array_keys($oldPlans))
->fetchAll('story');
$changes = $this->project->update($projectID); $changes = $this->project->update($projectID);
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError())); if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
@@ -439,7 +438,7 @@ class project extends control
$diffResult = array_diff($oldPlans, $_POST['plans']); $diffResult = array_diff($oldPlans, $_POST['plans']);
if(!empty($_POST['plans']) and !empty($diffResult)) if(!empty($_POST['plans']) and !empty($diffResult))
{ {
$this->loadModel('productplan')->linkProject($projectID, $_POST['plans'], $oldPlanStories); $this->loadModel('productplan')->linkProject($projectID, $_POST['plans']);
} }
if(isonlybody()) return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'parent')); if(isonlybody()) return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'parent'));
@@ -1623,7 +1622,7 @@ class project extends control
$response = array(); $response = array();
$response['result'] = true; $response['result'] = true;
$response['message'] = $this->lang->project->changeProgramTip; $response['message'] = $this->lang->project->changeProgramTip;
/* Get new program products. */ /* Get new program products. */
$newProducts = $this->program->getProductPairs($programID, 'assign', 'noclosed'); $newProducts = $this->program->getProductPairs($programID, 'assign', 'noclosed');
$response['newProducts'] = html::select("newProducts", array('0' => '') + $newProducts, '', "class='form-control chosen' onchange='loadBranches(this)'"); $response['newProducts'] = html::select("newProducts", array('0' => '') + $newProducts, '', "class='form-control chosen' onchange='loadBranches(this)'");
+15 -1
View File
@@ -47,7 +47,7 @@ $lang->project->errorNoProducts = '最少关联一个产品';
$lang->project->copyNoProject = '没有可用的项目来复制'; $lang->project->copyNoProject = '没有可用的项目来复制';
$lang->project->searchByName = '输入项目名称进行检索'; $lang->project->searchByName = '输入项目名称进行检索';
$lang->project->deleted = '已删除'; $lang->project->deleted = '已删除';
$lang->project->linkedProducts = '已关联'; $lang->project->linkedProducts = '已关联产品';
$lang->project->unlinkedProducts = '未关联'; $lang->project->unlinkedProducts = '未关联';
$lang->project->testreport = '测试报告'; $lang->project->testreport = '测试报告';
$lang->project->selectProgram = '项目集筛选'; $lang->project->selectProgram = '项目集筛选';
@@ -55,7 +55,9 @@ $lang->project->teamMember = '团队成员';
/* Fields. */ /* Fields. */
$lang->project->common = '项目'; $lang->project->common = '项目';
$lang->project->id = '项目编号';
$lang->project->stage = '阶段'; $lang->project->stage = '阶段';
$lang->project->model = '项目管理方式';
$lang->project->PM = '负责人'; $lang->project->PM = '负责人';
$lang->project->name = '项目名称'; $lang->project->name = '项目名称';
$lang->project->category = '项目类型'; $lang->project->category = '项目类型';
@@ -65,7 +67,19 @@ $lang->project->copy = '复制项目';
$lang->project->begin = '计划开始'; $lang->project->begin = '计划开始';
$lang->project->end = '计划完成'; $lang->project->end = '计划完成';
$lang->project->status = '状态'; $lang->project->status = '状态';
$lang->project->subStatus = '子状态';
$lang->project->type = '项目类型';
$lang->project->pri = '优先级';
$lang->project->openedBy = '由谁创建';
$lang->project->openedDate = '创建日期';
$lang->project->closedBy = '由谁关闭';
$lang->project->closedDate = '关闭日期';
$lang->project->canceledBy = '由谁取消';
$lang->project->canceledDate = '取消日期';
$lang->project->team = '团队';
$lang->project->order = '排序';
$lang->project->budget = '预算'; $lang->project->budget = '预算';
$lang->project->budgetUnit = '预算单位';
$lang->project->template = '项目模板'; $lang->project->template = '项目模板';
$lang->project->estimate = '预计'; $lang->project->estimate = '预计';
$lang->project->consume = '消耗'; $lang->project->consume = '消耗';
+26 -3
View File
@@ -780,7 +780,6 @@ class projectModel extends model
$whitelist = explode(',', $project->whitelist); $whitelist = explode(',', $project->whitelist);
$this->loadModel('personnel')->updateWhitelist($whitelist, 'project', $projectID); $this->loadModel('personnel')->updateWhitelist($whitelist, 'project', $projectID);
if($project->acl != 'open') $this->loadModel('user')->updateUserView($projectID, 'project');
/* Create doc lib. */ /* Create doc lib. */
$this->app->loadLang('doc'); $this->app->loadLang('doc');
@@ -962,7 +961,13 @@ class projectModel extends model
$whitelist = explode(',', $project->whitelist); $whitelist = explode(',', $project->whitelist);
$this->loadModel('personnel')->updateWhitelist($whitelist, 'project', $projectID); $this->loadModel('personnel')->updateWhitelist($whitelist, 'project', $projectID);
if($project->acl != 'open') $this->loadModel('user')->updateUserView($projectID, 'project'); if($project->acl != 'open')
{
$this->loadModel('user')->updateUserView($projectID, 'project');
$executions = $this->dao->select('id')->from(TABLE_EXECUTION)->where('project')->eq($projectID)->fetchPairs('id', 'id');
if($executions) $this->user->updateUserView($executions, 'sprint');
}
if($project->acl == 'private') if($project->acl == 'private')
{ {
@@ -1356,7 +1361,7 @@ class projectModel extends model
if($id == 'budget') if($id == 'budget')
{ {
$projectBudget = in_array($this->app->getClientLang(), ['zh-cn','zh-tw']) ? round((float)$project->budget / 10000, 2) . $this->lang->project->tenThousand : round((float)$project->budget, 2); $projectBudget = in_array($this->app->getClientLang(), array('zh-cn','zh-tw')) ? round((float)$project->budget / 10000, 2) . $this->lang->project->tenThousand : round((float)$project->budget, 2);
$budgetTitle = $project->budget != 0 ? zget($this->lang->project->currencySymbol, $project->budgetUnit) . ' ' . $projectBudget : $this->lang->project->future; $budgetTitle = $project->budget != 0 ? zget($this->lang->project->currencySymbol, $project->budgetUnit) . ' ' . $projectBudget : $this->lang->project->future;
$title = "title='$budgetTitle'"; $title = "title='$budgetTitle'";
@@ -1367,6 +1372,7 @@ class projectModel extends model
if($id == 'surplus') $title = "title='{$project->hours->totalLeft} {$this->lang->execution->workHour}'"; if($id == 'surplus') $title = "title='{$project->hours->totalLeft} {$this->lang->execution->workHour}'";
echo "<td class='$class' $title>"; echo "<td class='$class' $title>";
if(isset($this->config->bizVersion)) $this->loadModel('flow')->printFlowCell('project', $project, $id);
switch($id) switch($id)
{ {
case 'id': case 'id':
@@ -1517,6 +1523,23 @@ class projectModel extends model
if($needUpdate) $this->user->updateUserView($needUpdate, 'product', $members); if($needUpdate) $this->user->updateUserView($needUpdate, 'product', $members);
} }
/**
* Update userview for involved product and execution.
*
* @param int $projectID
* @param array $users
* @access public
* @return void
*/
public function updateInvolvedUserView($projectID, $users = array())
{
$products = $this->dao->select('product')->from(TABLE_PROJECTPRODUCT)->where('project')->eq($projectID)->fetchPairs('product', 'product');
$this->loadModel('user')->updateUserView($products, 'product', $stakeholder);
$executions = $this->dao->select('id')->from(TABLE_EXECUTION)->where('project')->eq($projectID)->fetchPairs('id', 'id');
if($executions) $this->user->updateUserView($executions, 'sprint', $stakeholder);
}
/** /**
* Get team members. * Get team members.
* *
+1
View File
@@ -11,6 +11,7 @@
*/ */
?> ?>
<?php include '../../common/view/header.html.php';?> <?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/datatable.fix.html.php';?>
<?php <?php
js::set('orderBy', $orderBy); js::set('orderBy', $orderBy);
js::set('programID', $programID); js::set('programID', $programID);
@@ -68,6 +68,7 @@
<?php echo html::a('#',"<i class='icon-list'></i> &nbsp;", '', "class='btn btn-icon' title='{$lang->project->bylist}' id='switchButton' data-type='bylist'");?> <?php echo html::a('#',"<i class='icon-list'></i> &nbsp;", '', "class='btn btn-icon' title='{$lang->project->bylist}' id='switchButton' data-type='bylist'");?>
<?php echo html::a('#',"<i class='icon-cards-view'></i> &nbsp;", '', "class='btn btn-icon text-primary' title='{$lang->project->bycard}' id='switchButton' data-type='bycard'");?> <?php echo html::a('#',"<i class='icon-cards-view'></i> &nbsp;", '', "class='btn btn-icon text-primary' title='{$lang->project->bycard}' id='switchButton' data-type='bycard'");?>
</div> </div>
<?php common::printLink('project', 'export', "status=$browseType&orderBy=$orderBy", "<i class='icon-export muted'> </i>" . $lang->export, '', "class='btn btn-link export'")?>
<?php if(isset($this->config->maxVersion)):?> <?php if(isset($this->config->maxVersion)):?>
<?php common::printLink('project', 'createGuide', "programID=$programID", '<i class="icon icon-plus"></i> ' . $lang->project->create, '', 'class="btn btn-primary" data-toggle="modal" data-target="#guideDialog"');?> <?php common::printLink('project', 'createGuide', "programID=$programID", '<i class="icon icon-plus"></i> ' . $lang->project->create, '', 'class="btn btn-primary" data-toggle="modal" data-target="#guideDialog"');?>
<?php elseif($this->config->systemMode == 'new'):?> <?php elseif($this->config->systemMode == 'new'):?>
+11 -3
View File
@@ -37,6 +37,7 @@
<?php echo html::a('#',"<i class='icon-list'></i> &nbsp;", '', "class='btn btn-icon text-primary' title='{$lang->project->bylist}' id='switchButton' data-type='bylist'");?> <?php echo html::a('#',"<i class='icon-list'></i> &nbsp;", '', "class='btn btn-icon text-primary' title='{$lang->project->bylist}' id='switchButton' data-type='bylist'");?>
<?php echo html::a('#',"<i class='icon-cards-view'></i> &nbsp;", '', "class='btn btn-icon' title='{$lang->project->bycard}' id='switchButton' data-type='bycard'");?> <?php echo html::a('#',"<i class='icon-cards-view'></i> &nbsp;", '', "class='btn btn-icon' title='{$lang->project->bycard}' id='switchButton' data-type='bycard'");?>
</div> </div>
<?php common::printLink('project', 'export', "status=$browseType&orderBy=$orderBy", "<i class='icon-export muted'> </i>" . $lang->export, '', "class='btn btn-link export'")?>
<?php if(isset($this->config->maxVersion)):?> <?php if(isset($this->config->maxVersion)):?>
<?php common::printLink('project', 'createGuide', "programID=$programID", '<i class="icon icon-plus"></i> ' . $lang->project->create, '', 'class="btn btn-primary" data-toggle="modal" data-target="#guideDialog"');?> <?php common::printLink('project', 'createGuide', "programID=$programID", '<i class="icon icon-plus"></i> ' . $lang->project->create, '', 'class="btn btn-primary" data-toggle="modal" data-target="#guideDialog"');?>
<?php elseif($this->config->systemMode == 'new'):?> <?php elseif($this->config->systemMode == 'new'):?>
@@ -78,10 +79,16 @@
<nav class="btn-toolbar pull-right"></nav> <nav class="btn-toolbar pull-right"></nav>
</div> </div>
<?php <?php
$vars = "programID=$programID&browseType=$browseType&param=$param&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}"; $vars = "programID=$programID&browseType=$browseType&param=$param&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}";
$setting = $this->datatable->getSetting('project'); $datatableId = $this->moduleName . ucfirst($this->methodName);
$useDatatable = (isset($config->datatable->$datatableId->mode) and $config->datatable->$datatableId->mode == 'datatable');
$setting = $this->datatable->getSetting('project');
$widths = $this->datatable->setFixedFieldWidth($setting);
if($useDatatable) include '../../common/view/datatable.html.php';
?> ?>
<table class='table has-sort-head'> <?php if(!$useDatatable) echo '<div class="table-responsive">';?>
<table class='table has-sort-head <?php if($useDatatable) echo 'datatable';?>' data-fixed-left-width='<?php echo $widths['leftWidth']?>' data-fixed-right-width='<?php echo $widths['rightWidth']?>'>
<?php $canBatchEdit = $this->config->systemMode == 'new' ? common::hasPriv('project', 'batchEdit') : common::hasPriv('project', 'batchEdit');?> <?php $canBatchEdit = $this->config->systemMode == 'new' ? common::hasPriv('project', 'batchEdit') : common::hasPriv('project', 'batchEdit');?>
<thead> <thead>
<tr> <tr>
@@ -104,6 +111,7 @@
<?php endforeach;?> <?php endforeach;?>
</tbody> </tbody>
</table> </table>
<?php if(!$useDatatable) echo '</div>';?>
<div class='table-footer'> <div class='table-footer'>
<?php if($canBatchEdit):?> <?php if($canBatchEdit):?>
<div class="checkbox-primary check-all"><label><?php echo $lang->selectAll?></label></div> <div class="checkbox-primary check-all"><label><?php echo $lang->selectAll?></label></div>
+1 -1
View File
@@ -136,13 +136,13 @@
</div> </div>
</td> </td>
</tr> </tr>
<?php $this->printExtendFields('', 'table');?>
<tr> <tr>
<th><?php echo $lang->project->desc;?></th> <th><?php echo $lang->project->desc;?></th>
<td colspan='3'> <td colspan='3'>
<?php echo html::textarea('desc', '', "rows='6' class='form-control kindeditor' hidefocus='true'" . (strpos($requiredFields, 'desc') !== false ? ' required' : ''));?> <?php echo html::textarea('desc', '', "rows='6' class='form-control kindeditor' hidefocus='true'" . (strpos($requiredFields, 'desc') !== false ? ' required' : ''));?>
</td> </td>
</tr> </tr>
<?php $this->printExtendFields('', 'table', 'columns=3');?>
<tr> <tr>
<th><?php echo $lang->project->acl;?></th> <th><?php echo $lang->project->acl;?></th>
<td colspan='3' class='aclBox'><?php echo nl2br(html::radio('acl', $lang->project->aclList, $acl, "onclick='setWhite(this.value);'", 'block'));?></td> <td colspan='3' class='aclBox'><?php echo nl2br(html::radio('acl', $lang->project->aclList, $acl, "onclick='setWhite(this.value);'", 'block'));?></td>
+1
View File
@@ -149,6 +149,7 @@
<?php echo html::textarea('desc', $project->desc, "rows='6' class='form-control kindeditor' hidefocus='true'" . (strpos($requiredFields, 'desc') !== false ? ' required' : ''));?> <?php echo html::textarea('desc', $project->desc, "rows='6' class='form-control kindeditor' hidefocus='true'" . (strpos($requiredFields, 'desc') !== false ? ' required' : ''));?>
</td> </td>
</tr> </tr>
<?php $this->printExtendFields('', 'table', 'columns=3');?>
<tr> <tr>
<th><?php echo $lang->project->acl;?></th> <th><?php echo $lang->project->acl;?></th>
<td colspan='3' class='aclBox'><?php echo nl2br(html::radio('acl', $aclList, $project->acl, "onclick='setWhite(this.value);'", 'block'));?></td> <td colspan='3' class='aclBox'><?php echo nl2br(html::radio('acl', $aclList, $project->acl, "onclick='setWhite(this.value);'", 'block'));?></td>
-1
View File
@@ -170,7 +170,6 @@ class repo extends control
if(strtolower($repo->SCM) == 'gitlab') if(strtolower($repo->SCM) == 'gitlab')
{ {
$projects = $this->loadModel('gitlab')->apiGetProjects($repo->gitlab); $projects = $this->loadModel('gitlab')->apiGetProjects($repo->gitlab);
$options = array(); $options = array();
foreach($projects as $project) $options[$project->id] = $project->name_with_namespace; foreach($projects as $project) $options[$project->id] = $project->name_with_namespace;
+1 -1
View File
@@ -63,7 +63,7 @@ $lang->reportList->test->lists[13] = 'Bug指派表|report|bugassign';
$lang->reportList->staff->lists[10] = '员工负载表|report|workload'; $lang->reportList->staff->lists[10] = '员工负载表|report|workload';
$lang->report->id = '编号'; $lang->report->id = '编号';
$lang->report->execution = $lang->executionCommon; $lang->report->execution = '执行';
$lang->report->product = $lang->productCommon; $lang->report->product = $lang->productCommon;
$lang->report->user = '姓名'; $lang->report->user = '姓名';
$lang->report->bugTotal = 'Bug'; $lang->report->bugTotal = 'Bug';
+2 -1
View File
@@ -166,7 +166,8 @@ class search extends control
} }
else else
{ {
return $this->send(array('result' => 'unfinished', 'message' => sprintf($this->lang->search->buildResult, zget($this->lang->searchObjects, ($result['type'] == 'case' ? 'testcase' : $result['type']), $result['type']), $result['count']),'next' => inlink('buildIndex', "type={$result['type']}&lastID={$result['lastID']}") )); $type = zget($this->lang->searchObjects, ($result['type'] == 'case' ? 'testcase' : $result['type']), $result['type']);
return $this->send(array('result' => 'unfinished', 'message' => sprintf($this->lang->search->buildResult, $type, $type, $result['count']), 'type' => $type, 'count' => $result['count'], 'next' => inlink('buildIndex', "type={$result['type']}&lastID={$result['lastID']}") ));
} }
} }
+12 -1
View File
@@ -13,8 +13,19 @@ $(document).ready(function()
} }
else else
{ {
className = response.type + 'count';
$typeCount = $('#resultBox .' + className)
if($typeCount.length == 0)
{
$('#resultBox').append("<li class='text-success'>" + response.message + "</li>");
}
else
{
count = parseInt($typeCount.html()) + parseInt(response.count);
$typeCount.html(count);
}
$('#execButton').attr('href', response.next); $('#execButton').attr('href', response.next);
$('#resultBox').append("<li class='text-success'>" + response.message + "</li>");
return $('#execButton').click(); return $('#execButton').click();
} }
}); });
+1 -1
View File
@@ -68,7 +68,7 @@ $lang->search->preview = 'Preview';
$lang->search->result = 'Search Results'; $lang->search->result = 'Search Results';
$lang->search->buildSuccessfully = 'Search index initialized.'; $lang->search->buildSuccessfully = 'Search index initialized.';
$lang->search->executeInfo = '%s search results for you in %s seconds.'; $lang->search->executeInfo = '%s search results for you in %s seconds.';
$lang->search->buildResult = 'Created index %s and added %s records.'; $lang->search->buildResult = "Create index %s and created <strong class='%scount'>%s</strong> records.";
$lang->search->modules['all'] = 'All'; $lang->search->modules['all'] = 'All';
$lang->search->modules['task'] = 'Task'; $lang->search->modules['task'] = 'Task';
+1 -1
View File
@@ -68,7 +68,7 @@ $lang->search->preview = 'Preview';
$lang->search->result = 'Search Results'; $lang->search->result = 'Search Results';
$lang->search->buildSuccessfully = 'Search index initialized.'; $lang->search->buildSuccessfully = 'Search index initialized.';
$lang->search->executeInfo = '%s search results for you in %s seconds.'; $lang->search->executeInfo = '%s search results for you in %s seconds.';
$lang->search->buildResult = 'Created index %s and added %s records.'; $lang->search->buildResult = "Create index %s and created <strong class='%scount'>%s</strong> records.";
$lang->search->modules['all'] = 'All'; $lang->search->modules['all'] = 'All';
$lang->search->modules['task'] = 'Task'; $lang->search->modules['task'] = 'Task';
+1 -1
View File
@@ -68,7 +68,7 @@ $lang->search->preview = 'Preview';
$lang->search->result = 'Search Results'; $lang->search->result = 'Search Results';
$lang->search->buildSuccessfully = 'Search index initialized.'; $lang->search->buildSuccessfully = 'Search index initialized.';
$lang->search->executeInfo = '%s search results for you in %s seconds.'; $lang->search->executeInfo = '%s search results for you in %s seconds.';
$lang->search->buildResult = 'Created index %s and added %s records.'; $lang->search->buildResult = "Create index %s and created <strong class='%scount'>%s</strong> records.";
$lang->search->modules['all'] = 'All'; $lang->search->modules['all'] = 'All';
$lang->search->modules['task'] = 'Task'; $lang->search->modules['task'] = 'Task';
+1 -1
View File
@@ -68,7 +68,7 @@ $lang->search->preview = 'Preview';
$lang->search->result = 'Kết quả tìm kiếm'; $lang->search->result = 'Kết quả tìm kiếm';
$lang->search->buildSuccessfully = 'Tìm kiếm khởi tạo chỉ mục.'; $lang->search->buildSuccessfully = 'Tìm kiếm khởi tạo chỉ mục.';
$lang->search->executeInfo = '%s kết quả tìm kiếm trong %s giây'; $lang->search->executeInfo = '%s kết quả tìm kiếm trong %s giây';
$lang->search->buildResult = 'Chỉ mục được tao %s và được thêm %s mục'; $lang->search->buildResult = "Create index %s and created <strong class='%scount'>%s</strong> records.";
$lang->search->modules['all'] = 'Tất cả'; $lang->search->modules['all'] = 'Tất cả';
$lang->search->modules['task'] = 'Nhiệm vụ'; $lang->search->modules['task'] = 'Nhiệm vụ';
+1 -1
View File
@@ -68,7 +68,7 @@ $lang->search->preview = '预览';
$lang->search->result = '搜索结果'; $lang->search->result = '搜索结果';
$lang->search->buildSuccessfully = '初始化搜索索引成功'; $lang->search->buildSuccessfully = '初始化搜索索引成功';
$lang->search->executeInfo = '为您找到相关结果%s个,耗时%s秒'; $lang->search->executeInfo = '为您找到相关结果%s个,耗时%s秒';
$lang->search->buildResult = '创建 %s 索引, 新增 %s 条记录;'; $lang->search->buildResult = "创建 %s 索引, 已创建 <strong class='%scount'>%s</strong> 条记录;";
$lang->search->modules['all'] = '全部'; $lang->search->modules['all'] = '全部';
$lang->search->modules['task'] = '任务'; $lang->search->modules['task'] = '任务';
+10 -2
View File
@@ -31,6 +31,8 @@ class searchModel extends model
if($module == 'projectBug') $flowModule = 'bug'; if($module == 'projectBug') $flowModule = 'bug';
$fields = $this->loadModel('workflowfield')->getList($flowModule); $fields = $this->loadModel('workflowfield')->getList($flowModule);
$maxCount = $this->config->maxCount;
$this->config->maxCount = 0;
foreach($fields as $field) foreach($fields as $field)
{ {
@@ -60,6 +62,7 @@ class searchModel extends model
$searchConfig['fields'][$field->field] = $field->name; $searchConfig['fields'][$field->field] = $field->name;
$searchConfig['params'][$field->field] = array('operator' => $operator, 'control' => $control, 'values' => $options, 'class' => $class); $searchConfig['params'][$field->field] = array('operator' => $operator, 'control' => $control, 'values' => $options, 'class' => $class);
} }
$this->config->maxCount = $maxCount;
} }
$searchParams['module'] = $searchConfig['module']; $searchParams['module'] = $searchConfig['module'];
@@ -263,7 +266,7 @@ class searchModel extends model
if($hasUser) if($hasUser)
{ {
$users = $this->loadModel('user')->getPairs('realname|noclosed', $appendUsers, $this->config->maxCount); $users = $this->loadModel('user')->getPairs('realname|noclosed', $appendUsers);
$users['$@me'] = $this->lang->search->me; $users['$@me'] = $this->lang->search->me;
} }
if($hasProduct) $products = array('' => '') + $this->loadModel('product')->getPairs('', $this->session->project); if($hasProduct) $products = array('' => '') + $this->loadModel('product')->getPairs('', $this->session->project);
@@ -694,10 +697,15 @@ class searchModel extends model
*/ */
public function saveDict($dict) public function saveDict($dict)
{ {
static $savedDict;
if(empty($savedDict)) $savedDict = $this->dao->select("`key`")->from(TABLE_SEARCHDICT)->fetchPairs('key', 'key');
foreach($dict as $key => $value) foreach($dict as $key => $value)
{ {
if(!is_numeric($key) or empty($value) or strlen($key) != 5) continue; if(!is_numeric($key) or empty($value) or strlen($key) != 5) continue;
$this->dao->replace(TABLE_SEARCHDICT)->data(array('key' => $key, 'value' => $value))->exec(); if(isset($savedDict[$key])) continue;
$this->dao->insert(TABLE_SEARCHDICT)->data(array('key' => $key, 'value' => $value))->exec();
$savedDict[$key] = $key;
} }
} }
+2 -5
View File
@@ -310,14 +310,11 @@ class stakeholder extends control
$stakeholder = $this->stakeholder->getByID($userID); $stakeholder = $this->stakeholder->getByID($userID);
$this->stakeholder->delete(TABLE_STAKEHOLDER, $userID); $this->stakeholder->delete(TABLE_STAKEHOLDER, $userID);
$this->loadModel('user')->updateUserView($this->session->project, 'project'); $this->loadModel('user')->updateUserView($this->session->project, 'project');
/* Update linked products view. */ /* Update linked products view. */
if($stakeholder->objectType == 'project' and $stakeholder->objectID) if($stakeholder->objectType == 'project' and $stakeholder->objectID)
{ {
$products = $this->loadModel('product')->getProductPairsByProject($stakeholder->objectID); $this->loadModel('project')->updateInvolvedUserView($stakeholder->objectID, $stakeholder->user);
if(!empty($products))
{
foreach($products as $productID => $productName) $this->user->updateUserView($productID, 'product',$stakeholder->user);
}
/* Update the viewers of the project main doc library. */ /* Update the viewers of the project main doc library. */
$canViewUsers = $this->dao->select('users')->from(TABLE_DOCLIB)->where('type')->eq('project')->andWhere('project')->eq($stakeholder->objectID)->andWhere('main')->eq(1)->fetch(); $canViewUsers = $this->dao->select('users')->from(TABLE_DOCLIB)->where('type')->eq('project')->andWhere('project')->eq($stakeholder->objectID)->andWhere('main')->eq(1)->fetch();
+2 -11
View File
@@ -105,11 +105,7 @@ class stakeholderModel extends model
/* Update linked products view. */ /* Update linked products view. */
if($stakeholder->objectType == 'project' and $stakeholder->objectID) if($stakeholder->objectType == 'project' and $stakeholder->objectID)
{ {
$products = $this->loadModel('product')->getProductPairsByProject($stakeholder->objectID); $this->loadModel('project')->updateInvolvedUserView($stakeholder->objectID, $stakeholder->user);
if(!empty($products))
{
foreach($products as $productID => $productName) $this->user->updateUserView($productID, 'product', $stakeholder->user);
}
/* Update the viewers of the project main doc library. */ /* Update the viewers of the project main doc library. */
$canViewUsers = $this->dao->select('users')->from(TABLE_DOCLIB)->where('type')->eq('project')->andWhere('project')->eq($stakeholder->objectID)->andWhere('main')->eq(1)->fetch(); $canViewUsers = $this->dao->select('users')->from(TABLE_DOCLIB)->where('type')->eq('project')->andWhere('project')->eq($stakeholder->objectID)->andWhere('main')->eq(1)->fetch();
@@ -184,12 +180,7 @@ class stakeholderModel extends model
$this->loadModel('user')->updateUserView($projectID, 'project', $changedAccounts); $this->loadModel('user')->updateUserView($projectID, 'project', $changedAccounts);
/* Update linked products view. */ $this->loadModel('project')->updateInvolvedUserView($projectID, $changedAccounts);
$products = $this->loadModel('product')->getProductPairsByProject($projectID);
if(!empty($products))
{
foreach($products as $productID => $productName) $this->user->updateUserView($productID, 'product', $changedAccounts);
}
/* Update the viewers of the project main doc library. */ /* Update the viewers of the project main doc library. */
$canViewUsers = $this->dao->select('users')->from(TABLE_DOCLIB)->where('type')->eq('project')->andWhere('project')->eq($stakeholder->objectID)->andWhere('main')->eq(1)->fetch(); $canViewUsers = $this->dao->select('users')->from(TABLE_DOCLIB)->where('type')->eq('project')->andWhere('project')->eq($stakeholder->objectID)->andWhere('main')->eq(1)->fetch();
+1 -1
View File
@@ -1488,7 +1488,7 @@ class story extends control
/* Load pager and get tracks. */ /* Load pager and get tracks. */
$this->app->loadClass('pager', $static = true); $this->app->loadClass('pager', $static = true);
$pager = new pager($recTotal, $recPerPage, $pageID); $pager = new pager($recTotal, $recPerPage, $pageID);
$tracks = $this->story->getTracks($productID, $branch, $pager); $tracks = $this->story->getTracks($productID, $branch, $projectID, $pager);
if($projectID) if($projectID)
{ {
+67 -7
View File
@@ -198,13 +198,11 @@ class storyModel extends model
$story = fixer::input('post') $story = fixer::input('post')
->cleanInt('product,module,pri,plan') ->cleanInt('product,module,pri,plan')
->callFunc('title', 'trim') ->callFunc('title', 'trim')
->add('assignedDate', 0)
->add('version', 1) ->add('version', 1)
->add('status', 'draft') ->add('status', 'draft')
->setDefault('plan,verify', '') ->setDefault('plan,verify', '')
->setDefault('openedBy', $this->app->user->account) ->setDefault('openedBy', $this->app->user->account)
->setDefault('openedDate', $now) ->setDefault('openedDate', $now)
->setIF($this->post->assignedTo != '', 'assignedDate', $now)
->setIF($this->post->needNotReview or $executionID > 0, 'status', 'active') ->setIF($this->post->needNotReview or $executionID > 0, 'status', 'active')
->setIF($this->post->plan > 0, 'stage', 'planned') ->setIF($this->post->plan > 0, 'stage', 'planned')
->setIF($this->post->estimate, 'estimate', (float)$this->post->estimate) ->setIF($this->post->estimate, 'estimate', (float)$this->post->estimate)
@@ -254,14 +252,20 @@ class storyModel extends model
/* Save the story reviewer to storyreview table. */ /* Save the story reviewer to storyreview table. */
if(isset($_POST['reviewer'])) if(isset($_POST['reviewer']))
{ {
$assignedTo = '';
foreach($this->post->reviewer as $reviewer) foreach($this->post->reviewer as $reviewer)
{ {
if(empty($reviewer)) continue;
$reviewData = new stdclass(); $reviewData = new stdclass();
$reviewData->story = $storyID; $reviewData->story = $storyID;
$reviewData->version = 1; $reviewData->version = 1;
$reviewData->reviewer = $reviewer; $reviewData->reviewer = $reviewer;
$this->dao->insert(TABLE_STORYREVIEW)->data($reviewData)->exec(); $this->dao->insert(TABLE_STORYREVIEW)->data($reviewData)->exec();
if(empty($assignedTo)) $assignedTo = $reviewer;
} }
if($assignedTo) $this->dao->update(TABLE_STORY)->set('assignedTo')->eq($assignedTo)->set('assignedDate')->eq(helper::now())->where('id')->eq($storyID)->exec();
} }
/* Project or execution linked story. */ /* Project or execution linked story. */
@@ -547,14 +551,20 @@ class storyModel extends model
/* Save the story reviewer to storyreview table. */ /* Save the story reviewer to storyreview table. */
if(isset($_POST['reviewer'][$i])) if(isset($_POST['reviewer'][$i]))
{ {
$assignedTo = '';
foreach($_POST['reviewer'][$i] as $reviewer) foreach($_POST['reviewer'][$i] as $reviewer)
{ {
if(empty($reviewer)) continue;
$reviewData = new stdclass(); $reviewData = new stdclass();
$reviewData->story = $storyID; $reviewData->story = $storyID;
$reviewData->version = 1; $reviewData->version = 1;
$reviewData->reviewer = $reviewer; $reviewData->reviewer = $reviewer;
$this->dao->insert(TABLE_STORYREVIEW)->data($reviewData)->exec(); $this->dao->insert(TABLE_STORYREVIEW)->data($reviewData)->exec();
if(empty($assignedTo)) $assignedTo = $reviewer;
} }
if($assignedTo) $this->dao->update(TABLE_STORY)->set('assignedTo')->eq($assignedTo)->set('assignedDate')->eq($now)->where('id')->eq($storyID)->exec();
} }
$this->executeHooks($storyID); $this->executeHooks($storyID);
@@ -682,6 +692,7 @@ class storyModel extends model
/* Update the reviewer. */ /* Update the reviewer. */
$oldReviewerList = $this->getReviewerPairs($storyID, $oldStory->version); $oldReviewerList = $this->getReviewerPairs($storyID, $oldStory->version);
$assignedTo = '';
foreach($_POST['reviewer'] as $reviewer) foreach($_POST['reviewer'] as $reviewer)
{ {
if(!$specChanged and in_array($reviewer, array_keys($oldReviewerList))) continue; if(!$specChanged and in_array($reviewer, array_keys($oldReviewerList))) continue;
@@ -691,7 +702,10 @@ class storyModel extends model
$reviewData->version = $specChanged ? $story->version : $oldStory->version; $reviewData->version = $specChanged ? $story->version : $oldStory->version;
$reviewData->reviewer = $reviewer; $reviewData->reviewer = $reviewer;
$this->dao->insert(TABLE_STORYREVIEW)->data($reviewData)->exec(); $this->dao->insert(TABLE_STORYREVIEW)->data($reviewData)->exec();
if(empty($assignedTo)) $assignedTo = $reviewer;
} }
if($assignedTo and $assignedTo != $oldStory->assignedTo) $this->dao->update(TABLE_STORY)->set('assignedTo')->eq($assignedTo)->set('assignedDate')->eq(helper::now())->where('id')->eq($storyID)->exec();
$this->file->updateObjectID($this->post->uid, $storyID, 'story'); $this->file->updateObjectID($this->post->uid, $storyID, 'story');
@@ -3289,6 +3303,14 @@ class storyModel extends model
} }
} }
if(strtolower($actionType) == 'changed' or strtolower($actionType) == 'opened')
{
$reviewerList = $this->getReviewerPairs($story->id, $story->version);
unset($reviewerList[$story->assignedTo]);
$ccList .= ',' . join(',', array_keys($reviewerList));
}
if(empty($toList)) if(empty($toList))
{ {
if(empty($ccList)) return false; if(empty($ccList)) return false;
@@ -3878,11 +3900,12 @@ class storyModel extends model
* *
* @param int $productID * @param int $productID
* @param int $branch * @param int $branch
* @param int $projectID
* @param object $pager * @param object $pager
* @access public * @access public
* @return bool|array * @return bool|array
*/ */
public function getTracks($productID = 0, $branch = 0, $pager = null) public function getTracks($productID = 0, $branch = 0, $projectID = 0, $pager = null)
{ {
$tracks = array(); $tracks = array();
$sourcePageID = $pager->pageID; $sourcePageID = $pager->pageID;
@@ -3890,7 +3913,24 @@ class storyModel extends model
if($this->config->URAndSR) if($this->config->URAndSR)
{ {
$requirements = $this->getProductStories($productID, $branch, 0, 'all', 'requirement', 'id_desc', true, '', $pager); $projectStories = array();
if($projectID)
{
$requirements = $this->dao->select('t3.*')->from(TABLE_PROJECTSTORY)->alias('t1')
->leftJoin(TABLE_RELATION)->alias('t2')->on("t1.story=t2.AID && t2.AType='story'")
->leftJoin(TABLE_STORY)->alias('t3')->on("t2.BID=t3.id && t2.BType='requirement'")
->where('t1.project')->eq($projectID)
->andWhere('t1.product')->eq($productID)
->andWhere('t3.id')->ne('')
->page($pager, 't3.id')
->fetchAll('id');
$projectStories = $this->getExecutionStories($projectID, $productID, $branch, '`order`_desc', 'all', 0, 'story');
}
else
{
$requirements = $this->getProductStories($productID, $branch, 0, 'all', 'requirement', 'id_desc', true, '', $pager);
}
if($pager->pageID != $sourcePageID) if($pager->pageID != $sourcePageID)
{ {
$requirements = array(); $requirements = array();
@@ -3903,6 +3943,12 @@ class storyModel extends model
$stories = empty($stories) ? array() : $stories; $stories = empty($stories) ? array() : $stories;
foreach($stories as $id => $title) foreach($stories as $id => $title)
{ {
if($projectStories and !isset($projectStories[$id]))
{
unset($stories[$id]);
continue;
}
$stories[$id] = new stdclass(); $stories[$id] = new stdclass();
$stories[$id]->title = $title; $stories[$id]->title = $title;
$stories[$id]->cases = $this->loadModel('testcase')->getStoryCases($id); $stories[$id]->cases = $this->loadModel('testcase')->getStoryCases($id);
@@ -3931,12 +3977,26 @@ class storyModel extends model
->andWhere('relation')->eq('subdivideinto') ->andWhere('relation')->eq('subdivideinto')
->andWhere('product')->eq($productID) ->andWhere('product')->eq($productID)
->fetchPairs('BID', 'BID'); ->fetchPairs('BID', 'BID');
$stories = $this->getProductStories($productID, 0, 0, 'all', 'story', 'id_desc', true, $excludeStories); if($projectID)
if($stories) $pager->recTotal += 1; {
$stories = $this->getExecutionStories($projectID, $productID, $branch, '`order`_desc', 'all', 0, 'story', $excludeStories);
}
else
{
$stories = $this->getProductStories($productID, 0, 0, 'all', 'story', 'id_desc', true, $excludeStories);
}
if($stories) $pager->recTotal += count($stories);
} }
else else
{ {
$stories = $this->getProductStories($productID, 0, 0, 'all', 'story', 'id_desc', true, $excludeStories, $pager); if($projectID)
{
$stories = $this->getExecutionStories($projectID, $productID, $branch, '`order`_desc', 'all', 0, 'story', $excludeStories, $pager);
}
else
{
$stories = $this->getProductStories($productID, 0, 0, 'all', 'story', 'id_desc', true, $excludeStories, $pager);
}
} }
if(count($tracks) < $pager->recPerPage) if(count($tracks) < $pager->recPerPage)
+1 -1
View File
@@ -58,7 +58,7 @@
<?php $rowspan = count($track);?> <?php $rowspan = count($track);?>
<tr> <tr>
<?php if($config->URAndSR):?> <?php if($config->URAndSR):?>
<td <?php if($rowspan != 0) echo "rowspan=" . $rowspan;?> class='requirement'> <td <?php if($rowspan != 0) echo "rowspan=" . $rowspan;?> class='requirement' title='<?php echo $key != 'noRequirement' ? $requirement->title : $lang->story->noRequirement;?>'>
<?php if($key != 'noRequirement'):?> <?php if($key != 'noRequirement'):?>
<span class="label label-primary label-outline"><?php echo zget($lang->story->statusList, $requirement->status);?></span> <span class="label label-primary label-outline"><?php echo zget($lang->story->statusList, $requirement->status);?></span>
<?php endif;?> <?php endif;?>
+9 -2
View File
@@ -375,9 +375,16 @@
<td> <td>
<?php <?php
$reviewedBy = explode(',', trim($story->reviewedBy, ',')); $reviewedBy = explode(',', trim($story->reviewedBy, ','));
foreach($reviewers as $reviewer) if($reviewers)
{ {
echo in_array($reviewer, $reviewedBy) ? '<span style="color: #cbd0db" title="' . $lang->story->reviewed . '"> ' . zget($users, $reviewer) . '</span>' : '<span title="' . $lang->story->toBeReviewed .'"> ' . zget($users, $reviewer) . '</span>'; foreach($reviewers as $reviewer)
{
echo in_array($reviewer, $reviewedBy) ? '<span style="color: #cbd0db" title="' . $lang->story->reviewed . '"> ' . zget($users, $reviewer) . '</span>' : '<span title="' . $lang->story->toBeReviewed .'"> ' . zget($users, $reviewer) . '</span>';
}
}
elseif($reviewedBy)
{
foreach($reviewedBy as $reviewer) echo '<span style="color: #cbd0db" title="' . $lang->story->reviewed . '"> ' . zget($users, $reviewer) . '</span>';
} }
?> ?>
</td> </td>
+3
View File
@@ -662,6 +662,9 @@ class taskModel extends model
if($parentTask->story) $this->loadModel('story')->setStage($parentTask->story); if($parentTask->story) $this->loadModel('story')->setStage($parentTask->story);
$newParentTask = $this->dao->select('*')->from(TABLE_TASK)->where('id')->eq($parentID)->fetch(); $newParentTask = $this->dao->select('*')->from(TABLE_TASK)->where('id')->eq($parentID)->fetch();
unset($oldParentTask->subStatus);
unset($newParentTask->subStatus);
$changes = common::createChanges($oldParentTask, $newParentTask); $changes = common::createChanges($oldParentTask, $newParentTask);
$action = ''; $action = '';
if($status == 'done' and $parentTask->status != 'done') $action = 'Finished'; if($status == 'done' and $parentTask->status != 'done') $action = 'Finished';
+2 -3
View File
@@ -642,11 +642,10 @@ class testcase extends control
if($this->app->openApp == 'qa') $this->testcase->setMenu($this->products, $productID, $case->branch); if($this->app->openApp == 'qa') $this->testcase->setMenu($this->products, $productID, $case->branch);
$this->view->title = "CASE #$case->id $case->title - " . $this->products[$productID]; $this->view->title = "CASE #$case->id $case->title - " . $this->products[$productID];
$this->view->position[] = html::a($this->createLink('testcase', 'browse', "productID=$productID"), $this->products[$productID]);
$this->view->product = $product; $this->view->product = $product;
$this->view->branches = $branches; $this->view->branches = $branches;
$this->view->productName = $this->products[$productID]; $this->view->productName = isset($this->products[$productID]) ? $this->products[$productID] : '';
$this->view->branchName = $product->type == 'normal' ? '' : zget($branches, $case->branch, ''); $this->view->branchName = $product->type == 'normal' ? '' : zget($branches, $case->branch, '');
} }
@@ -1505,7 +1504,7 @@ class testcase extends control
$this->post->set('kind', 'testcase'); $this->post->set('kind', 'testcase');
$this->post->set('rows', $rows); $this->post->set('rows', $rows);
$this->post->set('extraNum', $num); $this->post->set('extraNum', $num);
$this->post->set('fileName', 'template'); $this->post->set('fileName', 'Template');
$this->fetch('file', 'export2csv', $_POST); $this->fetch('file', 'export2csv', $_POST);
} }
+1 -1
View File
@@ -151,7 +151,7 @@
<?php else:?> <?php else:?>
<tr> <tr>
<th class='thWidth'><?php echo $lang->testcase->product;?></th> <th class='thWidth'><?php echo $lang->testcase->product;?></th>
<td><?php echo common::hasPriv('product', 'browse') ? html::a($this->createLink('product', 'browse', "productID=$case->product"), $productName) : $productName;?></td> <td><?php echo (common::hasPriv('product', 'browse') and $productName) ? html::a($this->createLink('product', 'browse', "productID=$case->product"), $productName) : $productName;?></td>
</tr> </tr>
<?php if($product->type != 'normal'):?> <?php if($product->type != 'normal'):?>
<tr> <tr>
+2 -1
View File
@@ -51,7 +51,8 @@
<td class='w-50px text-center'><i class='collapse-handle icon-angle-down text-muted'></i></td> <td class='w-50px text-center'><i class='collapse-handle icon-angle-down text-muted'></i></td>
</tr> </tr>
<?php $executionParam = ($this->app->openApp == 'execution' and isset($testtask)) ? "executionID=$testtask->execution" : "";?> <?php $executionParam = ($this->app->openApp == 'execution' and isset($testtask)) ? "executionID=$testtask->execution" : "";?>
<?php $params = isset($testtask) ? ",testtask=$testtask->id,{$executionParam},buildID=$testtask->build" : ",$executionParam";?> <?php $params = isset($testtask) ? ",testtask=$testtask->id,buildID=$testtask->build" : "";?>
<?php if($executionParam) $params .= ',' . $executionParam;?>
<tr class='result-detail hide' id='tr-detail_<?php echo $trCount++; ?>'> <tr class='result-detail hide' id='tr-detail_<?php echo $trCount++; ?>'>
<td colspan='7' class='pd-0'> <td colspan='7' class='pd-0'>
<?php $projectParam = $this->app->openApp == 'project' ? "projectID={$this->session->project}," : ''?> <?php $projectParam = $this->app->openApp == 'project' ? "projectID={$this->session->project}," : ''?>
+18 -1
View File
@@ -78,7 +78,24 @@ function createProject()
var onlybody = config.onlybody; var onlybody = config.onlybody;
config.onlybody = 'no'; config.onlybody = 'no';
var link = systemMode == 'new' ? createLink('project', 'create') : createLink('execution', 'create'); var link = createLink('project', 'create');
config.onlybody = onlybody;
parent.location.href = link;
}
/**
* Create execution.
*
* @access public
* @return void
*/
function createExecution()
{
var onlybody = config.onlybody;
config.onlybody = 'no';
var link = createLink('execution', 'create');
config.onlybody = onlybody; config.onlybody = onlybody;
parent.location.href = link; parent.location.href = link;
+6 -4
View File
@@ -202,11 +202,11 @@
<h4 class="modal-title"><?php echo $lang->execution->selectExecution;?></h4> <h4 class="modal-title"><?php echo $lang->execution->selectExecution;?></h4>
</div> </div>
<div class="modal-body"> <div class="modal-body">
<?php if((empty($projects) and $config->systemMode == 'new') || ($config->systemMode == 'classic') and empty($executions)):?> <?php if((empty($projects) and $config->systemMode == 'new') or (empty($executions) and $config->systemMode == 'classic')):?>
<div class="table-empty-tip"> <div class="table-empty-tip">
<p> <p>
<span class="text-muted"><?php echo $lang->project->empty;?></span> <span class="text-muted"><?php echo $lang->project->empty;?></span>
<?php echo html::a("javascript:createProject()", "<i class='icon icon-plus'></i> " . $lang->project->create, '', "class='btn btn-info'");?> <?php echo html::a("javascript:" . ($config->systemMode == 'new' ? "createProject()" : "createExecution()"), "<i class='icon icon-plus'></i> " . $lang->project->create, '', "class='btn btn-info'");?>
</p> </p>
</div> </div>
<?php else:?> <?php else:?>
@@ -218,7 +218,7 @@
</tr> </tr>
<?php endif;?> <?php endif;?>
<tr> <tr>
<th><?php echo $lang->todo->execution;?></th> <th><?php echo $config->systemMode == 'new' ? $lang->todo->execution : $lang->todo->project;?></th>
<td id='executionIdBox'><?php echo html::select('execution', $executions, '', "class='form-control chosen'");?></td> <td id='executionIdBox'><?php echo html::select('execution', $executions, '', "class='form-control chosen'");?></td>
</tr> </tr>
<tr> <tr>
@@ -264,7 +264,7 @@
<h4 class="modal-title"><?php echo $lang->product->select;?></h4> <h4 class="modal-title"><?php echo $lang->product->select;?></h4>
</div> </div>
<div class="modal-body"> <div class="modal-body">
<?php if(empty($projects)):?> <?php if(empty($projects) and $config->systemMode == 'new'):?>
<div class="table-empty-tip"> <div class="table-empty-tip">
<p> <p>
<span class="text-muted"><?php echo $lang->project->empty;?></span> <span class="text-muted"><?php echo $lang->project->empty;?></span>
@@ -273,10 +273,12 @@
</div> </div>
<?php else:?> <?php else:?>
<table align='center' class='table table-form'> <table align='center' class='table table-form'>
<?php if($config->systemMode == 'new'):?>
<tr> <tr>
<th><?php echo $lang->todo->project;?></th> <th><?php echo $lang->todo->project;?></th>
<td><?php echo html::select('bugProject', $projects, '', "class='form-control chosen' onchange=getProductByProject(this.value);");?></td> <td><?php echo html::select('bugProject', $projects, '', "class='form-control chosen' onchange=getProductByProject(this.value);");?></td>
</tr> </tr>
<?php endif;?>
<tr> <tr>
<th><?php echo $lang->todo->product;?></th> <th><?php echo $lang->todo->product;?></th>
<td id='productIdBox'><?php echo html::select('bugProduct', $projectProducts, '', "class='form-control chosen'");?></td> <td id='productIdBox'><?php echo html::select('bugProduct', $projectProducts, '', "class='form-control chosen'");?></td>
+1 -1
View File
@@ -1130,7 +1130,7 @@ class userModel extends model
if($project->project) if($project->project)
{ {
$parentProject = zget($projectList, $project->project, ''); $parentProject = zget($projectList, $project->project, '');
if(empty($parentProject)) $parentProject = $this->dao->select('id,name')->from(TABLE_PROJECT)->where('id')->eq($project->project)->exec(); if(empty($parentProject)) $parentProject = $this->dao->select('id,name')->from(TABLE_PROJECT)->where('id')->eq($project->project)->fetch();
$project->projectName = $parentProject ? $parentProject->name : ''; $project->projectName = $parentProject ? $parentProject->name : '';
} }
$myProjects[$project->id] = $project; $myProjects[$project->id] = $project;
View File
+2
View File
@@ -0,0 +1,2 @@
<?php
$config->openMethods[] = 'setting.downloadxxd';
@@ -3,11 +3,9 @@ $lang->resource->admin->xuanxuan = 'xuanxuan';
$lang->admin->methodOrder[26] = 'xuanxuan'; $lang->admin->methodOrder[26] = 'xuanxuan';
if(!isset($lang->resource->setting)) $lang->resource->setting = new stdclass(); if(!isset($lang->resource->setting)) $lang->resource->setting = new stdclass();
$lang->resource->setting->xuanxuan = 'xuanxuan'; $lang->resource->setting->xuanxuan = 'xuanxuan';
$lang->resource->setting->downloadxxd = 'downloadXXD';
$lang->setting->methodOrder[26] = 'xuanxuan'; $lang->setting->methodOrder[26] = 'xuanxuan';
$lang->setting->methodOrder[31] = 'downloadxxd';
$lang->resource->im = new stdclass(); $lang->resource->im = new stdclass();
$lang->resource->im->getChatUsers = 'getChatUsers'; $lang->resource->im->getChatUsers = 'getChatUsers';
@@ -3,11 +3,9 @@ $lang->resource->admin->xuanxuan = 'xuanxuan';
$lang->admin->methodOrder[26] = 'xuanxuan'; $lang->admin->methodOrder[26] = 'xuanxuan';
if(!isset($lang->resource->setting)) $lang->resource->setting = new stdclass(); if(!isset($lang->resource->setting)) $lang->resource->setting = new stdclass();
$lang->resource->setting->xuanxuan = 'xuanxuan'; $lang->resource->setting->xuanxuan = 'xuanxuan';
$lang->resource->setting->downloadxxd = 'downloadXXD';
$lang->setting->methodOrder[26] = 'xuanxuan'; $lang->setting->methodOrder[26] = 'xuanxuan';
$lang->setting->methodOrder[31] = 'downloadxxd';
$lang->resource->im = new stdclass(); $lang->resource->im = new stdclass();
$lang->resource->im->getChatUsers = 'getChatUsers'; $lang->resource->im->getChatUsers = 'getChatUsers';