Merge branch '15.0.beta3' of https://gitlab.zcorp.cc/easycorp/zentaopms into 15.0.beta3
This commit is contained in:
@@ -15,7 +15,8 @@ $(function()
|
||||
}
|
||||
else
|
||||
{
|
||||
var lang = config.clientLang;
|
||||
var lang = config.clientLang;
|
||||
blockTitle = $blockParams.find('#title').val();
|
||||
if(lang.indexOf('zh') >= 0)
|
||||
{
|
||||
if(blockTitle.indexOf(preValue) >= 0)
|
||||
|
||||
@@ -544,7 +544,7 @@ function notice()
|
||||
if($('#openedBuild').find('option').length <= 1)
|
||||
{
|
||||
var html = '';
|
||||
if($('#execution').length == 0 || $('#execution').val() == '')
|
||||
if($('#execution').length == 0 || $('#execution').val() == 0)
|
||||
{
|
||||
var branch = $('#branch').val();
|
||||
if(typeof(branch) == 'undefined') branch = 0;
|
||||
|
||||
@@ -81,9 +81,7 @@ $projectIDParam = $isProjectStory ? "projectID=$projectID&" : '';
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<?php
|
||||
$this->moduleName = $this->app->rawModule;
|
||||
$this->methodName = $this->app->rawMethod;
|
||||
foreach(customModel::getFeatureMenu($this->moduleName, $this->methodName) as $menuItem)
|
||||
foreach(customModel::getFeatureMenu($this->app->rawModule, $this->app->rawMethod) as $menuItem)
|
||||
{
|
||||
if(isset($menuItem->hidden)) continue;
|
||||
if($menuItem->name == 'emptysr' && $storyType == 'story') continue;
|
||||
@@ -341,6 +339,7 @@ $projectIDParam = $isProjectStory ? "projectID=$projectID&" : '';
|
||||
<ul class='dropdown-menu'>
|
||||
<?php
|
||||
$class = $canBatchClose ? '' : "class='disabled'";
|
||||
$productID = $this->app->openApp == 'project' ? 0 : $productID;
|
||||
$actionLink = $this->createLink('story', 'batchClose', "productID=$productID&projectID=0&storyType=$storyType");
|
||||
$misc = $canBatchClose ? "onclick=\"setFormAction('$actionLink')\"" : '';
|
||||
echo "<li $class>" . html::a('#', $lang->close, '', $misc) . "</li>";
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
</div>
|
||||
<?php if($product->type == 'platform'):?>
|
||||
<div class="detail">
|
||||
<div class="detail-title"><strong><?php echo $lang->product->branchName['platform'];?></strong><a class="btn btn-link pull-right muted"><i class="icon icon-more icon-sm"></i></a></div>
|
||||
<div class="detail-title"><strong><?php echo $lang->product->branchName['platform'];?></strong><a class="btn btn-link pull-right muted" href="<?php echo $this->createLink('branch', 'manage', "productID={$product->id}")?>"><i class="icon icon-more icon-sm"></i></a></div>
|
||||
<div class="detail-content">
|
||||
<ul class="clearfix branch-list">
|
||||
<?php foreach($branches as $branchName):?>
|
||||
|
||||
@@ -400,6 +400,14 @@ class project extends control
|
||||
|
||||
if($_POST)
|
||||
{
|
||||
$oldPlans = $this->dao->select('plan')->from(TABLE_PROJECTPRODUCT)->where('project')->eq($projectID)->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');
|
||||
$diffResult = array_diff($oldPlans, $_POST['plans']);
|
||||
|
||||
$changes = $this->project->update($projectID);
|
||||
if(dao::isError()) $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
|
||||
@@ -409,7 +417,33 @@ class project extends control
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
}
|
||||
|
||||
/* Link the plan stories. */
|
||||
if(!empty($_POST['plans']) and !empty($diffResult))
|
||||
{
|
||||
$this->dao->delete()->from(TABLE_PROJECTSTORY)->where('project')->eq($projectID)->andWhere('story')->in(array_keys($oldPlanStories))->exec();
|
||||
foreach($_POST['plans'] as $planID)
|
||||
{
|
||||
$planStories = $planProducts = array();
|
||||
$planStory = $this->loadModel('story')->getPlanStories($planID);
|
||||
if(!empty($planStory))
|
||||
{
|
||||
foreach($planStory as $id => $story)
|
||||
{
|
||||
if($story->status == 'draft')
|
||||
{
|
||||
unset($planStory[$id]);
|
||||
continue;
|
||||
}
|
||||
$planProducts[$story->id] = $story->product;
|
||||
}
|
||||
$planStories = array_keys($planStory);
|
||||
$this->execution->linkStory($projectID, $planStories, $planProducts);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$locateLink = $this->session->projectList ? $this->session->projectList : inLink('view', "projectID=$projectID");
|
||||
if($from == 'projectView') $locateLink = $this->createLink('project', 'view', "projectID=$projectID");
|
||||
if($from == 'program') $locateLink = $this->createLink('program', 'browse');
|
||||
if($from == 'programProject') $locateLink = $this->session->programProject ? $this->session->programProject : $this->createLink('program', 'project', "projectID=$projectID");
|
||||
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $locateLink));
|
||||
|
||||
@@ -104,7 +104,7 @@
|
||||
echo $this->buildOperateMenu($project, 'view');
|
||||
|
||||
echo "<div class='divider'></div>";
|
||||
common::printIcon('project', 'edit', $params, $project, 'button', 'edit', '', '', '', '', $lang->edit);
|
||||
common::printIcon('project', 'edit', $params . '&from=projectView', $project, 'button', 'edit', '', '', '', '', $lang->edit);
|
||||
common::printIcon('project', 'delete', $params, $project, 'button', 'trash', 'hiddenwin', '', '', '', $lang->delete);
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -193,6 +193,7 @@ class projectrelease extends control
|
||||
public function view($releaseID, $type = 'story', $link = 'false', $param = '', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 100, $pageID = 1)
|
||||
{
|
||||
$this->session->set('buildList', $this->app->getURI(true), 'execution');
|
||||
$this->session->set('storyList', $this->app->getURI(true), $this->app->openApp);
|
||||
|
||||
$this->loadModel('story');
|
||||
$this->loadModel('bug');
|
||||
|
||||
@@ -146,7 +146,7 @@
|
||||
|
||||
if(common::hasPriv('story', 'batchClose'))
|
||||
{
|
||||
$closeURL = $this->createLink('story', 'batchClose', "productID=$release->product");
|
||||
$closeURL = $this->createLink('story', 'batchClose');
|
||||
echo html::a("###", $lang->story->batchClose, '', "onclick='setFormAction(\"$closeURL\", \"\", this)' class='btn'");
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -1195,18 +1195,25 @@ class story extends control
|
||||
$this->view->position[] = html::a($this->createLink('execution', 'story', "executionID=$execution->id"), $execution->name);
|
||||
$this->view->title = $execution->name . $this->lang->colon . $this->lang->story->batchClose;
|
||||
}
|
||||
/* The stories of my. */
|
||||
else
|
||||
{
|
||||
$this->lang->story->menu = $this->lang->my->menu;
|
||||
$this->lang->story->menuOrder = $this->lang->my->menuOrder;
|
||||
$this->loadModel('my')->setMenu();
|
||||
if($this->app->openApp == 'project')
|
||||
{
|
||||
$this->project->setMenu($this->session->project);
|
||||
$this->view->title = $this->lang->story->batchEdit;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->lang->story->menu = $this->lang->my->menu;
|
||||
$this->lang->story->menuOrder = $this->lang->my->menuOrder;
|
||||
$this->loadModel('my')->setMenu();
|
||||
|
||||
if($from == 'work') $this->lang->my->menu->work['subModule'] = 'story';
|
||||
if($from == 'contribute') $this->lang->my->menu->contribute['subModule'] = 'story';
|
||||
if($from == 'work') $this->lang->my->menu->work['subModule'] = 'story';
|
||||
if($from == 'contribute') $this->lang->my->menu->contribute['subModule'] = 'story';
|
||||
|
||||
$this->view->position[] = html::a($this->createLink('my', 'story'), $this->lang->my->story);
|
||||
$this->view->title = $this->lang->story->batchEdit;
|
||||
$this->view->position[] = html::a($this->createLink('my', 'story'), $this->lang->my->story);
|
||||
$this->view->title = $this->lang->story->batchEdit;
|
||||
}
|
||||
}
|
||||
|
||||
/* Judge whether the editedStories is too large and set session. */
|
||||
|
||||
Reference in New Issue
Block a user