* Rewrite view page of task.
This commit is contained in:
@@ -20,8 +20,8 @@
|
||||
<div class="page-title">
|
||||
<span class="label label-id"><?php echo $task->id?></span>
|
||||
<span class="text" style='color: <?php echo $task->color; ?>'>
|
||||
<?php if(!empty($task->parent)) echo '<span class="label">' . $this->lang->task->childrenAB . '</span> ';?>
|
||||
<?php if(!empty($task->team)) echo '<span class="label">' . $this->lang->task->multipleAB . '</span> ';?>
|
||||
<?php if(!empty($task->parent)) echo '<span class="label no-margin">' . $this->lang->task->childrenAB . '</span>';?>
|
||||
<?php if(!empty($task->team)) echo '<span class="label no-margin">' . $this->lang->task->multipleAB . '</span>';?>
|
||||
<?php echo isset($task->parentName) ? $task->parentName . '/' : '';?><?php echo $task->name;?>
|
||||
</span>
|
||||
<?php if($task->deleted):?>
|
||||
@@ -38,23 +38,31 @@
|
||||
<div class="cell">
|
||||
<div class="detail">
|
||||
<div class="detail-title"><?php echo $lang->task->legendDesc;?></div>
|
||||
<div class="detail-content article-content"><?php echo $task->desc;?></div>
|
||||
<div class="detail-content article-content">
|
||||
<?php echo !empty($task->desc) ? $task->desc : "<div class='text-center text-muted'>" . $lang->task->noData . '</div>';?>
|
||||
</div>
|
||||
</div>
|
||||
<?php if($project->type != 'ops'):?>
|
||||
<?php if($task->fromBug != 0):?>
|
||||
<div class="detail">
|
||||
<div class="detail-title"><?php echo $lang->task->steps;?></div>
|
||||
<div class="detail-content article-content"><?php echo $task->bugSteps;?></div>
|
||||
<div class="detail-title"><?php echo $lang->bug->steps;?></div>
|
||||
<div class="detail-content article-content">
|
||||
<?php echo !empty($task->bugSteps) ? $task->bugSteps : "<div class='text-center text-muted'>" . $lang->task->noData . '</div>';?>
|
||||
</div>
|
||||
</div>
|
||||
<?php elseif($task->story):?>
|
||||
<div class="detail">
|
||||
<div class='detail-title'><?php echo $lang->task->storySpec;?></div>
|
||||
<div class='detail-content article-content'><?php echo $task->storySpec;?></div>
|
||||
<div class='detail-content article-content'>
|
||||
<?php echo (!empty($task->storySpec) || !empty($task->storyFiles)) ? $task->storySpec : "<div class='text-center text-muted'>" . $lang->task->noData . '</div>';?>
|
||||
</div>
|
||||
<?php echo $this->fetch('file', 'printFiles', array('files' => $task->storyFiles, 'fieldset' => 'false'));?>
|
||||
</div>
|
||||
<div class='detail'>
|
||||
<div class='detail-title'><?php echo $lang->task->storyVerify;?></div>
|
||||
<div class='detail-content article-content'><?php echo $task->storyVerify;?></div>
|
||||
<div class='detail-content article-content'>
|
||||
<?php echo !empty($task->storyVerify) ? $task->storyVerify : "<div class='text-center text-muted'>" . $lang->task->noData . '</div>';?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<?php if(isset($task->cases) and $task->cases):?>
|
||||
@@ -62,7 +70,7 @@
|
||||
<div class='detail-title'><?php echo $lang->task->case;?></div>
|
||||
<div class='detail-content article-content'>
|
||||
<ul class='list-unstyled'>
|
||||
<?php foreach($task->cases as $caseID => $case) echo '<li>' . html::a($this->createLink('testcase', 'view', "caseID=$caseID", '', true), "#$caseID " . $case, '', "data-toggle='modal' data-type='iframe' data-width='90%'") . '</li>';?>
|
||||
<?php foreach($task->cases as $caseID => $case) echo '<li>' . html::a($this->createLink('testcase', 'view', "caseID=$caseID", '', true), "#$caseID " . $case, '', "data-toggle='modal' data-type='iframe' data-width='90%'") . '</li>';?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
@@ -71,17 +79,18 @@
|
||||
<?php if(!empty($task->children)):?>
|
||||
<div class='detail'>
|
||||
<div class='detail-title'><?php echo $this->lang->task->children;?></div>
|
||||
<div class='detail-content article-content'>
|
||||
<table class='table table-hover table-fixed'>
|
||||
<tr class='text-center'>
|
||||
<th class='w-60px'> <?php echo $lang->task->id;?></th>
|
||||
<th class='w-40px'> <?php echo $lang->task->lblPri;?></th>
|
||||
<th> <?php echo $lang->task->name;?></th>
|
||||
<th class='w-100px'><?php echo $lang->task->deadline;?></th>
|
||||
<th class='w-80px'> <?php echo $lang->task->assignedTo;?></th>
|
||||
<th class='w-90px'> <?php echo $lang->task->status;?></th>
|
||||
<th class='w-50px visible-lg'><?php echo $lang->task->consumedAB . $lang->task->lblHour;?></th>
|
||||
<th class='w-50px visible-lg'><?php echo $lang->task->leftAB . $lang->task->lblHour;?></th>
|
||||
<th class='w-200px'><?php echo $lang->actions;?></th>
|
||||
<td class='w-50px'> <?php echo $lang->task->id;?></th>
|
||||
<td class='w-40px'> <?php echo $lang->task->lblPri;?></th>
|
||||
<td> <?php echo $lang->task->name;?></th>
|
||||
<td class='w-100px'><?php echo $lang->task->deadline;?></th>
|
||||
<td class='w-80px'> <?php echo $lang->task->assignedTo;?></th>
|
||||
<td class='w-80px'> <?php echo $lang->task->status;?></th>
|
||||
<td class='w-60px visible-lg'><?php echo $lang->task->consumedAB . $lang->task->lblHour;?></th>
|
||||
<td class='w-60px visible-lg'><?php echo $lang->task->leftAB . $lang->task->lblHour;?></th>
|
||||
<td class='w-230px'><?php echo $lang->actions;?></th>
|
||||
</tr>
|
||||
<?php foreach($task->children as $child):?>
|
||||
<tr class='text-center'>
|
||||
@@ -93,7 +102,7 @@
|
||||
echo "</span>";
|
||||
?>
|
||||
</td>
|
||||
<td class='text-left'><a href="<?php echo $this->createLink('task', 'view', "taskID=$child->id"); ?>"><?php echo $child->name;?></a></td>
|
||||
<td class='text-left' title='<?php echo $child->name;?>'><a href="<?php echo $this->createLink('task', 'view', "taskID=$child->id"); ?>"><?php echo $child->name;?></a></td>
|
||||
<td><?php echo $child->deadline;?></td>
|
||||
<td><?php if(isset($users[$child->assignedTo])) echo $users[$child->assignedTo];?></td>
|
||||
<td><?php echo zget($lang->task->statusList, $child->status);?></td>
|
||||
@@ -112,6 +121,7 @@
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<?php echo $this->fetch('file', 'printFiles', array('files' => $task->files, 'fieldset' => 'true'));?>
|
||||
@@ -127,7 +137,7 @@
|
||||
<table class="table table-data">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th class='w-80px'><?php echo $lang->task->project;?></th>
|
||||
<th><?php echo $lang->task->project;?></th>
|
||||
<td><?php if(!common::printLink('project', 'view', "projectID=$task->project", $project->name)) echo $project->name;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -166,15 +176,16 @@
|
||||
<tr class='nofixed'>
|
||||
<th><?php echo $lang->task->story;?></th>
|
||||
<td>
|
||||
<?php
|
||||
if($task->storyTitle and !common::printLink('story', 'view', "storyID=$task->story", $task->storyTitle, '', "class='iframe' data-width='80%'", true, true)) echo $task->storyTitle;
|
||||
if($task->needConfirm)
|
||||
{
|
||||
echo "(<span class='warning'>{$lang->story->changed}</span> ";
|
||||
echo html::a($this->createLink('task', 'confirmStoryChange', "taskID=$task->id"), $lang->confirm, 'hiddenwin');
|
||||
echo ")";
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
if(!$task->storyTitle) echo $lang->task->noData;
|
||||
if($task->storyTitle and !common::printLink('story', 'view', "storyID=$task->story", $task->storyTitle, '', "class='iframe' data-width='80%'", true, true)) echo $task->storyTitle;
|
||||
if($task->needConfirm)
|
||||
{
|
||||
echo "(<span class='warning'>{$lang->story->changed}</span> ";
|
||||
echo html::a($this->createLink('task', 'confirmStoryChange', "taskID=$task->id"), $lang->confirm, 'hiddenwin');
|
||||
echo ")";
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php if($task->fromBug):?>
|
||||
@@ -185,7 +196,7 @@
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
<th><?php echo empty($task->team) ? $lang->task->assignTo : $lang->task->transferTo;?></th>
|
||||
<td><?php echo $task->assignedTo ? $task->assignedToRealName . $lang->at . $task->assignedDate : '';?></td>
|
||||
<td><?php echo $task->assignedTo ? $task->assignedToRealName . $lang->at . $task->assignedDate : $lang->task->noData;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->task->type;?></th>
|
||||
@@ -193,15 +204,27 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->task->status;?></th>
|
||||
<td><span class='status-<?php echo $task->status;?>'><span class="label label-dot"></span> <?php zget($lang->task->statusList, $task->status);?></td>
|
||||
<td><span class='status-<?php echo $task->status;?>'><span class="label label-dot"></span> <?php echo zget($lang->task->statusList, $task->status);?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->task->pri;?></th>
|
||||
<td><span class='label-pri <?php echo 'label-pri-' . $task->pri;?>'><?php echo $task->pri == '0' ? '' : zget($lang->task->priList, $task->pri)?></span></td>
|
||||
<td><span class='label-pri <?php echo 'label-pri-' . $task->pri;?>'><?php echo $task->pri == '0' ? $lang->task->noData : zget($lang->task->priList, $task->pri)?></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->task->mailto;?></th>
|
||||
<td><?php $mailto = explode(',', str_replace(' ', '', $task->mailto)); foreach($mailto as $account) echo ' ' . zget($users, $account, $account); ?></td>
|
||||
<td>
|
||||
<?php
|
||||
$mailto = explode(',', str_replace(' ', '', $task->mailto));
|
||||
if(empty($mainto))
|
||||
{
|
||||
echo $lang->task->noData;
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach($mailto as $account) echo ' ' . zget($users, $account, $account);
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -241,7 +264,7 @@
|
||||
<div class="detail-content">
|
||||
<table class='table table-data'>
|
||||
<tr>
|
||||
<th class='w-80px'><?php echo $lang->task->estStarted;?></th>
|
||||
<th><?php echo $lang->task->estStarted;?></th>
|
||||
<td><?php echo $task->estStarted;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -251,10 +274,10 @@
|
||||
<tr>
|
||||
<th><?php echo $lang->task->deadline;?></th>
|
||||
<td>
|
||||
<?php
|
||||
echo $task->deadline;
|
||||
if(isset($task->delay)) printf($lang->task->delayWarning, $task->delay);
|
||||
?>
|
||||
<?php
|
||||
echo $task->deadline;
|
||||
if(isset($task->delay)) printf($lang->task->delayWarning, $task->delay);
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -279,28 +302,28 @@
|
||||
<div class="detail-content">
|
||||
<table class='table table-data'>
|
||||
<tr>
|
||||
<th class='w-80px'><?php echo $lang->task->openedBy;?></th>
|
||||
<td><?php if($task->openedBy) echo zget($users, $task->openedBy, $task->openedBy) . $lang->at . $task->openedDate;?></td>
|
||||
<th><?php echo $lang->task->openedBy;?></th>
|
||||
<td><?php echo $task->openedBy ? zget($users, $task->openedBy, $task->openedBy) . $lang->at . $task->openedDate : $lang->task->noData;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->task->finishedBy;?></th>
|
||||
<td><?php if($task->finishedBy) echo zget($users, $task->finishedBy, $task->finishedBy) . $lang->at . $task->finishedDate;?></td>
|
||||
<td><?php echo ($task->finishedBy) ? zget($users, $task->finishedBy, $task->finishedBy) . $lang->at . $task->finishedDate : $lang->task->noData;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->task->canceledBy;?></th>
|
||||
<td><?php if($task->canceledBy) echo zget($users, $task->canceledBy, $task->canceledBy) . $lang->at . $task->canceledDate;?></td>
|
||||
<td><?php echo $task->canceledBy ? zget($users, $task->canceledBy, $task->canceledBy) . $lang->at . $task->canceledDate : $lang->task->noData;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->task->closedBy;?></th>
|
||||
<td><?php if($task->closedBy) echo zget($users, $task->closedBy, $task->closedBy) . $lang->at . $task->closedDate;?></td>
|
||||
<td><?php echo $task->closedBy ? zget($users, $task->closedBy, $task->closedBy) . $lang->at . $task->closedDate : $lang->task->noData;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->task->closedReason;?></th>
|
||||
<td><?php echo $lang->task->reasonList[$task->closedReason];?></td>
|
||||
<td><?php echo $task->closedReason ? $lang->task->reasonList[$task->closedReason] : $lang->task->noData;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->task->lastEdited;?></th>
|
||||
<td><?php if($task->lastEditedBy) echo zget($users, $task->lastEditedBy, $task->lastEditedBy) . $lang->at . $task->lastEditedDate;?></td>
|
||||
<td><?php echo $task->lastEditedBy ? zget($users, $task->lastEditedBy, $task->lastEditedBy) . $lang->at . $task->lastEditedDate : $lang->task->noData;?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
@@ -308,36 +331,35 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
div>
|
||||
|
||||
iv id="mainActions">
|
||||
<?php common::printPreAndNext($preAndNext);?>
|
||||
<div class="btn-toolbar">
|
||||
<?php if(!$task->deleted):?>
|
||||
<?php
|
||||
common::printIcon('task', 'assignTo', "projectID=$task->project&taskID=$task->id", $task, 'button', '', '', 'iframe', true, '', empty($task->team) ? $lang->task->assignTo : $lang->task->transfer);
|
||||
common::printIcon('task', 'start', "taskID=$task->id", $task, 'button', '', '', 'iframe', true);
|
||||
common::printIcon('task', 'restart', "taskID=$task->id", $task, 'button', '', '', 'iframe', true);
|
||||
common::printIcon('task', 'recordEstimate', "taskID=$task->id", $task, 'button', '', '', 'iframe', true);
|
||||
common::printIcon('task', 'pause', "taskID=$task->id", $task, 'button', '', '', 'iframe', true);
|
||||
common::printIcon('task', 'finish', "taskID=$task->id", $task, 'button', '', '', 'iframe showinonlybody text-success', true);
|
||||
common::printIcon('task', 'close', "taskID=$task->id", $task, 'button', '', '', 'iframe', true);
|
||||
common::printIcon('task', 'activate', "taskID=$task->id", $task, 'button', '', '', 'iframe text-success', true);
|
||||
common::printIcon('task', 'cancel', "taskID=$task->id", $task, 'button', '', '', 'iframe', true);
|
||||
|
||||
echo "<div class='divider'></div>";
|
||||
if(empty($task->team) or empty($task->children)) common::printIcon('task', 'batchCreate', "project=$task->project&storyID=$task->story&moduleID=$task->module&taskID=$task->id", $task, 'button','plus','','','','',' ');
|
||||
common::printIcon('task', 'edit', "taskID=$task->id", $task);
|
||||
common::printIcon('task', 'create', "productID=0&storyID=0&moduleID=0&taskID=$task->id", $task, 'button', 'copy');
|
||||
common::printIcon('task', 'delete', "projectID=$task->project&taskID=$task->id", $task);
|
||||
|
||||
echo "<div class='divider'></div>";
|
||||
if(!empty($task->parent)) echo html::a(helper::createLink('task', 'view', "taskID=$task->parent"), "<i class='iconicon-double-angle-up'></i>", '', "class='btn' title='{$lang->task->parent}'");
|
||||
common::printBack($browseLink);
|
||||
?>
|
||||
<?php else:?>
|
||||
<?php common::printBack($browseLink);?>
|
||||
<?php endif;?>
|
||||
<div id="mainActions">
|
||||
<?php common::printPreAndNext($preAndNext);?>
|
||||
<div class="btn-toolbar">
|
||||
<?php if(!$task->deleted):?>
|
||||
<?php
|
||||
common::printBack($browseLink);
|
||||
common::printIcon('task', 'assignTo', "projectID=$task->project&taskID=$task->id", $task, 'button', '', '', 'iframe', true, '', empty($task->team) ? $lang->task->assignTo : $lang->task->transfer);
|
||||
common::printIcon('task', 'start', "taskID=$task->id", $task, 'button', '', '', 'iframe', true);
|
||||
common::printIcon('task', 'restart', "taskID=$task->id", $task, 'button', '', '', 'iframe', true);
|
||||
common::printIcon('task', 'recordEstimate', "taskID=$task->id", $task, 'button', '', '', 'iframe', true);
|
||||
common::printIcon('task', 'pause', "taskID=$task->id", $task, 'button', '', '', 'iframe', true);
|
||||
common::printIcon('task', 'finish', "taskID=$task->id", $task, 'button', '', '', 'iframe showinonlybody text-success', true);
|
||||
common::printIcon('task', 'close', "taskID=$task->id", $task, 'button', '', '', 'iframe', true);
|
||||
common::printIcon('task', 'activate', "taskID=$task->id", $task, 'button', '', '', 'iframe text-success', true);
|
||||
common::printIcon('task', 'cancel', "taskID=$task->id", $task, 'button', '', '', 'iframe', true);
|
||||
|
||||
echo "<div class='divider'></div>";
|
||||
if(empty($task->team) or empty($task->children)) common::printIcon('task', 'batchCreate', "project=$task->project&storyID=$task->story&moduleID=$task->module&taskID=$task->id", $task, 'button','plus','','','','',' ');
|
||||
common::printIcon('task', 'edit', "taskID=$task->id", $task);
|
||||
common::printIcon('task', 'create', "productID=0&storyID=0&moduleID=0&taskID=$task->id", $task, 'button', 'copy');
|
||||
common::printIcon('task', 'delete', "projectID=$task->project&taskID=$task->id", $task);
|
||||
|
||||
if(!empty($task->parent)) echo html::a(helper::createLink('task', 'view', "taskID=$task->parent"), "<i class='icon icon-double-angle-up'></i>", '', "class='btn btn-link' title='{$lang->task->parent}'");
|
||||
?>
|
||||
<?php else:?>
|
||||
<?php common::printBack($browseLink);?>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
</div>
|
||||
<?php include '../../common/view/syntaxhighlighter.html.php';?>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
Reference in New Issue
Block a user