Merge branch 'tanghucheng_zentaopms_256' into 'zentaopms_256'
* Fix code format. See merge request easycorp/zentaopms!5979
This commit is contained in:
@@ -2761,8 +2761,12 @@ class story extends control
|
||||
/* If siblings == ,$siblingID, update siblings empty.*/
|
||||
if(count(explode(',', $siblings)) == 3) $siblings = '';
|
||||
|
||||
$this->dao->update(TABLE_STORY)->set('siblings')->eq('')->where('id')->eq($siblingID)->exec();
|
||||
$this->dao->update(TABLE_STORY)->set('siblings')->eq($siblings)->where('siblings')->like("%,{$_POST['siblingID']},%")->exec();
|
||||
/* batchUnset siblingID from siblings.*/
|
||||
$replaceSql = "UPDATE " . TABLE_STORY . " SET siblings = REPLACE(siblings,',$siblingID,', ',') WHERE `product` = $story->product";
|
||||
$this->dbh->exec($replaceSql);
|
||||
|
||||
/* Update siblings to empty by siblingID and if siblings eq ','.*/
|
||||
$this->dao->update(TABLE_STORY)->set('siblings')->eq('')->where('id')->eq($siblingID)->orWhere('siblings')->eq(',')->exec();
|
||||
|
||||
if(!dao::isError()) $this->loadModel('action')->create('story', $siblingID, 'relieved');
|
||||
return $this->send(array('result' => 'success', 'data' => $siblings));
|
||||
|
||||
@@ -77,7 +77,7 @@ $lang->story->order = 'Order';
|
||||
$lang->story->saveDraft = 'Save as draft';
|
||||
$lang->story->doNotSubmit = 'Do Not Submit';
|
||||
$lang->story->currentBranch = 'Current Branch';
|
||||
$lang->story->sibling = 'Sibling story';
|
||||
$lang->story->siblings = 'Siblings story';
|
||||
$lang->story->relieved = 'Relieved';
|
||||
$lang->story->relievedSiblings = 'Relieved Siblings';
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ $lang->story->order = 'Order';
|
||||
$lang->story->saveDraft = 'Save as draft';
|
||||
$lang->story->doNotSubmit = 'Do Not Submit';
|
||||
$lang->story->currentBranch = 'Current Branch';
|
||||
$lang->story->sibling = 'Sibling story';
|
||||
$lang->story->siblings = 'Siblings story';
|
||||
$lang->story->relieved = 'Relieved';
|
||||
$lang->story->relievedSiblings = 'Relieved Siblings';
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ $lang->story->order = 'Order';
|
||||
$lang->story->saveDraft = 'Save as draft';
|
||||
$lang->story->doNotSubmit = 'Do Not Submit';
|
||||
$lang->story->currentBranch = 'Current Branch';
|
||||
$lang->story->sibling = 'Sibling story';
|
||||
$lang->story->siblings = 'Siblings story';
|
||||
$lang->story->relieved = 'Relieved';
|
||||
$lang->story->relievedSiblings = 'Relieved Siblings';
|
||||
|
||||
|
||||
@@ -76,8 +76,8 @@ $lang->story->undetermined = '待定';
|
||||
$lang->story->order = '排序';
|
||||
$lang->story->saveDraft = '存为草稿';
|
||||
$lang->story->doNotSubmit = '保存暂不提交';
|
||||
$lang->story->currentBranch = '当前分支';
|
||||
$lang->story->sibling = '孪生需求';
|
||||
$lang->story->currentBranch = '当前%s';
|
||||
$lang->story->siblings = '孪生需求';
|
||||
$lang->story->relieved = '解除';
|
||||
$lang->story->relievedSiblings = '解除孪生需求';
|
||||
|
||||
|
||||
@@ -1,18 +1,14 @@
|
||||
<?php
|
||||
$lang->story->currentBranch = sprintf($this->lang->story->currentBranch, $this->lang->product->branchName[$product->type]);
|
||||
js::set('relieveURL', inlink('ajaxRelieveSibling'));
|
||||
js::set('storyID', $story->id);
|
||||
js::set('relieved', $lang->story->relieved);
|
||||
js::set('relievedTip', $lang->story->relievedTip);
|
||||
js::set('cancel', $lang->cancel);
|
||||
|
||||
$canViewLinkStory = common::hasPriv('story', 'view');
|
||||
$canRelieved = common::hasPriv('story', 'relieved');
|
||||
|
||||
foreach($siblings as $id => $sibling)
|
||||
{
|
||||
if($story->branch == $sibling->branch) continue;
|
||||
unset($siblings[$id]);
|
||||
$siblings[] = $sibling;
|
||||
}
|
||||
array_unshift($siblings, $story);
|
||||
|
||||
foreach($siblings as $sibling)
|
||||
{
|
||||
|
||||
@@ -402,7 +402,7 @@
|
||||
<div class='tabs'>
|
||||
<ul class='nav nav-tabs'>
|
||||
<?php if($product->type != 'normal' and $story->siblings):?>
|
||||
<li><a href='#legendSiblings' data-toggle='tab'><?php echo $lang->story->sibling;?></a></li>
|
||||
<li><a href='#legendSiblings' data-toggle='tab'><?php echo $lang->story->siblings;?></a></li>
|
||||
<?php endif;?>
|
||||
<?php if($this->config->URAndSR):?>
|
||||
<li class='active'><a href='#legendStories' data-toggle='tab'><?php echo $story->type == 'story' ? $lang->story->requirement : $lang->story->story;?></a></li>
|
||||
|
||||
Reference in New Issue
Block a user