Merge branch '165_package'

This commit is contained in:
王怡栋
2022-04-01 15:30:36 +08:00
60 changed files with 4287 additions and 82 deletions
+2 -1
View File
@@ -53,7 +53,8 @@ class project extends control
unset($fields[$key]);
}
$projects = $this->project->getInfoList($status, $orderBy);
$involved = $this->cookie->involved ? $this->cookie->involved : 0;
$projects = $this->project->getInfoList($status, $orderBy, '', $involved);
$users = $this->loadModel('user')->getPairs('noletter');
$this->loadModel('product');
+8 -3
View File
@@ -182,7 +182,11 @@ class projectModel extends model
{
if(defined('TUTORIAL')) return $this->loadModel('tutorial')->getProject();
$project = $this->dao->select('*')->from(TABLE_PROJECT)->where('id')->eq($projectID)->andWhere('`type`')->in($type)->fetch();
$project = $this->dao->select('*')->from(TABLE_PROJECT)
->where('id')->eq($projectID)
->beginIF($this->config->system == 'new')->andWhere('`type`')->in($type)->fi()
->fetch();
if(!$project) return false;
if($project->end == '0000-00-00') $project->end = '';
@@ -196,13 +200,14 @@ class projectModel extends model
* @param string $status
* @param string $orderBy
* @param int $pager
* @param int $involved
* @access public
* @return array
*/
public function getInfoList($status = 'undone', $orderBy = 'order_desc', $pager = null)
public function getInfoList($status = 'undone', $orderBy = 'order_desc', $pager = null, $involved = 0)
{
/* Init vars. */
$projects = $this->loadModel('program')->getProjectList(0, $status, 0, $orderBy, $pager, 0, 1);
$projects = $this->loadModel('program')->getProjectList(0, $status, 0, $orderBy, $pager, 0, $involved);
if(empty($projects)) return array();
$projectIdList = array_keys($projects);
+3 -2
View File
@@ -92,8 +92,8 @@
</td>
<td colspan='2'><?php echo html::radio('delta', $lang->project->endList , '', "onclick='computeEndDate(this.value)'");?></td>
</tr>
<?php $hiddenDays = $model == 'scrum' ? '' : 'hidden';?>
<tr id='daysBox' class="<?php echo $hiddenDays;?>">
<?php if($model == 'scrum'):?>
<tr id='daysBox'>
<th><?php echo $lang->execution->days;?></th>
<td>
<div class='input-group'>
@@ -102,6 +102,7 @@
</div>
</td><td></td><td></td>
</tr>
<?php endif;?>
<tr>
<th id='productTitle'><?php echo $lang->project->manageProducts;?></th>
<td class='text-left' id='productsBox' colspan="3">
+3 -2
View File
@@ -103,8 +103,8 @@
<?php $deltaValue = $project->end == LONG_TIME ? 999 : (strtotime($project->end) - strtotime($project->begin)) / 3600 / 24 + 1;?>
<td colspan='2'><?php echo html::radio('delta', $lang->project->endList , $deltaValue, "onclick='computeEndDate(this.value)'");?></td>
</tr>
<?php $hidden = ($model != 'scrum' or $project->end == LONG_TIME) ? "class='hidden'" : '';?>
<tr id='daysBox' <?php echo $hidden;?>>
<?php if($project->model == 'scrum'):?>
<tr id='daysBox' <?php if($project->end == LONG_TIME) echo "class='hidden'";?>>
<th><?php echo $lang->project->days;?></th>
<td>
<div class='input-group'>
@@ -115,6 +115,7 @@
<td></td>
<td></td>
</tr>
<?php endif;?>
<tr>
<th><?php echo $lang->project->manageProducts;?></th>
<td class='text-left' id='productsBox' colspan="3">
+1
View File
@@ -30,6 +30,7 @@
<td><?php echo html::input('realBegan', helper::today(), "class='form-control form-date'");?></td>
<td></td>
</tr>
<?php $this->printExtendFields($project, 'table', 'columns=3');?>
<tr>
<th class='w-40px'><?php echo $lang->comment;?></th>
<td colspan='2'><?php echo html::textarea('comment', '', "rows='6' class='form-control kindeditor' hidefocus='true'");?></td>
+6 -1
View File
@@ -81,6 +81,11 @@
</div>
</div>
</div>
<div class="col-sm-12">
<div class='panel'>
<?php $this->printExtendFields($project, 'div', "position=left&inForm=0");?>
</div>
</div>
<div class="col-sm-12">
<?php $blockHistory = true;?>
<?php $actionFormLink = $this->createLink('action', 'comment', "objectType=project&objectID=$project->id");?>
@@ -235,8 +240,8 @@
<p><?php echo $aclList[$project->acl];?></p>
</div>
</div>
<?php $this->printExtendFields($project, 'div', "position=right&inForm=0&inCell=1");?>
</div>
<?php $this->printExtendFields($project, 'div', "position=right&inForm=0&inCell=1");?>
</div>
</div>
</div>