* Finish task #70482.

This commit is contained in:
tianshujie
2022-09-28 15:10:49 +08:00
parent 389397ef92
commit 51fb885b08
4 changed files with 21 additions and 16 deletions

View File

@@ -49,11 +49,13 @@
<?php else:?>
<th><?php echo $lang->execution->name;?></th>
<?php endif;?>
<?php if(strpos('all,undone', $status) !== false):?>
<th class='c-status'><?php echo $lang->project->status;?></th>
<?php endif;?>
<th class='c-user text-left'><?php echo $lang->project->PM;?></th>
<th class="c-budget text-center"><?php echo $lang->project->budget;?></th>
<th class='c-date'><?php echo $lang->project->begin;?></th>
<th class='c-date'><?php echo $lang->project->end;?></th>
<th class='c-status'><?php echo $lang->project->status;?></th>
<th class="c-budget text-center"><?php echo $lang->project->budget;?></th>
<th class="c-number text-right"><?php echo $lang->project->estimate;?></th>
<th class="c-number text-right"><?php echo $lang->project->consume;?></th>
<th class="c-progress"><?php echo $lang->project->progress;?></th>
@@ -79,20 +81,22 @@
}
?>
</td>
<?php if(strpos('all,undone', $status) !== false):?>
<?php $statusTitle = $this->processStatus('project', $project);?>
<td class='c-status' title='<?php echo $statusTitle;?>'>
<span class="status-project status-<?php echo $project->status?>"><?php echo $statusTitle;?></span>
</td>
<?php endif;?>
<td class='padding-right'>
<?php $userID = isset($PMList[$project->PM]) ? $PMList[$project->PM]->id : ''?>
<?php if(!empty($project->PM)) echo html::a($this->createLink('user', 'profile', "userID=$userID", '', true), zget($users, $project->PM), '', "data-toggle='modal' data-type='iframe' data-width='800'");?>
</td>
<td class='padding-right text-left'><?php echo $project->begin;?></td>
<td class='padding-right text-left'><?php echo $project->end;?></td>
<?php $status = $this->processStatus('project', $project);?>
<td class='c-status' title='<?php echo $status;?>'>
<span class="status-project status-<?php echo $project->status?>"><?php echo $status;?></span>
</td>
<?php $projectBudget = in_array($this->app->getClientLang(), array('zh-cn','zh-tw')) ? round((float)$project->budget / 10000, 2) . $this->lang->project->tenThousand : round((float)$project->budget, 2);?>
<?php $budgetTitle = $project->budget != 0 ? zget($this->lang->project->currencySymbol, $project->budgetUnit) . ' ' . $projectBudget : $this->lang->project->future;?>
<?php $textStyle = $project->budget != 0 ? 'text-right' : 'text-center';?>
<td title='<?php echo $budgetTitle;?>' class="text-ellipsis <?php echo $textStyle;?>"><?php echo $budgetTitle;?></td>
<td class='padding-right text-left'><?php echo $project->begin;?></td>
<td class='padding-right text-left'><?php echo $project->end;?></td>
<td class="text-right" title="<?php echo $project->hours->totalEstimate . ' ' . $lang->execution->workHour;?>"><?php echo $project->hours->totalEstimate . $lang->execution->workHourUnit;?></td>
<td class="text-right" title="<?php echo $project->hours->totalConsumed . ' ' . $lang->execution->workHour;?>"><?php echo $project->hours->totalConsumed . $lang->execution->workHourUnit;?></td>
<td>

View File

@@ -54,6 +54,7 @@ $canBatchEdit = common::hasPriv('project', 'batchEdit');
foreach($setting as $value)
{
if($value->id == 'projectStatus' and $browseType !== 'all') $value->show = false;
if($value->id == 'status' and strpos('all,undone', $browseType) === false) $value->show = false;
if($value->show) $this->datatable->printHead($value, $orderBy, $vars, $canBatchEdit);
}
?>

View File

@@ -33,7 +33,7 @@ $config->project->sortFields->budget = 'budget';
global $lang;
$config->project->datatable = new stdclass();
$config->project->datatable->defaultField = array('id', 'name', 'PM', 'status', 'begin', 'end', 'budget', 'progress', 'actions');
$config->project->datatable->defaultField = array('id', 'name', 'status', 'PM', 'budget', 'begin', 'end', 'progress', 'actions');
$config->project->datatable->fieldList['id']['title'] = 'ID';
$config->project->datatable->fieldList['id']['fixed'] = 'left';
@@ -74,6 +74,12 @@ $config->project->datatable->fieldList['status']['required'] = 'no';
$config->project->datatable->fieldList['status']['sort'] = 'yes';
$config->project->datatable->fieldList['status']['pri'] = '2';
$config->project->datatable->fieldList['budget']['title'] = 'budget';
$config->project->datatable->fieldList['budget']['fixed'] = 'no';
$config->project->datatable->fieldList['budget']['width'] = '100';
$config->project->datatable->fieldList['budget']['required'] = 'yes';
$config->project->datatable->fieldList['budget']['pri'] = '3';
$config->project->datatable->fieldList['begin']['title'] = 'begin';
$config->project->datatable->fieldList['begin']['fixed'] = 'no';
$config->project->datatable->fieldList['begin']['width'] = '115';
@@ -86,12 +92,6 @@ $config->project->datatable->fieldList['end']['width'] = '100';
$config->project->datatable->fieldList['end']['required'] = 'no';
$config->project->datatable->fieldList['end']['pri'] = '3';
$config->project->datatable->fieldList['budget']['title'] = 'budget';
$config->project->datatable->fieldList['budget']['fixed'] = 'no';
$config->project->datatable->fieldList['budget']['width'] = '100';
$config->project->datatable->fieldList['budget']['required'] = 'yes';
$config->project->datatable->fieldList['budget']['pri'] = '3';
$config->project->datatable->fieldList['teamCount']['title'] = 'teamCount';
$config->project->datatable->fieldList['teamCount']['fixed'] = 'no';
$config->project->datatable->fieldList['teamCount']['width'] = '70';

View File

@@ -106,7 +106,7 @@
<?php
foreach($setting as $value)
{
if($value->id == 'status' and strpos(',all,bysearch,', ",$browseType,") === false) $value->show = false;
if($value->id == 'status' and strpos(',all,bysearch,undone,', ",$browseType,") === false) $value->show = false;
if($value->id == 'teamCount' and $browseType == 'all') $value->show = false;
if(commonModel::isTutorialMode() && ($value->id == 'PM' || $value->id == 'budget' || $value->id == 'teamCount')) $value->show = false;
if($value->show) $this->datatable->printHead($value, $orderBy, $vars, $canBatchEdit);