Merge branch 'master' of http://gitlab.zcorp.cc/easycorp/zentaopms
This commit is contained in:
@@ -65,10 +65,11 @@ class block extends control
|
||||
elseif(isset($this->lang->block->moduleList[$module]))
|
||||
{
|
||||
$this->get->set('mode', 'getblocklist');
|
||||
if($module == 'program') $this->get->set('dashboard', 'program');
|
||||
if($module == 'project') $this->get->set('dashboard', 'project');
|
||||
$this->view->blocks = $this->fetch('block', 'main', "module=$module&id=$id");
|
||||
$this->view->module = $module;
|
||||
}
|
||||
|
||||
$this->view->title = $title;
|
||||
$this->view->block = $this->block->getByID($id);
|
||||
$this->view->blockID = $id;
|
||||
@@ -219,14 +220,6 @@ class block extends control
|
||||
$commonField = $project->model . 'common';
|
||||
}
|
||||
|
||||
/* Replace the block Title saved in the database. */
|
||||
if($module == 'execution')
|
||||
{
|
||||
$projectBlock = array();
|
||||
foreach($this->lang->block->default['execution'] as $block) $projectBlock[$block['block']] = $block['title'];
|
||||
foreach($blocks as $block) $block->title = $projectBlock[$block->block];
|
||||
}
|
||||
|
||||
$inited = empty($this->config->$module->$commonField->blockInited) ? '' : $this->config->$module->$commonField->blockInited;
|
||||
|
||||
/* Init block when vist index first. */
|
||||
@@ -1347,7 +1340,7 @@ class block extends control
|
||||
$releases = array();
|
||||
$count = isset($this->params->count) ? (int)$this->params->count : 15;
|
||||
|
||||
$products = $this->dao->select('id, name')->from(TABLE_PRODUCT)->where('program')->eq($this->session->project)->limit(15)->fetchPairs();
|
||||
$products = $this->dao->select('id, name')->from(TABLE_PRODUCT)->where('program')->eq($this->session->program)->limit(15)->fetchPairs();
|
||||
$productIdList = array_keys($products);
|
||||
if(!empty($productIdList))
|
||||
{
|
||||
|
||||
+13
-11
@@ -264,7 +264,7 @@ class blockModel extends model
|
||||
public function getAvailableBlocks($module = '', $dashboard = '', $model = '')
|
||||
{
|
||||
$blocks = $this->lang->block->availableBlocks;
|
||||
if($dashboard == 'program')
|
||||
if($dashboard == 'project')
|
||||
{
|
||||
$blocks = $this->lang->block->modules[$model]['index']->availableBlocks;
|
||||
}
|
||||
@@ -292,8 +292,9 @@ class blockModel extends model
|
||||
*/
|
||||
public function getListParams($module = '')
|
||||
{
|
||||
if($module == 'product') return $this->getProductParams($module);
|
||||
if($module == 'project') return $this->getProjectParams($module);
|
||||
if($module == 'product') return $this->getProductParams();
|
||||
if($module == 'project') return $this->getProjectParams();
|
||||
if($module == 'execution') return $this->getExecutionParams();
|
||||
|
||||
$params = new stdclass();
|
||||
$params = $this->appendCountParams($params);
|
||||
@@ -442,11 +443,11 @@ class blockModel extends model
|
||||
* @access public
|
||||
* @return json
|
||||
*/
|
||||
public function getProgramParams()
|
||||
public function getProjectParams()
|
||||
{
|
||||
$this->app->loadLang('program');
|
||||
$this->app->loadLang('project');
|
||||
$params->type['name'] = $this->lang->block->type;
|
||||
$params->type['options'] = $this->lang->program->featureBar;
|
||||
$params->type['options'] = $this->lang->project->featureBar;
|
||||
$params->type['control'] = 'select';
|
||||
|
||||
$params->orderBy['name'] = $this->lang->block->orderBy;
|
||||
@@ -462,11 +463,11 @@ class blockModel extends model
|
||||
* @access public
|
||||
* @return json
|
||||
*/
|
||||
public function getProgramTeamParams()
|
||||
public function getProjectTeamParams()
|
||||
{
|
||||
$this->app->loadLang('program');
|
||||
$this->app->loadLang('project');
|
||||
$params->type['name'] = $this->lang->block->type;
|
||||
$params->type['options'] = $this->lang->program->featureBar;
|
||||
$params->type['options'] = $this->lang->project->featureBar;
|
||||
$params->type['control'] = 'select';
|
||||
|
||||
$params->orderBy['name'] = $this->lang->block->orderBy;
|
||||
@@ -512,6 +513,7 @@ class blockModel extends model
|
||||
{
|
||||
if($module == 'product') return $this->getProductStatisticParams($module);
|
||||
if($module == 'project') return $this->getProjectStatisticParams($module);
|
||||
if($module == 'execution') return $this->getExecutionStatisticParams($module);
|
||||
if($module == 'qa') return $this->getQaStatisticParams($module);
|
||||
|
||||
$params = new stdclass();
|
||||
@@ -700,10 +702,10 @@ class blockModel extends model
|
||||
* @access public
|
||||
* @return json
|
||||
*/
|
||||
public function getProjectParams()
|
||||
public function getExecutionParams()
|
||||
{
|
||||
$params->type['name'] = $this->lang->block->type;
|
||||
$params->type['options'] = $this->lang->block->typeList->project;
|
||||
$params->type['options'] = $this->lang->block->typeList->execution;
|
||||
$params->type['control'] = 'select';
|
||||
|
||||
return json_encode($this->appendCountParams($params));
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
<table class='table table-borderless table-hover table-fixed table-fixed-head tablesorter block-projects tablesorter'>
|
||||
<thead>
|
||||
<tr class='text-center'>
|
||||
<th class='c-name text-left'><?php echo $lang->project->name;?></th>
|
||||
<th class="c-date"><?php echo $lang->project->end;?></th>
|
||||
<th class='c-name text-left'><?php echo $lang->execution->name;?></th>
|
||||
<th class="c-date"><?php echo $lang->execution->end;?></th>
|
||||
<?php if($longBlock):?>
|
||||
<?php $thClass = common::checkNotCN() ? 'w-85px' : 'c-hours';?>
|
||||
<th class="c-status"><?php echo $lang->statusAB;?></th>
|
||||
|
||||
@@ -528,7 +528,7 @@ $lang->admin->menu->index = array('link' => '首页|admin|index', 'alias' => '
|
||||
$lang->admin->menu->company = array('link' => '人员|company|browse|', 'subModule' => ',user,dept,group,', 'alias' => ',dynamic,view,');
|
||||
$lang->admin->menu->message = array('link' => '通知|message|index', 'subModule' => 'message,mail,webhook');
|
||||
$lang->admin->menu->custom = array('link' => '自定义|custom|index', 'subModule' => 'custom');
|
||||
$lang->admin->menu->system = array('link' => '系统|backup|index', 'subModule' => 'cron,admin,backup,action');
|
||||
$lang->admin->menu->system = array('link' => '系统|backup|index', 'subModule' => 'cron,backup,action');
|
||||
|
||||
$lang->company->menu = $lang->company->menu;
|
||||
$lang->dept->menu = $lang->company->menu;
|
||||
|
||||
@@ -61,7 +61,6 @@ class execution extends control
|
||||
{
|
||||
if($locate == 'yes') $this->locate($this->createLink('execution', 'task'));
|
||||
|
||||
if($this->app->viewType != 'mhtml') unset($this->lang->execution->menu->index);
|
||||
$this->commonAction($executionID);
|
||||
|
||||
if(common::hasPriv('execution', 'create')) $this->lang->TRActions = html::a($this->createLink('execution', 'create'), "<i class='icon icon-sm icon-plus'></i> " . $this->lang->execution->create, '', "class='btn btn-primary'");
|
||||
@@ -2237,15 +2236,15 @@ class execution extends control
|
||||
$allStories = $this->story->getProductStories(array_keys($products), $branches, $moduleID = '0', $status = 'active', 'story', 'id_desc', $hasParent = false, '', $pager = null);
|
||||
}
|
||||
|
||||
if($execution->execution != 0) $executionStories = $this->story->getStoryPairs($execution->execution);
|
||||
if($execution->project != 0) $projectStories = $this->story->getExecutionStoryPairs($execution->project);
|
||||
|
||||
$executionStories = $this->story->getStoryPairs($executionID);
|
||||
$executionStories = $this->story->getExecutionStoryPairs($executionID);
|
||||
foreach($allStories as $id => $story)
|
||||
{
|
||||
if(isset($executionStories[$story->id])) unset($allStories[$id]);
|
||||
|
||||
if($story->parent < 0) unset($allStories[$id]);
|
||||
if(!empty($executionStories) and !isset($executionStories[$story->id])) unset($allStories[$id]);
|
||||
if(!empty($projectStories) and !isset($projectStories[$story->id])) unset($allStories[$id]);
|
||||
}
|
||||
|
||||
/* Pager. */
|
||||
|
||||
@@ -875,7 +875,7 @@ class treeModel extends model
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function createProjectStoryLink($type, $module, $extra)
|
||||
public function createExecutionStoryLink($type, $module, $extra)
|
||||
{
|
||||
$executionID = $extra['executionID'];
|
||||
$productID = $extra['productID'];
|
||||
|
||||
@@ -51,8 +51,8 @@ a.showMoreImage:hover {opacity: 1;}
|
||||
|
||||
.chosen-container .chosen-drop{z-index: 1100;}
|
||||
|
||||
.table-actions .btn{border: 1px solid #1183fb; color: #1183fb}
|
||||
.table-actions .btn:hover{background: #b3d4fc}
|
||||
.table-actions .btn {background: #78bdf5; color: #fff; border-color: #78bdf5}
|
||||
.table-footer .checked+div .btn, .table-actions .btn:hover {background: #16a8f8; border-color: #16a8f8}
|
||||
|
||||
#header #toolbar a{color: #fff; font-size: 13px; line-height: 15px; border: #84a2e2 1px solid}
|
||||
#header #toolbar i{font-size: 16px;}
|
||||
|
||||
Reference in New Issue
Block a user