* adjust for task module page.

This commit is contained in:
wangyidong
2018-04-28 16:49:13 +08:00
parent fddcb3f23c
commit c8c5db1bfe
10 changed files with 354 additions and 337 deletions
+70 -68
View File
@@ -14,74 +14,76 @@
<?php include '../../common/view/datepicker.html.php';?>
<?php js::set('confirmRecord', $lang->task->confirmRecord);?>
<?php js::set('noticeSaveRecord', $lang->task->noticeSaveRecord);?>
<div id='titlebar'>
<div class='heading'>
<span class='prefix'><?php echo html::icon($lang->icons['task']);?> <strong><?php echo $task->id;?></strong></span>
<strong><?php echo html::a($this->createLink('task', 'view', 'task=' . $task->id), $task->name, '_blank');?></strong>
<small class='text-muted'> <?php echo $lang->task->logEfforts;?> <?php echo html::icon($lang->icons['recordEstimate']);?></small>
<div id='mainContent' class='main-content'>
<div class='center-block'>
<div class='main-header'>
<h2>
<span class='label label-id'><?php echo $task->id;?></span>
<?php echo isonlybody() ? $task->name : html::a($this->createLink('task', 'view', 'task=' . $task->id), $task->name);?>
<small><?php echo $lang->arrow . $lang->task->logEfforts;?></small>
</div>
</div>
<form id="recordForm" method='post' target='hiddenwin' style='margin-top:25px'>
<table class='table table-form table-fixed'>
<?php if(count($estimates)):?>
<thead>
<tr class='text-center'>
<th class="w-id"><?php echo $lang->idAB;?></th>
<th class="w-100px"><?php echo $lang->task->date;?></th>
<th class="w-60px"><?php echo $lang->task->consumedThisTime;?></th>
<th class="w-60px"><?php echo $lang->task->leftThisTime;?></th>
<th><?php echo $lang->comment;?></th>
<th class="w-60px"><?php echo $lang->actions;?></th>
</tr>
</thead>
<?php foreach($estimates as $estimate):?>
<tr class="text-center">
<td><?php echo $estimate->id;?></td>
<td><?php echo $estimate->date;?></td>
<td><?php echo $estimate->consumed;?></td>
<td><?php echo $estimate->left;?></td>
<td class="text-left"><?php echo $estimate->work;?></td>
<td align='center'>
<?php
if($task->status == 'wait' or $task->status == 'pause' or $task->status == 'doing')
{
common::printIcon('task', 'editEstimate', "estimateID=$estimate->id", '', 'list', 'pencil', '', 'showinonlybody', true);
common::printIcon('task', 'deleteEstimate', "estimateID=$estimate->id", '', 'list', 'remove', 'hiddenwin', 'showinonlybody');
}
?>
</td>
</tr>
<?php endforeach;?>
<?php endif;?>
<?php if(in_array($task->status, array('wait', 'pause', 'doing'))):?>
<?php if(empty($task->team) || (!empty($task->team) && in_array($task->assignedTo, array_keys($task->team)))) :?>
<thead>
<tr class='text-center'>
<th class="w-id"><?php echo $lang->idAB;?></th>
<th class="w-120px"><?php echo $lang->task->date;?></th>
<th class="w-60px"><?php echo $lang->task->consumedThisTime;?></th>
<th class="w-60px"><?php echo $lang->task->leftThisTime;?></th>
<th><?php echo $lang->comment;?></th>
<th class='w-10px'></th>
</tr>
</thead>
<?php for($i = 1; $i <= 3; $i++):?>
<tr class="text-center">
<td><?php echo $i . html::hidden("id[$i]", $i);?></td>
<td><?php echo html::input("dates[$i]", '', "class='form-control text-center form-date'");?></td>
<td><?php echo html::input("consumed[$i]", '', "class='form-control text-center' autocomplete='off'");?></td>
<td><?php echo html::input("left[$i]", '', "class='form-control text-center left' autocomplete='off'");?></td>
<td class="text-left"><?php echo html::textarea("work[$i]", '', "class='form-control' style='height:50px;'");?></td>
<td></td>
</tr>
<?php endfor;?>
<tr>
<td colspan='6' class='text-center'><?php echo html::submitButton() . html::backButton();?></td>
</tr>
</table>
<?php endif;?>
<?php endif;?>
</form>
</div>
</div>
<div class='main'>
<form class='form-condensed' id="recordForm" method='post' target='hiddenwin' style='margin-top:25px'>
<table class='table table-form table-fixed'>
<?php if(count($estimates)):?>
<thead>
<tr class='text-center'>
<th class="w-id"><?php echo $lang->idAB;?></th>
<th class="w-100px"><?php echo $lang->task->date;?></th>
<th class="w-60px"><?php echo $lang->task->consumedThisTime;?></th>
<th class="w-60px"><?php echo $lang->task->leftThisTime;?></th>
<th><?php echo $lang->comment;?></th>
<th class="w-60px"><?php echo $lang->actions;?></th>
</tr>
</thead>
<?php foreach($estimates as $estimate):?>
<tr class="text-center">
<td><?php echo $estimate->id;?></td>
<td><?php echo $estimate->date;?></td>
<td><?php echo $estimate->consumed;?></td>
<td><?php echo $estimate->left;?></td>
<td class="text-left"><?php echo $estimate->work;?></td>
<td align='center'>
<?php
if($task->status == 'wait' or $task->status == 'pause' or $task->status == 'doing')
{
common::printIcon('task', 'editEstimate', "estimateID=$estimate->id", '', 'list', 'pencil', '', 'showinonlybody', true);
common::printIcon('task', 'deleteEstimate', "estimateID=$estimate->id", '', 'list', 'remove', 'hiddenwin', 'showinonlybody');
}
?>
</td>
</tr>
<?php endforeach;?>
<?php endif;?>
<?php if(in_array($task->status, array('wait', 'pause', 'doing'))):?>
<?php if(empty($task->team) || (!empty($task->team) && in_array($task->assignedTo, array_keys($task->team)))) :?>
<thead>
<tr class='text-center'>
<th class="w-id"><?php echo $lang->idAB;?></th>
<th class="w-120px"><?php echo $lang->task->date;?></th>
<th class="w-60px"><?php echo $lang->task->consumedThisTime;?></th>
<th class="w-60px"><?php echo $lang->task->leftThisTime;?></th>
<th><?php echo $lang->comment;?></th>
<th class='w-10px'></th>
</tr>
</thead>
<?php for($i = 1; $i <= 3; $i++):?>
<tr class="text-center">
<td><?php echo $i . html::hidden("id[$i]", $i);?></td>
<td><?php echo html::input("dates[$i]", '', "class='form-control text-center form-date'");?></td>
<td><?php echo html::input("consumed[$i]", '', "class='form-control text-center' autocomplete='off'");?></td>
<td><?php echo html::input("left[$i]", '', "class='form-control text-center left' autocomplete='off'");?></td>
<td class="text-left"><?php echo html::textarea("work[$i]", '', "class='form-control' style='height:50px;'");?></td>
<td></td>
</tr>
<?php endfor;?>
<tr>
<td colspan='6' class='text-center'><?php echo html::submitButton() . html::backButton();?></td>
</tr>
</table>
<?php endif;?>
<?php endif;?>
</form>
</div>
<?php include '../../common/view/footer.lite.html.php';?>