Merge branch 'sprint/pailei2_tianshujie_fixbug' into 'pailei2'

Sprint/pailei2 tianshujie fixbug

See merge request easycorp/zentaopms!2325
This commit is contained in:
李玉春
2022-03-17 03:15:34 +00:00
7 changed files with 33 additions and 41 deletions
+23
View File
@@ -85,3 +85,26 @@ function locateView(module, objectID)
if(module == 'build') dataApp = 'project';
parent.$.apps.open(createLink(module, 'view', 'objectID=' + objectID), dataApp);
}
/**
* When type change.
*
* @param string type
* @access public
* @return void
*/
function changeType(type)
{
if(type == 'private')
{
$('#ownerBox').addClass('hidden');
$('#teamBox').addClass('hidden');
$('#whitelistBox').removeClass('hidden');
}
else
{
$('#ownerBox').removeClass('hidden');
$('#teamBox').removeClass('hidden');
$('#whitelistBox').addClass('hidden');
}
}
-12
View File
@@ -1,12 +0,0 @@
/**
* When type change.
*
* @param string type
* @access public
* @return void
*/
function changeType(type)
{
location.href = createLink('kanban', 'createSpace', 'type=' + type);
}
-12
View File
@@ -1,12 +0,0 @@
/**
* When type change.
*
* @param int spaceID
* @param string type
* @access public
* @return void
*/
function changeType(spaceID, type)
{
location.href = createLink('kanban', 'editSpace', 'spaceID=' + spaceID + '&type=' + type);
}
+3 -7
View File
@@ -27,12 +27,11 @@
<th><?php echo $lang->kanbanspace->name;?></th>
<td><?php echo html::input('name', '', "class='form-control'");?></td>
</tr>
<?php if($type != 'private'):?>
<tr>
<tr id='ownerBox' class="<?php echo $type == 'private' ? 'hidden' : '';?>">
<th><?php echo $lang->kanbanspace->owner;?></th>
<td><?php echo html::select('owner', $users, '', "class='form-control chosen'");?></td>
</tr>
<tr>
<tr id='teamBox' class="<?php echo $type == 'private' ? 'hidden' : '';?>">
<th><?php echo $lang->kanbanspace->team;?></th>
<td colspan='2'>
<div class="input-group">
@@ -41,7 +40,6 @@
</div>
</td>
</tr>
<?php endif;?>
<tr>
<th><?php echo $lang->kanbanspace->desc;?></th>
<td colspan='2'>
@@ -49,12 +47,10 @@
<?php echo html::textarea('desc', '', "rows='10' class='form-control'");?>
</td>
</tr>
<?php if($type == 'private'):?>
<tr id="whitelistBox">
<tr id="whitelistBox" class="<?php echo $type == 'private' ? '' : 'hidden';?>">
<th><?php echo $lang->whitelist;?></th>
<td><?php echo html::select('whitelist[]', $users, '', 'class="form-control chosen" multiple');?></td>
</tr>
<?php endif;?>
<tr>
<td colspan='3' class='text-center form-actions'>
<?php echo html::submitButton();?>
+4 -8
View File
@@ -20,7 +20,7 @@
<table class='table table-form'>
<tr>
<th><?php echo $lang->kanbanspace->type;?></th>
<td><?php echo html::select('type', $typeList, $defaultType, "onchange='changeType($spaceID, this.value)' class='form-control chosen'");?></td>
<td><?php echo html::select('type', $typeList, $defaultType, "onchange='changeType(this.value)' class='form-control chosen'");?></td>
<td></td>
</tr>
<tr>
@@ -28,12 +28,11 @@
<td><?php echo html::input('name', $space->name, "class='form-control'");?></td>
<td></td>
</tr>
<?php if($space->type != 'private' or $type == 'cooperation' or $type == 'public'):?>
<tr>
<tr id='ownerBox' class="<?php echo $space->type == 'private' ? 'hidden' : '';?>">
<th><?php echo $lang->kanbanspace->owner;?></th>
<td><?php echo html::select('owner', $users, $space->owner, "class='form-control chosen'");?></td>
</tr>
<tr>
<tr id='teamBox' class="<?php echo $space->type == 'private' ? 'hidden' : '';?>">
<th><?php echo $lang->kanbanspace->team;?></th>
<td colspan='2'>
<div class="input-group">
@@ -42,7 +41,6 @@
</div>
</td>
</tr>
<?php endif;?>
<tr>
<th><?php echo $lang->kanbanspace->desc;?></th>
<td colspan='2'>
@@ -50,12 +48,10 @@
<?php echo html::textarea('desc', $space->desc, "rows='10' class='form-control'");?>
</td>
</tr>
<?php if($space->type == 'private' and $type != 'cooperation' and $type != 'public'):?>
<tr id="whitelistBox">
<tr id="whitelistBox" class="<?php echo $space->type == 'private' ? '' : 'hidden';?>">
<th><?php echo $lang->whitelist;?></th>
<td><?php echo html::select('whitelist[]', $users, $space->whitelist, 'class="form-control chosen" multiple');?></td>
</tr>
<?php endif;?>
<tr>
<td colspan='3' class='text-center form-actions'>
<?php echo html::submitButton();?>
+1 -1
View File
@@ -41,7 +41,7 @@ class storyModel extends model
if($setImgSize) $story->spec = $this->file->setImgSize($story->spec);
if($setImgSize) $story->verify = $this->file->setImgSize($story->verify);
$story->executions = $this->dao->select('t1.project, t2.name, t2.status')->from(TABLE_PROJECTSTORY)->alias('t1')
$story->executions = $this->dao->select('t1.project, t2.name, t2.status, t2.type')->from(TABLE_PROJECTSTORY)->alias('t1')
->leftJoin(TABLE_EXECUTION)->alias('t2')->on('t1.project = t2.id')
->where('t1.story')->eq($storyID)
->andWhere('t2.type')->in('sprint,stage,kanban')
+2 -1
View File
@@ -492,7 +492,8 @@
{
foreach($story->executions as $executionID => $execution)
{
echo "<li title='$execution->name'>" . html::a($this->createLink('execution', 'browse', "executionID=$executionID"), $execution->name, '', "class='text-muted'") . '</li>';
$execName = ($execution->type == 'kanban' and isonlybody()) ? $execution->name : html::a($this->createLink('execution', 'browse', "executionID=$executionID"), $execution->name, '', "class='text-muted'");
echo "<li title='$execution->name'>" . $execName . '</li>';
}
}
?>