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

This commit is contained in:
zhujinyong
2021-04-02 14:34:02 +08:00
50 changed files with 454 additions and 154 deletions
+4 -4
View File
@@ -37,10 +37,10 @@ $config->themes['default'] = 'default';
$config->langs['zh-cn'] = '简体';
$config->langs['zh-tw'] = '繁體';
$config->langs['en'] = 'English';
$config->langs['de'] = 'Deutsch';
$config->langs['fr'] = 'Français';
$config->langs['vi'] = 'Tiếng Việt';
$config->langs['ja'] = '日本語';
//$config->langs['de'] = 'Deutsch';
//$config->langs['fr'] = 'Français';
//$config->langs['vi'] = 'Tiếng Việt';
//$config->langs['ja'] = '日本語';
/* 设备类型视图文件前缀。The prefix for view file for different device. */
$config->devicePrefix['mhtml'] = '';
+1 -1
View File
@@ -68,7 +68,7 @@ ALTER TABLE `zt_user` ADD `analysis` text NOT NULL AFTER `nature`;
ALTER TABLE `zt_user` ADD `strategy` text NOT NULL AFTER `analysis`;
ALTER TABLE `zt_user` CHANGE `avatar` `avatar` text NOT NULL AFTER `commiter`;
REPLACE INTO `zt_config` (`owner`, `module`, `section`, `key`, `value`) VALUES ('system', 'custom', '', 'URSR', '6');
REPLACE INTO `zt_config` (`owner`, `module`, `section`, `key`, `value`) VALUES ('system', 'custom', '', 'URSR', '2');
REPLACE INTO `zt_config` (`owner`, `module`, `section`, `key`, `value`) VALUES ('system', 'project', '', 'unitList', 'CNY,USD');
REPLACE INTO `zt_config` (`owner`, `module`, `section`, `key`, `value`) VALUES ('system', 'project', '', 'defaultCurrency', 'CNY');
+3 -1
View File
@@ -811,6 +811,7 @@ CREATE TABLE IF NOT EXISTS `zt_story` (
`id` mediumint(8) unsigned NOT NULL auto_increment,
`parent` mediumint(9) NOT NULL default '0',
`product` mediumint(8) unsigned NOT NULL default '0',
`project` mediumint(8) unsigned NOT NULL default '0',
`branch` mediumint(8) unsigned NOT NULL default '0',
`module` mediumint(8) unsigned NOT NULL default '0',
`plan` text,
@@ -4146,6 +4147,7 @@ REPLACE INTO `zt_lang` (`lang`, `module`, `section`, `key`, `value`, `system`) V
INSERT INTO `zt_config` (`owner`, `module`, `section`, `key`, `value`) VALUES ('system', 'custom', '', 'hourPoint', '1');
INSERT INTO `zt_config` (`owner`, `module`, `section`, `key`, `value`) VALUES ('system', 'common', '', 'CRProduct', '1');
INSERT INTO `zt_config` (`owner`, `module`, `section`, `key`, `value`) VALUES ('system', 'common', '', 'CRExecution', '1');
INSERT INTO `zt_config` (`owner`, `module`, `section`, `key`, `value`) VALUES ('system', 'custom', '', 'URSR', '6');
INSERT INTO `zt_config` (`owner`, `module`, `section`, `key`, `value`) VALUES ('system', 'custom', '', 'URSR', '2');
INSERT INTO `zt_config` (`owner`, `module`, `section`, `key`, `value`) VALUES ('system', 'common', 'global', 'mode', 'new');
INSERT INTO `zt_config` (`owner`, `module`, `section`, `key`, `value`) VALUES ('system', 'project', '', 'unitList', 'CNY,USD');
INSERT INTO `zt_config` (`owner`, `module`, `section`, `key`, `value`) VALUES ('system', 'project', '', 'defaultCurrency', 'CNY');
+1 -2
View File
@@ -154,7 +154,6 @@ class router extends baseRouter
{
if(!defined('ITERATION_KEY')) define('ITERATION_KEY', 0);
if(!defined('SPRINT_KEY')) define('SPRINT_KEY', 1);
if(!defined('STAGE_KEY')) define('STAGE_KEY', 2);
if(!defined('PRODUCT_KEY')) define('PRODUCT_KEY', 0);
if(!defined('STORYPOINT_KEY')) define('STORYPOINT_KEY', 1);
if(!defined('FUNCTIONPOINT_KEY')) define('FUNCTIONPOINT_KEY', 2);
@@ -239,7 +238,7 @@ class router extends baseRouter
if($this->dbh and !empty($this->config->db->name) and !defined('IN_UPGRADE'))
{
/* Get story concept in project and product. */
$URSRList = $this->dbh->query('SELECT `key`, `value` FROM' . TABLE_LANG . "WHERE module = 'custom' and section = 'URSRList' and `key` = \"{$this->clientLang}\"")->fetchAll();
$URSRList = $this->dbh->query('SELECT `key`, `value` FROM' . TABLE_LANG . "WHERE module = 'custom' and section = 'URSRList' and `lang` = \"{$this->clientLang}\"")->fetchAll();
if(empty($URSRList)) $URSRList = $this->dbh->query('SELECT `key`, `value` FROM' . TABLE_LANG . "WHERE module = 'custom' and section = 'URSRList' and `key` = \"{$config->URSR}\"")->fetchAll();
/* Get UR pairs and SR pairs. */
+2
View File
@@ -6,10 +6,12 @@
<div class="tile-title"><?php echo $lang->block->createdTodos;?></div>
<div class="tile-amount"><?php echo empty($data['createdTodos']) ? 0 : html::a($this->createLink('my', 'todo', 'type=all'), (int)$data['createdTodos']);?></div>
</div>
<?php if($config->URAndSR):?>
<div class="col-xs-4 tile">
<div class="tile-title"><?php echo $lang->block->createdRequirements;?></div>
<div class="tile-amount"><?php echo empty($data['createdRequirements']) ? 0 : (int)$data['createdRequirements'];?></div>
</div>
<?php endif;?>
<div class="col-xs-4 tile">
<div class="tile-title"><?php echo $lang->block->createdStories;?></div>
<div class="tile-amount"><?php echo empty($data['createdStories']) ? 0 : (int)$data['createdStories'];?></div>
@@ -62,10 +62,10 @@ html[lang="en"] .product-info .type-info {color: #A6AAB8; text-align: center; po
.block-statistic .data {width: 40%; text-align: left; padding: 10px 0px; font-size: 14px; font-weight: 700;}
.block-statistic .dataTitle {width: 60%; text-align: right; padding: 10px 0px; font-size: 14px;}
.block-statistic .executionName {padding-top: 2px; font-size: 14px;}
.block-statistic .executionName {padding: 2px 10px; font-size: 14px;}
.block-statistic .lastIteration {padding-top: 6px;}
.block-statistic .progress-text-left {margin-right: 90px}
.block-statistic .progress-text-left .progress-text {padding-top: 2px; font-size: 14px;}
.block-statistic .progress-text-left .progress-text {padding-top: 2px; font-size: 14px; padding-right:5px; left: -45px;}
.status-count {margin: auto;}
.status-count tr:first-child td:last-child {color: #000; font-weight: bold;}
@@ -134,70 +134,70 @@ $(function()
<?php foreach($projects as $project):?>
<div class="tab-pane fade<?php if($project->id == $selected) echo ' active in';?>" id="tab3Content<?php echo $project->id;?>">
<div class="table-row">
<?php if($project->model == 'scrum'):?>
<div class='table-row'>
<div class="col-4 text-center">
<div><h4><?php echo $lang->block->story;?></h4></div>
<div>
<div class="col dataTitle"><?php echo $lang->project->allStories . ":";?></div>
<div class="col data"><?php echo $project->allStories;?></div>
<?php if($project->model == 'scrum'):?>
<div class='table-row'>
<div class="col-4 text-center">
<div><h4><?php echo $lang->block->story;?></h4></div>
<div>
<div class="col dataTitle"><?php echo $lang->project->allStories . ":";?></div>
<div class="col data"><?php echo $project->allStories;?></div>
</div>
<div>
<div class="col dataTitle"><?php echo $lang->project->doneStories . ":";?></div>
<div class="col data"><?php echo $project->doneStories;?></div>
</div>
<div>
<div class="col dataTitle"><?php echo $lang->block->left . ":";?></div>
<div class="col data"><?php echo $project->leftStories;?></div>
</div>
</div>
<div>
<div class="col dataTitle"><?php echo $lang->project->doneStories . ":";?></div>
<div class="col data"><?php echo $project->doneStories;?></div>
<div class="col-4 text-center">
<div><h4><?php echo $lang->block->investment;?></h4></div>
<div>
<div class="col dataTitle"><?php echo $lang->block->totalPeople . ":";?></div>
<div class="col data"><?php echo $project->teamCount;?></div>
</div>
<div>
<div class="col dataTitle"><?php echo $lang->block->estimate . ":";?></div>
<div class="col data"><?php echo $project->estimate;?></div>
</div>
<div>
<div class="col dataTitle"><?php echo $lang->block->consumedHours . ":";?></div>
<div class="col data"><?php echo $project->consumed;?></div>
</div>
</div>
<div>
<div class="col dataTitle"><?php echo $lang->block->left . ":";?></div>
<div class="col data"><?php echo $project->leftStories;?></div>
<div class="col-4 text-center">
<div><h4><?php echo $lang->block->bug;?></h4></div>
<div>
<div class="col dataTitle"><?php echo $lang->block->totalBug . ":";?></div>
<div class="col data"><?php echo $project->allBugs;?></div>
</div>
<div>
<div class="col dataTitle"><?php echo $lang->block->doneBugs . ":";?></div>
<div class="col data"><?php echo $project->doneBugs;?></div>
</div>
<div>
<div class="col dataTitle"><?php echo $lang->block->leftBugs . ":";?></div>
<div class="col data"><?php echo $project->leftBugs;?></div>
</div>
</div>
</div>
<div class="col-4 text-center">
<div><h4><?php echo $lang->block->investment;?></h4></div>
<div>
<div class="col dataTitle"><?php echo $lang->block->totalPeople . ":";?></div>
<div class="col data"><?php echo $project->teamCount;?></div>
</div>
<div>
<div class="col dataTitle"><?php echo $lang->block->estimate . ":";?></div>
<div class="col data"><?php echo $project->estimate;?></div>
</div>
<div>
<div class="col dataTitle"><?php echo $lang->block->consumedHours . ":";?></div>
<div class="col data"><?php echo $project->consumed;?></div>
</div>
</div>
<div class="col-4 text-center">
<div><h4><?php echo $lang->block->bug;?></h4></div>
<div>
<div class="col dataTitle"><?php echo $lang->block->totalBug . ":";?></div>
<div class="col data"><?php echo $project->allBugs;?></div>
</div>
<div>
<div class="col dataTitle"><?php echo $lang->block->doneBugs . ":";?></div>
<div class="col data"><?php echo $project->doneBugs;?></div>
</div>
<div>
<div class="col dataTitle"><?php echo $lang->block->leftBugs . ":";?></div>
<div class="col data"><?php echo $project->leftBugs;?></div>
</div>
</div>
</div>
<?php if(!empty($project->executions)):?>
<div class="table-row project-info">
<div class="col-3 text-center"><h4><?php echo $lang->block->last;?></h4></div>
<div class="table-row lastIteration">
<div class='col-3 text-center executionName'><?php echo html::a($this->createLink('execution', 'task', "executionID={$project->executions[0]->id}"), $project->executions[0]->name);?></div>
<div class='col-8'>
<div class='progress progress-text-left'>
<div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="<?php echo $project->executions[0]->hours->progress;?>" aria-valuemin="0" aria-valuemax="100" style="width: <?php echo $project->executions[0]->hours->progress;?>%">
<span class='progress-text'><?php echo $project->executions[0]->hours->progress . '%';?></span>
<?php if(!empty($project->executions)):?>
<div class="table-row project-info">
<div class="col-2 text-right"><h4><?php echo $lang->block->last;?></h4></div>
<div class="table-row lastIteration">
<div class='col-5 text-center executionName'><?php echo html::a($this->createLink('execution', 'task', "executionID={$project->executions[0]->id}"), $project->executions[0]->name);?></div>
<div class='col-7'>
<div class='progress progress-text-left'>
<div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="<?php echo $project->executions[0]->hours->progress;?>" aria-valuemin="0" aria-valuemax="100" style="width: <?php echo $project->executions[0]->hours->progress;?>%">
<span class='progress-text'><?php echo $project->executions[0]->hours->progress . '%';?></span>
</div>
</div>
</div>
</div>
</div>
</div>
<?php endif;?>
<?php else:?>
<?php endif;?>
<?php else:?>
<div class="col-12">
<div class='table-row text-left weekly-row with-padding'>
<span class='weekly-title'><?php echo $lang->project->weekly;?></span>
@@ -22,7 +22,7 @@
#cards .project-detail .progress {height: 4px;}
#cards .project-detail .progress-text-left .progress-text {width: 50px; left: -50px;}
#cards .panel-heading {cursor: pointer;}
#cards .project-stages-container {margin: 0 -16px -16px 0px; padding: 0 4px; height: 46px; overflow-x: auto; position: relative;}
#cards .project-stages-container {margin: 0 0 -16px 0; padding: 0 4px; height: 46px; overflow-x: auto; position: relative;}
#cards .project-stages:after {content: ' '; width: 30px; display: block; right: -16px; top: 16px; bottom: -6px; z-index: 1; background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 100%); position: absolute;}
#cards .project-stages-row {position: relative; height: 30px; z-index: 0;}
#cards .project-stage-item {white-space: nowrap; position: absolute; top: 0; min-width: 48px; padding-top: 13px; color: #838A9D;}
+1 -1
View File
@@ -96,7 +96,7 @@ if(!$selfCall) die(include('./todolist.html.php'));
?>
<li data-id='<?php echo $todo->id?>'>
<span class="todo-check icon icon-check-circle"></span>
<a href="<?php echo empty($sso) ? $viewLink : $sso . $sign . 'referer=' . base64_encode($viewLink);?>" class='iframe' <?php echo $appid?>>
<a href="<?php echo empty($sso) ? $viewLink : $sso . $sign . 'referer=' . base64_encode($viewLink);?>" class='iframe' data-toggle='modal' <?php echo $appid?>>
<?php if ($todo->date == '2030-01-01') :?>
<span class="todo-time"><?php echo $lang->todo->periods['future'] ?></span>
<?php else:?>
+1 -1
View File
@@ -58,7 +58,7 @@ class bugModel extends model
$bug = fixer::input('post')
->setDefault('openedBy', $this->app->user->account)
->setDefault('openedDate', $now)
->setDefault('execution,story,task', 0)
->setDefault('project,execution,story,task', 0)
->setDefault('openedBuild', '')
->setDefault('deadline', '0000-00-00')
->setIF($this->config->systemMode == 'new' && $this->lang->navGroup->bug != 'qa', 'project', $this->session->project)
+7 -6
View File
@@ -258,7 +258,7 @@ $lang->execution->menu->view['subMenu']->tree = "$lang->treeView|execution|
$lang->execution->menu->qa['subMenu'] = new stdclass();
//$lang->execution->menu->qa['subMenu']->qa = array('link' => "$lang->dashboard|execution|qa|executionID=%s");
$lang->execution->menu->qa['subMenu']->bug = array('link' => "{$lang->bug->common}|execution|bug|executionID=%s", 'subModule' => 'bug');
$lang->execution->menu->qa['subMenu']->testcase = array('link' => "{$lang->testcase->shortCommon}|execution|testcase|executionID=%s", 'alias' => 'create');
$lang->execution->menu->qa['subMenu']->testcase = array('link' => "{$lang->testcase->shortCommon}|execution|testcase|executionID=%s", 'subModule' => 'testcase');
$lang->execution->menu->qa['subMenu']->testtask = array('link' => "{$lang->testtask->common}|execution|testtask|executionID=%s", 'subModule' => 'testtask');
$lang->execution->menu->qa['subMenu']->testreport = array('link' => "{$lang->testreport->common}|execution|testreport|exeutionID=%s", 'subModule' => 'testreport');
@@ -382,7 +382,7 @@ $lang->admin->menu->custom = array('link' => "{$lang->custom->common}|custom|
$lang->admin->menu->extension = array('link' => "{$lang->extension->common}|extension|browse", 'subModule' => 'extension');
$lang->admin->menu->dev = array('link' => "$lang->redev|dev|api", 'alias' => 'db', 'subModule' => 'dev,editor,entry');
$lang->admin->menu->message = array('link' => "{$lang->message->common}|message|index", 'subModule' => 'message,mail,webhook');
$lang->admin->menu->system = array('link' => "{$lang->admin->system}|backup|index", 'subModule' => 'cron,backup,action,admin,search', 'exclude' => 'admin-index');
$lang->admin->menu->system = array('link' => "{$lang->admin->system}|backup|index", 'subModule' => 'cron,backup,action,admin,search', 'exclude' => 'admin-index,admin-xuanxuan');
/* Admin menu order. */
$lang->admin->menuOrder[5] = 'index';
@@ -538,7 +538,8 @@ $lang->navGroup->entry = 'admin';
$lang->navGroup->extension = 'admin';
$lang->navGroup->action = 'admin';
$lang->navGroup->search = 'search';
$lang->navGroup->index = 'index';
$lang->navGroup->tree = 'tree';
$lang->navGroup->misc = 'misc';
$lang->navGroup->search = 'search';
$lang->navGroup->index = 'index';
$lang->navGroup->tree = 'tree';
$lang->navGroup->misc = 'misc';
$lang->navGroup->upgrade = 'upgrade';
+1 -1
View File
@@ -540,7 +540,7 @@ class custom extends control
$mode = zget($this->config->global, 'mode', 'classic');
if($mode == 'new')
{
if(isset($this->config->global->upgradeStep) and $this->config->global->upgradeStep == 'mergeProgram') $this->locate($this->createLink('upgrade', 'mergeProgram'));
if(isset($this->config->global->upgradeStep) and $this->config->global->upgradeStep == 'mergeProgram') $this->locate($this->createLink('upgrade', 'mergeProgram'), 'parent');
unset($_SESSION['upgrading']);
$this->locate(inlink('index'));
+2 -1
View File
@@ -328,7 +328,8 @@ class customModel extends model
if(empty($module)) $module = 'main';
global $app, $lang, $config;
if($module == 'main') $allMenu = $lang->menu;
$allMenu = new stdclass();
if($module == 'main' and !empty($lang->menu)) $allMenu = $lang->menu;
if($module != 'main' and isset($lang->menu->$module) and isset($lang->menu->{$module}['subMenu'])) $allMenu = $lang->menu->{$module}['subMenu'];
if($module == 'product' and isset($allMenu->branch)) $allMenu->branch = str_replace('@branch@', $lang->custom->branch, $allMenu->branch);
$flowModule = $config->global->flow . '_' . $module;
+22 -2
View File
@@ -88,6 +88,11 @@ class datatableModel extends model
$set->title = $fieldList[$id]['title'];
$set->sort = isset($fieldList[$id]['sort']) ? $fieldList[$id]['sort'] : 'yes';
$set->name = isset($fieldList[$id]['name']) ? $fieldList[$id]['name'] : '';
if(isset($fieldList[$id]['minWidth'])) $set->minWidth = $fieldList[$id]['minWidth'];
if(isset($fieldList[$id]['maxWidth'])) $set->maxWidth = $fieldList[$id]['maxWidth'];
if(isset($fieldList[$id]['pri'])) $set->pri = $fieldList[$id]['pri'];
$setting[$key] = $set;
}
}
@@ -152,10 +157,25 @@ class datatableModel extends model
$title = isset($col->title) ? "title='$col->title'" : '';
$title = (isset($col->name) and $col->name) ? "title='$col->name'" : $title;
if($id == 'id' and (int)$width < 90) $width = '90px';
$width = "data-width='$width' style='width:$width'";
$align = $id == 'actions' ? 'text-center' : '';
echo "<th data-flex='$fixed' $width class='c-$id $align' $title>";
$style = '';
$data = '';
$data .= "data-width='$width'";
$style .= "width:$width;";
if(isset($col->minWidth))
{
$data .= "data-minWidth='{$col->minWidth}px'";
$style .= "min-width:{$col->minWidth}px;";
}
if(isset($col->maxWidth))
{
$data .= "data-maxWidth='{$col->maxWidth}px'";
$style .= "max-width:{$col->maxWidth}px;";
}
if(isset($col->pri)) $data .= "data-pri='{$col->pri}'";
echo "<th data-flex='$fixed' $data style='$style' class='c-$id $align' $title>";
if($id == 'actions')
{
echo $this->lang->actions;
+2 -2
View File
@@ -878,9 +878,9 @@ class doc extends control
{
$this->session->set('docList', $this->app->getURI(true), 'doc');
$objects = $this->doc->getOrderedObjects($type);
if($type == 'product')
{
$objects = $this->loadModel('product')->getPairs('nocode');
$objectID = $this->product->saveState($objectID, $objects);
$table = TABLE_PRODUCT;
@@ -893,7 +893,6 @@ class doc extends control
}
else
{
$objects = $this->loadModel('project')->getPairsByProgram();
$objectID = $this->project->saveState($objectID, $objects);
$table = TABLE_PROJECT;
@@ -905,6 +904,7 @@ class doc extends control
$this->app->rawMethod = 'project';
}
if(!$libID) $libID = key($libs);
$object = $this->dao->select('id,name,status')->from($table)->where('id')->eq($objectID)->fetch();
if(empty($object)) $this->locate($this->createLink($type, 'create', '', '', '', $this->session->project));
+70
View File
@@ -1152,6 +1152,76 @@ class docModel extends model
return $libs;
}
/**
* Get ordered objects for dic.
*
* @param string $objectType
* @access public
* @return array
*/
public function getOrderedObjects($objectType = 'product')
{
$myObjects = $normalObjects = $closedObjects = array();
if($objectType == 'product')
{
$products = $this->loadModel('product')->getList();
foreach($products as $id => $product)
{
if($product->status == 'normal' and $product->PO == $this->app->user->account)
{
$myObjects[$id] = $product->name;
}
elseif($product->status == 'normal' and !($product->PO == $this->app->user->account))
{
$normalObjects[$id] = $product->name;
}
elseif($product->status == 'closed')
{
$closedObjects[$id] = $product->name;
}
}
}
elseif($objectType == 'project')
{
$programs = $this->dao->select('id, name')->from(TABLE_PROGRAM)->where('type')->eq('program')->andWhere('deleted')->eq(0)->orderBy('order_asc')->fetchPairs();
$projects = $this->dao->select('*')->from(TABLE_PROJECT)
->where('deleted')->eq(0)
->andWhere('type')->eq('project')
->beginIF(!$this->app->user->admin)->andWhere('id')->in($this->app->user->view->projects)->fi()
->orderBy('order_asc')
->fetchAll('id');
$orderedProjects = array();
foreach($programs as $programID => $programName)
{
foreach($projects as $id => $project)
{
if($project->parent and $project->parent != $programID) continue;
$orderedProjects[$id] = $project;
unset($projects[$project->id]);
}
}
foreach($orderedProjects as $id => $project)
{
if($project->status != 'done' and $project->status != 'closed' and $project->PM == $this->app->user->account)
{
$myObjects[$id] = $project->name;
}
else if($project->status != 'done' and $project->status != 'closed' and !($project->PM == $this->app->user->account))
{
$normalObjects[$id] = $project->name;
}
else if($project->status == 'done' or $project->status == 'closed')
{
$closedObjects[$id] = $project->name;
}
}
}
return $myObjects + $normalObjects + $closedObjects;
}
/**
* Stat module and document counts of lib.
*
+134
View File
@@ -0,0 +1,134 @@
<div id="mainContent" class="main-row">
<div class="main-col col-8">
<div class="cell">
<div class="detail no-padding">
<div class="detail-title no-margin no-padding">
<?php echo $doc->title;?>
</div>
<div class="detail-content article-content no-margin no-padding">
<?php
if($doc->type == 'url')
{
$url = $doc->content;
if(!preg_match('/^https?:\/\//', $doc->content)) $url = 'http://' . $url;
$urlIsHttps = strpos($url, 'https://') === 0;
$serverIsHttps = ((isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == 'on') or (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) and strtolower($_SERVER['HTTP_X_FORWARDED_PROTO']) == 'https'));
if(($urlIsHttps and $serverIsHttps) or (!$urlIsHttps and !$serverIsHttps))
{
echo "<iframe width='100%' id='urlIframe' src='$url'></iframe>";
}
else
{
$parsedUrl = parse_url($url);
$urlDomain = $parsedUrl['scheme'] . '://' . $parsedUrl['host'];
$title = '';
$response = common::http($url);
preg_match_all('/<title>(.*)<\/title>/Ui', $response, $out);
if(isset($out[1][0])) $title = $out[1][0];
echo "<div id='urlCard'>";
echo "<div class='url-icon'><img src='{$urlDomain}/favicon.ico' width='45' height='45' /></div>";
echo "<div class='url-content'>";
echo "<div class='url-title'>{$title}</div>";
echo "<div class='url-href'>" . html::a($url, $url, '_target') . "</div>";
echo "</div></div>";
}
}
else
{
echo $doc->content ? $doc->content : '空';
}
?>
<?php foreach($doc->files as $file):?>
<?php if(in_array($file->extension, $config->file->imageExtensions)):?>
<div class='file-image'>
<a href="<?php echo $file->webPath?>" target="_blank">
<img onload="setImageSize(this, 0)" src="<?php echo $this->createLink('file', 'read', "fileID={$file->id}");?>" alt="<?php echo $file->title?>" title="<?php echo $file->title;?>">
</a>
<span class='right-icon'>
<?php if(common::hasPriv('file', 'download')) echo html::a($this->createLink('file', 'download', 'fileID=' . $file->id) . $sessionString, "<i class='icon icon-export'></i>", '', "class='btn-icon' style='margin-right: 10px;' title=\"{$lang->doc->download}\"");?>
<?php if(common::hasPriv('doc', 'deleteFile')) echo html::a('###', "<i class='icon icon-trash'></i>", '', "class='btn-icon' title=\"{$lang->doc->deleteFile}\" onclick='deleteFile($file->id)'");?>
</span>
</div>
<?php unset($doc->files[$file->id]);?>
<?php endif;?>
<?php endforeach;?>
</div>
</div>
<?php echo $this->fetch('file', 'printFiles', array('files' => $doc->files, 'fieldset' => 'true', 'object' => $doc));?>
</div>
<div class='cell'>
<?php
$canBeChanged = common::canBeChanged('doc', $doc);
if($canBeChanged) $actionFormLink = $this->createLink('action', 'comment', "objectType=doc&objectID=$doc->id");
?>
<?php include '../../common/view/action.html.php';?>
</div>
</div>
<div class="side-col col-4">
<?php if(!empty($doc->digest)):?>
<div class="cell">
<details class="detail" open>
<summary class="detail-title"><?php echo $lang->doc->digest;?></summary>
<div class="detail-content">
<?php echo !empty($doc->digest) ? $doc->digest : "<div class='text-center text-muted'>" . $lang->noData . '</div>';?>
</div>
</details>
</div>
<?php endif;?>
<div class="cell">
<details class="detail" open>
<summary class="detail-title"><?php echo $lang->doc->keywords;?></summary>
<div class="detail-content">
<?php echo !empty($doc->keywords) ? $doc->keywords : "<div class='text-center text-muted'>" . $lang->noData . '</div>';?>
</div>
</details>
</div>
<div class="cell">
<details class="detail" open>
<summary class="detail-title"><?php echo $lang->doc->basicInfo;?></summary>
<div class="detail-content">
<table class="table table-data">
<tbody>
<?php if($doc->productName):?>
<tr>
<th class='w-90px'><?php echo $lang->doc->product;?></th>
<td><?php echo $doc->productName;?></td>
</tr>
<?php endif;?>
<?php if($doc->executionName):?>
<tr>
<th class='w-80px'><?php echo $lang->doc->execution;?></th>
<td><?php echo $doc->executionName;?></td>
</tr>
<?php endif;?>
<tr>
<th class='w-80px'><?php echo $lang->doc->lib;?></th>
<td><?php echo $lib->name;?></td>
</tr>
<tr>
<th><?php echo $lang->doc->module;?></th>
<td><?php echo $doc->moduleName ? $doc->moduleName : '/';?></td>
</tr>
<tr>
<th><?php echo $lang->doc->addedDate;?></th>
<td><?php echo $doc->addedDate;?></td>
</tr>
<tr>
<th><?php echo $lang->doc->editedBy;?></th>
<td><?php echo zget($users, $doc->editedBy);?></td>
</tr>
<tr>
<th><?php echo $lang->doc->editedDate;?></th>
<td><?php echo $doc->editedDate;?></td>
</tr>
</tbody>
</table>
</div>
</details>
</div>
</div>
</div>
<?php include '../../common/view/syntaxhighlighter.html.php';?>
+1 -1
View File
@@ -16,7 +16,7 @@ $app->loadLang('task');
$config->execution->task = new stdclass();
$config->execution->create = new stdclass();
$config->execution->edit = new stdclass();
$config->execution->create->requiredFields = 'project,name,code,begin,end';
$config->execution->create->requiredFields = 'name,code,begin,end';
$config->execution->edit->requiredFields = 'name,code,begin,end';
$config->execution->customBatchEditFields = 'days,type,teamname,status,desc,PO,QD,PM,RD';
+5 -4
View File
@@ -727,7 +727,7 @@ class execution extends control
/* Append id for secend sort. */
$sort = $this->loadModel('common')->appendOrder($orderBy);
$queryID = ($type == 'bysearch') ? (int)$param : 0;
$queryID = ($type == 'bysearch') ? (int)$param : 0;
$execution = $this->commonAction($executionID);
$executionID = $execution->id;
@@ -768,7 +768,7 @@ class execution extends control
$storyBugs = $this->loadModel('bug')->getStoryBugCounts($storyIdList, $executionID);
$storyCases = $this->loadModel('testcase')->getStoryCaseCounts($storyIdList);
$plans = $this->execution->getPlans($products);
$plans = $this->execution->getPlans($products);
$allPlans = array('' => '');
if(!empty($plans))
{
@@ -802,6 +802,7 @@ class execution extends control
$this->view->type = $this->session->executionStoryBrowseType;
$this->view->param = $param;
$this->view->moduleTree = $this->loadModel('tree')->getProjectStoryTreeMenu($executionID, $startModuleID = 0, array('treeModel', 'createStoryLink'));
$this->view->modulePairs = $this->tree->getModulePairs($productID, 'story', true);
$this->view->tabID = 'story';
$this->view->storyTasks = $storyTasks;
$this->view->storyBugs = $storyBugs;
@@ -1203,7 +1204,7 @@ class execution extends control
}
elseif($this->app->openApp == 'execution')
{
$executionID = key($this->executions);
if($this->config->systemMode == 'new') $executionID = key($this->executions);
$this->execution->setMenu($executionID);
}
@@ -1297,7 +1298,7 @@ class execution extends control
}
}
$this->view->title = $this->lang->execution->create;
$this->view->title = (($this->app->openApp == 'execution') and ($this->config->systemMode == 'new')) ? $this->lang->execution->createExec : $this->lang->execution->create;
$this->view->position[] = $this->view->title;
$this->view->executions = array('' => '') + $this->execution->getList();
$this->view->groups = $this->loadModel('group')->getPairs();
+14 -9
View File
@@ -280,15 +280,20 @@ class executionModel extends model
{
$this->lang->execution->team = $this->lang->execution->teamname;
if(empty($_POST['project']))
if($this->config->systemMode == 'new')
{
dao::$errors['message'][] = $this->lang->execution->projectNotEmpty;
return false;
}
if(empty($_POST['project']))
{
dao::$errors['message'][] = $this->lang->execution->projectNotEmpty;
return false;
}
/* Determine whether to add a sprint or a stage according to the model of the execution. */
$project = $this->getByID($_POST['project']);
$sprintType = $this->config->systemMode == 'new' ? zget($this->config->execution->modelList, $project->model, '') : 'sprint';
/* Determine whether to add a sprint or a stage according to the model of the execution. */
$project = $this->getByID($_POST['project']);
$sprintType = zget($this->config->execution->modelList, $project->model, 'sprint');
$this->config->execution->create->requiredFields .= ',project';
}
/* If the execution model is a stage, determine whether the product is linked. */
if($sprintType == 'stage' and empty($this->post->products[0]))
@@ -346,7 +351,7 @@ class executionModel extends model
$this->file->updateObjectID($this->post->uid, $executionID, 'execution');
/* Update the path. */
$this->setTreePath($executionID);
if($this->config->systemMode == 'new') $this->setTreePath($executionID);
/* Copy team of execution. */
if($copyExecutionID != '')
@@ -378,7 +383,7 @@ class executionModel extends model
$member->hours = $this->config->execution->defaultWorkhours;
$this->dao->insert(TABLE_TEAM)->data($member)->exec();
$this->addProjectMembers($sprint->project, array($member));
if($this->config->systemMode == 'new') $this->addProjectMembers($sprint->project, array($member));
}
/* Create doc lib. */
+2 -2
View File
@@ -42,7 +42,7 @@
</div>
<div class='btn-toolbar pull-right'>
<?php common::printLink('execution', 'export', "status=$status&productID=$productID&orderBy=$orderBy&from=$from", "<i class='icon-export muted'> </i>" . $lang->export, '', "class='btn btn-link export'")?>
<?php if(common::hasPriv('execution', 'create')) echo html::a($this->createLink('execution', 'create', "projectID=$projectID"), "<i class='icon icon-sm icon-plus'></i> " . ($from == 'execution' ? $lang->execution->createExec : $lang->execution->create), '', "class='btn btn-primary' data-app='$from'");?>
<?php if(common::hasPriv('execution', 'create')) echo html::a($this->createLink('execution', 'create', "projectID=$projectID"), "<i class='icon icon-sm icon-plus'></i> " . ((($from == 'execution') and ($config->systemMode == 'new')) ? $lang->execution->createExec : $lang->execution->create), '', "class='btn btn-primary' data-app='$from'");?>
</div>
</div>
<div id='mainContent' class="main-row fade">
@@ -66,7 +66,7 @@
<?php endif;?>
<?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?>
</th>
<th><?php common::printOrderLink('name', $orderBy, $vars, $from == 'execution' ? $lang->execution->execName : $lang->execution->name);?></th>
<th><?php common::printOrderLink('name', $orderBy, $vars, (($from == 'execution') and ($config->systemMode == 'new')) ? $lang->execution->execName : $lang->execution->name);?></th>
<th class='thWidth'><?php common::printOrderLink('PM', $orderBy, $vars, $lang->execution->owner);?></th>
<th class='w-100px'><?php common::printOrderLink('end', $orderBy, $vars, $lang->execution->end);?></th>
<th class='w-100px'><?php common::printOrderLink('status', $orderBy, $vars, $from == 'execution' ? $lang->execution->execStatus : $lang->execution->status);?></th>
+8 -6
View File
@@ -38,25 +38,27 @@
<div id='mainContent' class='main-content'>
<div class='center-block'>
<div class='main-header'>
<h2><?php echo $from == 'execution' ? $lang->execution->createExec : $lang->execution->create;?></h2>
<h2><?php echo (($from == 'execution') and ($config->systemMode == 'new')) ? $lang->execution->createExec : $lang->execution->create;?></h2>
<div class="pull-right btn-toolbar">
<button type='button' class='btn btn-link' data-toggle='modal' data-target='#copyProjectModal'><?php echo html::icon($lang->icons['copy'], 'muted') . ' ' . ($from == 'execution' ? $lang->execution->copyExec : $lang->execution->copy);?></button>
<button type='button' class='btn btn-link' data-toggle='modal' data-target='#copyProjectModal'><?php echo html::icon($lang->icons['copy'], 'muted') . ' ' . ((($from == 'execution') and ($config->systemMode == 'new')) ? $lang->execution->copyExec : $lang->execution->copy);?></button>
</div>
</div>
<form class='form-indicator main-form form-ajax' method='post' target='hiddenwin' id='dataform'>
<table class='table table-form'>
<?php if($config->systemMode == 'new'):?>
<tr>
<th class='w-120px'><?php echo $lang->execution->project;?></th>
<td class="col-main"><?php echo html::select("project", $allProjects, $projectID, "class='form-control chosen' required onchange='refreshPage(this.value)'");?></td>
<td></td><td></td>
</tr>
<?php endif;?>
<tr>
<th class='w-120px'><?php echo $from == 'execution' ? $lang->execution->execName : $lang->execution->name;?></th>
<th class='w-120px'><?php echo (($from == 'execution') and ($config->systemMode == 'new')) ? $lang->execution->execName : $lang->execution->name;?></th>
<td class="col-main"><?php echo html::input('name', $name, "class='form-control' required");?></td>
<td></td><td></td>
</tr>
<tr>
<th><?php echo $from == 'execution' ? $lang->execution->execCode : $lang->execution->code;?></th>
<th><?php echo (($from == 'execution') and ($config->systemMode == 'new')) ? $lang->execution->execCode : $lang->execution->code;?></th>
<td><?php echo html::input('code', $code, "class='form-control' required");?></td><td></td><td></td>
</tr>
<tr>
@@ -84,7 +86,7 @@
<td><?php echo html::input('team', $team, "class='form-control'");?></td><td></td><td></td>
</tr>
<tr>
<th><?php echo $from == 'execution' ? $lang->execution->execType : $lang->execution->type;?></th>
<th><?php echo (($from == 'execution') and ($config->systemMode == 'new')) ? $lang->execution->execType : $lang->execution->type;?></th>
<td><?php echo html::select('lifetime', $lang->execution->lifeTimeList, '', "class='form-control' onchange='showLifeTimeTips()'"); ?></td>
<td class='muted' colspan='2'><div id='lifeTimeTips'><?php echo $lang->execution->typeDesc;?></div></td>
</tr>
@@ -142,7 +144,7 @@
</td>
</tr>
<tr>
<th><?php echo $from == 'execution' ? $lang->execution->execDesc : $lang->execution->desc;?></th>
<th><?php echo (($from == 'execution') and ($config->systemMode == 'new')) ? $lang->execution->execDesc : $lang->execution->desc;?></th>
<td colspan='3'>
<?php echo $this->fetch('user', 'ajaxPrintTemplates', 'type=execution&link=desc');?>
<?php echo html::textarea('desc', '', "rows='6' class='form-control kindeditor' hidefocus='true'");?>
+6 -2
View File
@@ -174,6 +174,7 @@
<td class='c-pri'><span class='label-pri <?php echo 'label-pri-' . $story->pri?>' title='<?php echo zget($lang->story->priList, $story->pri, $story->pri);?>'><?php echo zget($lang->story->priList, $story->pri, $story->pri);?></span></td>
<td class='c-name' title="<?php echo $story->title?>">
<?php if(isset($branchGroups[$story->product][$story->branch])) echo "<span class='label label-outline label-badge'>" . $branchGroups[$story->product][$story->branch] . '</span>';?>
<?php if(!empty($story->module)) echo "<span class='label label-gray label-badge'>{$modulePairs[$story->module]}</span> ";?>
<?php if($story->parent > 0) echo "<span class='label'>{$lang->story->childrenAB}</span>";?>
<?php echo html::a($storyLink,$story->title, null, "style='color: $story->color' data-app='execution'");?>
</td>
@@ -213,7 +214,7 @@
if(commonModel::isTutorialMode())
{
$wizardParams = helper::safe64Encode($param);
echo html::a($this->createLink('tutorial', 'wizard', "module=task&method=create&params=$wizardParams"), "<i class='icon-plus'></i>",'', "class='btn btn-task-create' title='{$lang->execution->wbs}'");
echo html::a($this->createLink('tutorial', 'wizard', "module=task&method=create&params=$wizardParams"), "<i class='icon-plus'></i>",'', "class='btn btn-task-create' title='{$lang->execution->wbs}' data-app='execution'");
}
else
{
@@ -224,7 +225,10 @@
if($hasDBPriv) common::printIcon('task', 'batchCreate', "executionID={$execution->id}&story={$story->id}", '', 'list', 'pluses');
$lang->testcase->batchCreate = $lang->testcase->create;
if($productID && $hasDBPriv) common::printIcon('testcase', 'batchCreate', "productID=$story->product&branch=$story->branch&moduleID=$story->module&storyID=$story->id", '', 'list', 'sitemap');
if($productID and $hasDBPriv and common::hasPriv('testcase', 'create'))
{
echo html::a($this->createLink('testcase', 'create', "productID=$story->product&branch=$story->branch&moduleID=$story->module&form=&param=0&storyID=$story->id"), '<i class="icon-testcase-create icon-sitemap"></i>', '', "title='{$lang->testcase->create}' data-app='qa'");
}
if($canBeChanged and common::hasPriv('execution', 'unlinkStory', $execution))
{
+3 -2
View File
@@ -218,6 +218,7 @@ if($config->systemMode == 'new')
$lang->resource->project->bug = 'bug';
$lang->resource->project->testcase = 'testcase';
$lang->resource->project->testtask = 'testtask';
$lang->resource->project->testreport = 'testreport';
$lang->resource->project->execution = 'execution';
$lang->resource->project->export = 'export';
$lang->resource->project->createGuide = 'createGuide';
@@ -254,8 +255,8 @@ if($config->systemMode == 'new')
$lang->project->methodOrder[145] = 'bug';
$lang->project->methodOrder[150] = 'testcase';
$lang->project->methodOrder[155] = 'testtask';
$lang->project->methodOrder[160] = 'execution';
$lang->project->methodOrder[165] = 'testreport';
$lang->project->methodOrder[160] = 'testreport';
$lang->project->methodOrder[165] = 'execution';
$lang->project->methodOrder[170] = 'export';
$lang->project->methodOrder[175] = 'createGuide';
+5
View File
@@ -11,6 +11,11 @@
*/
?>
<?php include '../../common/view/header.html.php'; ?>
<div id="mainMenu" class="clearfix">
<div class="btn-toolbar pull-right">
<?php if(common::hasPriv('jenkins', 'create')) common::printLink('jenkins', 'create', "", "<i class='icon icon-plus'></i> " . $lang->jenkins->create, '', "class='btn btn-primary'");?>
</div>
</div>
<div id='mainContent' class='main-row'>
<form class='main-table' id='ajaxForm' method='post'>
<table id='jenkinsList' class='table has-sort-head table-fixed'>
+1
View File
@@ -3,4 +3,5 @@
.data-basic.table-data tbody > tr > th {width: 100px;}
.col-12 .cell table td {word-wrap: break-word; word-break: normal;}
td.normal {color: #00da88;}
td.acl {white-space: nowrap;}
.row > .col-sm-12:first-child {padding-bottom: 20px;}
+3 -2
View File
@@ -1039,7 +1039,8 @@ class productModel extends model
$executionPairs = $executionPairs + $execution->children;
continue;
}
$executionPairs[$execution->id] = $projectPairs[$execution->project] . '/' . $execution->name;
if($this->config->systemMode == 'new') $executionPairs[$execution->id] = $projectPairs[$execution->project] . '/' . $execution->name;
if($this->config->systemMode == 'classic') $executionPairs[$execution->id] = $execution->name;
}
return $executionPairs;
@@ -1286,7 +1287,7 @@ class productModel extends model
$products = $this->dao->select('t1.id as id, t1.*')->from(TABLE_PRODUCT)->alias('t1')
->leftJoin(TABLE_PROGRAM)->alias('t2')->on('t1.program = t2.id')
->where('t1.id')->in($productKeys)
->orderBy('t2.order_asc, t1.line_desc, t1.order_asc')
->orderBy('t2.order_asc, t1.line_desc, t1.order_desc')
->page($pager)
->fetchAll('id');
}
+1 -1
View File
@@ -133,7 +133,7 @@ $projectIDParam = $isProjectStory ? "projectID=$projectID&" : '';
<?php
$openApp = $isProjectStory ? 'project' : 'product';
$class = common::hasPriv('story', 'export') ? '' : "class=disabled";
$misc = common::hasPriv('story', 'export') ? "class='export' data-group='$openApp'" : "class=disabled";
$misc = common::hasPriv('story', 'export') ? "data-toggle='modal' data-type='iframe' class='export' data-app='$openApp'" : "class=disabled";
$link = common::hasPriv('story', 'export') ? $this->createLink('story', 'export', "productID=$productID&orderBy=$orderBy&projectID=0&browseType=$browseType&type=$storyType") : '#';
echo "<li $class>" . html::a($link, $lang->story->export, '', $misc) . "</li>";
?>
+1 -1
View File
@@ -80,7 +80,7 @@
<th class="w-80px"><?php echo $lang->productCommon . $lang->product->status;?></th>
<td class="<?php echo $product->status;?>"><strong><?php echo zget($lang->product->statusList, $product->status);?></strong></td>
<th><?php echo $lang->product->acl;?></th>
<td><strong><?php echo $lang->product->aclList[$product->acl];?></strong></td>
<td class='acl'><strong><?php echo $lang->product->aclList[$product->acl];?></strong></td>
<td></td>
</tr>
<?php if($product->acl == 'custom'):?>
+20 -5
View File
@@ -33,65 +33,80 @@ $config->project->datatable->fieldList['id']['title'] = 'ID';
$config->project->datatable->fieldList['id']['fixed'] = 'left';
$config->project->datatable->fieldList['id']['width'] = '60';
$config->project->datatable->fieldList['id']['required'] = 'yes';
$config->project->datatable->fieldList['id']['pri'] = '1';
$config->project->datatable->fieldList['name']['title'] = 'name';
$config->project->datatable->fieldList['name']['fixed'] = 'left';
$config->project->datatable->fieldList['name']['width'] = '180';
$config->project->datatable->fieldList['name']['width'] = 'auto';
$config->project->datatable->fieldList['name']['minWidth'] = '180';
$config->project->datatable->fieldList['name']['required'] = 'yes';
$config->project->datatable->fieldList['name']['sort'] = 'no';
$config->project->datatable->fieldList['name']['pri'] = '1';
$config->project->datatable->fieldList['PM']['title'] = 'PM';
$config->project->datatable->fieldList['PM']['fixed'] = 'no';
$config->project->datatable->fieldList['PM']['width'] = '80';
$config->project->datatable->fieldList['PM']['required'] = 'yes';
$config->project->datatable->fieldList['PM']['sort'] = 'no';
$config->project->datatable->fieldList['PM']['pri'] = '2';
$config->project->datatable->fieldList['status']['title'] = 'status';
$config->project->datatable->fieldList['status']['fixed'] = 'left';
$config->project->datatable->fieldList['status']['width'] = '80';
$config->project->datatable->fieldList['status']['required'] = 'no';
$config->project->datatable->fieldList['status']['sort'] = 'yes';
$config->project->datatable->fieldList['status']['pri'] = '2';
$config->project->datatable->fieldList['begin']['title'] = 'begin';
$config->project->datatable->fieldList['begin']['fixed'] = 'no';
$config->project->datatable->fieldList['begin']['width'] = '100';
$config->project->datatable->fieldList['begin']['width'] = '90';
$config->project->datatable->fieldList['begin']['required'] = 'no';
$config->project->datatable->fieldList['begin']['pri'] = '9';
$config->project->datatable->fieldList['end']['title'] = 'end';
$config->project->datatable->fieldList['end']['fixed'] = 'no';
$config->project->datatable->fieldList['end']['width'] = '100';
$config->project->datatable->fieldList['end']['width'] = '90';
$config->project->datatable->fieldList['end']['required'] = 'no';
$config->project->datatable->fieldList['end']['pri'] = '3';
$config->project->datatable->fieldList['budget']['title'] = 'budget';
$config->project->datatable->fieldList['budget']['fixed'] = 'no';
$config->project->datatable->fieldList['budget']['width'] = '80';
$config->project->datatable->fieldList['budget']['required'] = 'yes';
$config->project->datatable->fieldList['budget']['pri'] = '3';
$config->project->datatable->fieldList['teamCount']['title'] = 'teamCount';
$config->project->datatable->fieldList['teamCount']['fixed'] = 'no';
$config->project->datatable->fieldList['teamCount']['width'] = '70';
$config->project->datatable->fieldList['teamCount']['required'] = 'no';
$config->project->datatable->fieldList['teamCount']['sort'] = 'no';
$config->project->datatable->fieldList['teamCount']['pri'] = '8';
$config->project->datatable->fieldList['estimate']['title'] = 'estimate';
$config->project->datatable->fieldList['estimate']['fixed'] = 'no';
$config->project->datatable->fieldList['estimate']['width'] = '50';
$config->project->datatable->fieldList['estimate']['width'] = '70';
$config->project->datatable->fieldList['estimate']['maxWidth'] = '80';
$config->project->datatable->fieldList['estimate']['required'] = 'no';
$config->project->datatable->fieldList['estimate']['sort'] = 'no';
$config->project->datatable->fieldList['estimate']['pri'] = '8';
$config->project->datatable->fieldList['consume']['title'] = 'consume';
$config->project->datatable->fieldList['consume']['fixed'] = 'no';
$config->project->datatable->fieldList['consume']['width'] = '50';
$config->project->datatable->fieldList['consume']['width'] = '70';
$config->project->datatable->fieldList['consume']['maxWidth'] = '80';
$config->project->datatable->fieldList['consume']['required'] = 'no';
$config->project->datatable->fieldList['consume']['sort'] = 'no';
$config->project->datatable->fieldList['consume']['pri'] = '7';
$config->project->datatable->fieldList['progress']['title'] = 'progress';
$config->project->datatable->fieldList['progress']['fixed'] = 'right';
$config->project->datatable->fieldList['progress']['width'] = '60';
$config->project->datatable->fieldList['progress']['required'] = 'no';
$config->project->datatable->fieldList['progress']['sort'] = 'no';
$config->project->datatable->fieldList['progress']['pri'] = '6';
$config->project->datatable->fieldList['actions']['title'] = 'actions';
$config->project->datatable->fieldList['actions']['fixed'] = 'right';
$config->project->datatable->fieldList['actions']['width'] = '180';
$config->project->datatable->fieldList['actions']['required'] = 'yes';
$config->project->datatable->fieldList['actions']['pri'] = '1';
+1
View File
@@ -2,5 +2,6 @@
.side-col {padding-right: 20px; width: 18%;}
#sidebar>.cell {width: 100%;}
th.c-budget,{text-align:right;}
td.c-actions {overflow: visible;}
.c-actions .btn {overflow: visible;}
+12 -2
View File
@@ -778,6 +778,16 @@ class projectModel extends model
$this->loadModel('personnel')->updateWhitelist($whitelist, 'project', $projectID);
if($project->acl != 'open') $this->loadModel('user')->updateUserView($projectID, 'project');
/* Create doc lib. */
$this->app->loadLang('doc');
$lib = new stdclass();
$lib->project = $projectID;
$lib->name = $this->lang->doclib->main['project'];
$lib->type = 'project';
$lib->main = '1';
$lib->acl = 'default';
$this->dao->insert(TABLE_DOCLIB)->data($lib)->exec();
$this->updateProducts($projectID);
if(isset($_POST['newProduct']) || (!$project->parent && empty($linkedProductsCount)))
@@ -905,7 +915,7 @@ class projectModel extends model
if($project->budget != 0 and $program->budget != 0)
{
$availableBudget = $this->loadModel('program')->getBudgetLeft($program);
if($project->budget > $availableBudget + $oldProject->budget) dao::$errors['budget'] = $this->lang->project->beyondParentBudget;
if($project->budget > $availableBudget + $oldProject->budget) dao::$errors['budget'] = $this->lang->program->beyondParentBudget;
}
}
@@ -1315,7 +1325,7 @@ class projectModel extends model
if($col->show)
{
$title = '';
$class = "c-$id" . (in_array($id, ['budget', 'teamCount']) ? ' c-number' : ' c-name');
$class = "c-$id" . (in_array($id, array('budget', 'teamCount', 'estimate', 'consume')) ? ' c-number' : '');
if($id == 'id') $class .= ' cell-id';
+6 -5
View File
@@ -85,11 +85,12 @@ js::set('browseType', $browseType);
<thead>
<tr>
<?php
foreach($setting as $value)
{
if($value->id == 'status' and $browseType !== 'all') $value->show = false;
if($value->show) $this->datatable->printHead($value, $orderBy, $vars, $canBatchEdit);
}
foreach($setting as $value)
{
if($value->id == 'status' and $browseType !== 'all') $value->show = false;
if($value->id == 'teamCount' and $browseType == 'all') $value->show = false;
if($value->show) $this->datatable->printHead($value, $orderBy, $vars, $canBatchEdit);
}
?>
</tr>
</thead>
+1 -1
View File
@@ -117,7 +117,7 @@ $config->story->datatable->fieldList['openedDate']['required'] = 'no';
$config->story->datatable->fieldList['assignedTo']['title'] = 'assignedToAB';
$config->story->datatable->fieldList['assignedTo']['fixed'] = 'no';
$config->story->datatable->fieldList['assignedTo']['width'] = '85';
$config->story->datatable->fieldList['assignedTo']['width'] = '86';
$config->story->datatable->fieldList['assignedTo']['required'] = 'no';
$config->story->datatable->fieldList['assignedDate']['title'] = 'assignedDate';
+5 -4
View File
@@ -348,17 +348,17 @@ class story extends control
if($executionID)
{
$this->execution->setMenu($executionID);
$execution = $this->dao->findById((int)$executionID)->from(TABLE_EXECUTION)->fetch();
if($execution->type == 'project')
{
$this->project->setMenu($executionID);
$this->app->rawModule = 'projectstory';
$this->lang->navGroup->story = 'project';
$this->lang->product->menu = $this->lang->menu->{$execution->model};
$this->lang->product->menu = $this->lang->{$execution->model}->menu;
}
else
{
$this->execution->setMenu($executionID);
$this->app->rawModule = 'execution';
$this->lang->navGroup->story = 'execution';
}
@@ -1406,6 +1406,7 @@ class story extends control
/* Save session. */
$this->session->set('storyList', $this->app->getURI(true), 'product');
$this->session->set('taskList', $this->app->getURI(true), 'execution');
$this->session->set('designList', $this->app->getURI(true), 'project');
$this->session->set('bugList', $this->app->getURI(true), 'qa');
$this->session->set('caseList', $this->app->getURI(true), 'qa');
@@ -1776,7 +1777,7 @@ class story extends control
public function report($productID, $branchID, $storyType = 'story', $browseType = 'unclosed', $moduleID = 0, $chartType = 'pie')
{
$this->loadModel('report');
$this->view->charts = array();
$this->view->charts = array();
if(!empty($_POST))
{
+2 -1
View File
@@ -3,8 +3,9 @@ $(function()
if(typeof(resetActive) != 'undefined') return false;
if(typeof(storyType) == 'undefined') storyType = '';
if(typeof(rawModule) == 'undefined') rawModule = 'product';
if(typeof(app) == 'undefined') app = '';
if(typeof(execution) != 'undefined') rawModule = 'projectstory';
if(['project', 'projectstory'].indexOf(rawModule) === -1 && app != 'qa')
if(['project', 'projectstory'].indexOf(rawModule) === -1)
{
$('#navbar .nav li').removeClass('active');
$("#navbar .nav li[data-id=" + storyType + ']').addClass('active');
+2 -1
View File
@@ -13,7 +13,8 @@
<?php include '../../common/view/header.html.php';?>
<div id="mainMenu" class="clearfix">
<div class="btn-toolbar pull-left">
<?php echo html::a($this->createLink('product', 'browse', "productID=$productID&branch=$branchID&browseType=$browseType&moduleID=$moduleID"), "<i class='icon icon-back icon-sm'> </i>" . $lang->goback, '', "class='btn btn-link'");?>
<?php $browseLink = $this->session->storyList ? $this->session->storyList : $this->createLink('product', 'browse', "productID=$productID&branch=$branchID&browseType=$browseType&moduleID=$moduleID&storyType=$storyType")?>
<?php echo html::a($browseLink, "<i class='icon icon-back icon-sm'> </i>" . $lang->goback, '', "class='btn btn-link'");?>
<div class='divider'></div>
<div class='page-title'>
<span class='text'><?php echo $lang->story->report->common;?></span>
+1 -1
View File
@@ -667,7 +667,7 @@ class todo extends control
$this->session->set('project', $projectID);
$products = $this->loadModel('product')->getProductPairsByProject($projectID);
die(html::select('product', $products, '', "class='form-control chosen'"));
die(html::select('bugProduct', $products, '', "class='form-control chosen'"));
}
/**
+2 -4
View File
@@ -31,7 +31,6 @@ $(function()
{
var onlybody = config.onlybody;
var programID = $('#productProgram').val();
var productID = $('#product').val();
var link = createLink('story', 'create', 'productID=' + productID + '&branch=0&moduleID=0&storyID=0&projectID=0&bugID=0&planID=0&todoID=' + todoID, config.defaultView, 'no', programID);
@@ -41,9 +40,8 @@ $(function()
$('#toBugButton').click(function()
{
var onlybody = config.onlybody;
var projectID = $('#project').val();
var productID = $('#product').val();
var projectID = $('#bugProject').val();
var productID = $('#bugProduct').val();
var link = createLink('bug', 'create', 'productID=' + productID + '&branch=0&extras=todoID=' + todoID, config.defaultView, 'no', projectID);
location.href = link;
+2 -2
View File
@@ -272,11 +272,11 @@
<table align='center' class='table table-form'>
<tr>
<th><?php echo $lang->todo->project;?></th>
<td><?php echo html::select('project', $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>
<th><?php echo $lang->todo->product;?></th>
<td id='productIdBox'><?php echo html::select('product', $projectProducts, '', "class='form-control chosen'");?></td>
<td id='productIdBox'><?php echo html::select('bugProduct', $projectProducts, '', "class='form-control chosen'");?></td>
</tr>
<tr>
<td colspan='2' class='text-center'><?php echo html::commonButton($lang->todo->reasonList['bug'], "id='toBugButton'", 'btn btn-primary');?></td>
+3 -3
View File
@@ -30,12 +30,12 @@ class tree extends control
if($this->app->openApp == 'product')
{
$this->product->setMenu($rootID);;
$this->product->setMenu($rootID, 0, 0, '', $viewType);;
}
else if($this->app->openApp == 'qa')
{
$products = $this->product->getPairs('noclosed');
$this->loadModel('qa')->setMenu($products, $rootID);;
$this->loadModel('qa')->setMenu($products, $rootID, 0, $viewType);;
}
else if($this->app->openApp == 'project')
{
@@ -83,7 +83,7 @@ class tree extends control
/* Set menu.*/
$products = $this->product->getPairs();
$this->product->saveState($rootID, $products);
$this->product->setMenu($rootID);
$this->product->setMenu($rootID, 0, 0, '', $viewType);
unset($products[$rootID]);
$currentProduct = key($products);
+7 -1
View File
@@ -796,7 +796,8 @@ class treeModel extends model
*/
public function getProjectStoryTreeMenu($rootID, $startModule = 0, $userFunc)
{
$extra['projectID'] = $rootID;
if($this->app->rawModule == 'projectstory') $extra['projectID'] = $rootID;
if($this->app->rawModule == 'execution') $extra['executionID'] = $rootID;
$menu = "<ul id='modules' class='tree' data-ride='tree' data-name='tree-story'>";
$startModulePath = '';
if($startModule > 0)
@@ -1025,6 +1026,11 @@ class treeModel extends model
$projectID = $extra['projectID'];
return html::a(helper::createLink('projectstory', 'story', "projectID=$projectID&productID=$productID&branch=&browseType=byModule&param={$module->id}"), $module->name, '_self', "id='module{$module->id}'");
}
elseif(isset($extra['executionID']) and !empty($extra['executionID']))
{
$executionID = $extra['executionID'];
return html::a(helper::createLink('execution', 'story', "executionID=$executionID&orderBy=order_desc&type=byModule&param={$module->id}"), $module->name, '_self', "id='module{$module->id}'");
}
else
{
return html::a(helper::createLink('product', 'browse', "root={$module->root}&branch=&type=byModule&param={$module->id}"), $module->name, '_self', "id='module{$module->id}'");
-2
View File
@@ -493,8 +493,6 @@ class upgrade extends control
if(empty($repos))
{
$this->loadModel('setting')->deleteItems('owner=system&module=common&section=global&key=upgradeStep');
if($this->config->version == $this->config->installedVersion) die(js::alert($this->lang->upgrade->successTip) . js::locate($this->createLink('user', 'logout')));
die(js::locate($this->createLink('upgrade', 'afterExec', "fromVersion=&processed=no")));
}
+1 -1
View File
@@ -52,7 +52,7 @@ $lang->upgrade->noticeSQL = 'Your database is inconsistent with the standard
$lang->upgrade->afterDeleted = 'File is not deleted. Please refresh after you delete it.';
$lang->upgrade->mergeProgram = 'Data Merge';
$lang->upgrade->mergeTips = 'Data Migration Tips';
$lang->upgrade->to15Guide = 'ZenTao open source version 15.0.beta1 upgrade';
$lang->upgrade->to15Guide = 'ZenTao open source version 15.0 upgrade';
$lang->upgrade->to15Desc = <<<EOD
<p>Dear users, ZenTao has made adjustments to navigation and concepts since version 15. The main changes are as follows:</p>
<ol>
+1 -1
View File
@@ -53,7 +53,7 @@ $lang->upgrade->noticeSQL = '检查到你的数据库跟标准不一致,
$lang->upgrade->afterDeleted = '以上文件未能删除, 删除后刷新!';
$lang->upgrade->mergeProgram = '数据迁移';
$lang->upgrade->mergeTips = '数据迁移提示';
$lang->upgrade->to15Guide = '禅道开源版15.0.beta1升级';
$lang->upgrade->to15Guide = '禅道开源版15版本升级';
$lang->upgrade->to15Desc = <<<EOD
<p>尊敬的用户,禅道从15版本开始对导航和概念做了调整,主要改动如下:</p>
<ol>
+25 -1
View File
@@ -4054,6 +4054,20 @@ class upgradeModel extends model
$this->dao->replace(TABLE_GROUPPRIV)->data($grouppriv)->exec();
}
$stmt = $this->dao->select('*')->from(TABLE_GROUPPRIV)->where('module')->eq('doc')->andWhere('method')->eq('createlib')->query();
while($grouppriv = $stmt->fetch())
{
$grouppriv->method = 'createLib';
$this->dao->replace(TABLE_GROUPPRIV)->data($grouppriv)->exec();
}
$stmt = $this->dao->select('*')->from(TABLE_GROUPPRIV)->where('module')->eq('doc')->andWhere('method')->eq('editlib')->query();
while($grouppriv = $stmt->fetch())
{
$grouppriv->method = 'editLib';
$this->dao->replace(TABLE_GROUPPRIV)->data($grouppriv)->exec();
}
return true;
}
@@ -4204,6 +4218,16 @@ class upgradeModel extends model
->where('id')->eq($projectID)
->exec();
/* Create doc lib. */
$this->app->loadLang('doc');
$lib = new stdclass();
$lib->project = $projectID;
$lib->name = $this->lang->doclib->main['project'];
$lib->type = 'project';
$lib->main = '1';
$lib->acl = 'default';
$this->dao->insert(TABLE_DOCLIB)->data($lib)->exec();
$this->loadModel('action')->create('project', $projectID, 'openedbysystem');
if($data->projectStatus == 'closed') $this->loadModel('action')->create('project', $projectID, 'closedbysystem');
}
@@ -4302,7 +4326,7 @@ class upgradeModel extends model
$data->path = ",{$projectID},{$sprint->id},";
$data->type = 'sprint';
$data->acl = $sprint->acl == 'custom' ? 'private' : $sprint->acl;
$data->lifetime = $sprint->type;
$data->lifetime = empty($sprint->lifetime) ? $sprint->type : $sprint->lifetime;
$this->dao->update(TABLE_PROJECT)->data($data)->where('id')->eq($sprint->id)->exec();
}
+1 -1
View File
@@ -89,7 +89,7 @@
</tr>
<tr class='programParams'>
<th><?php echo $lang->project->acl;?></th>
<td><?php echo nl2br(html::radio('acl', $lang->project->aclList, 'open', '', 'block'));?></td>
<td><?php echo nl2br(html::radio('acl', $lang->program->subAclList, 'open', '', 'block'));?></td>
</tr>
</table>
<div class='table-foot text-center'><?php echo html::submitButton();?></div>
+1 -1
View File
@@ -2291,7 +2291,7 @@ class userModel extends model
}
/* Judge sprint auth. */
if(($project->type == 'sprint' || $project->type == 'stage') && $project->acl == 'private')
if(($project->type == 'sprint' || $project->type == 'stage') && $project->acl == 'private' && $this->config->systemMode == 'new')
{
$parent = $this->dao->select('openedBy,PM')->from(TABLE_PROJECT)->where('id')->eq($project->project)->fetch();
$users[$parent->openedBy] = $parent->openedBy;
+1
View File
@@ -49,6 +49,7 @@ $imgCutter.imgCutter(
done: function(response)
{
window.parent.$('#main-avatar, #menu-avatar').html('<img src="<?php echo $user->avatar?>"/>');
window.parent.$('#mainContent .avatar').html('<img src="<?php echo $user->avatar?>"/>');
if(window.parent.$('#main-avatar, #menu-avatar').hasClass('with-text')) window.parent.$('#main-avatar, #menu-avatar').toggleClass('with-text').css('background', 'none');
location.href = createLink('my', 'profile');
},
@@ -14,9 +14,6 @@ $position[] = html::a($this->createLink('admin', 'xuanxuan'), $this->lang->im->c
$position[] = $this->lang->client->browse;
?>
<?php include '../../../common/view/header.html.php';?>
<div id="mainMenu" class="clearfix">
<div class="btn-toolbar pull-left"><?php common::printAdminSubMenu('xuanxuan');?></div>
</div>
<div id='mainContent' class='main-content'>
<div class='main-header'>
<div class='pull-right'>
@@ -12,9 +12,6 @@
?>
<?php include '../../../common/view/header.html.php';?>
<?php $this->app->loadLang('client')?>
<div id="mainMenu" class="clearfix">
<div class="btn-toolbar pull-left"><?php common::printAdminSubMenu('xuanxuan');?></div>
</div>
<div id='mainContent' class='main-content'>
<div class='center-block'>
<div class='main-header'>