* refactory action-trash.

This commit is contained in:
wangyidong
2013-01-08 05:39:51 +00:00
parent f5b2bec05a
commit 3f41b340a0
12 changed files with 99 additions and 70 deletions

View File

@@ -35,6 +35,7 @@ class action extends control
$this->session->set('bugList', $uri);
$this->session->set('caseList', $uri);
$this->session->set('testtaskList', $uri);
$this->session->set('docList', $uri);
/* Header and position. */
$this->view->header->title = $this->lang->action->trash;

View File

@@ -44,6 +44,10 @@
ob_end_clean();
echo $actionLinks;
}
else
{
common::printRPN($browseLink);
}
?>
</div>
</div>

View File

@@ -12,27 +12,27 @@
?>
<?php include '../../common/view/header.html.php';?>
<table class='cont-rt5'>
<caption>BUILD #<?php echo $build->id . ' ' . $build->name;?></caption>
<caption class='<?php if($build->deleted) echo 'deleted';?>'>BUILD #<?php echo $build->id . ' ' . $build->name;?></caption>
<tr valign='top'>
<td>
<fieldset>
<legend><?php echo $lang->build->desc;?></legend>
<div class='content'><?php echo $build->desc;?></div>
</fieldset>
<?php include '../../common/view/action.html.php';?>
<div class='a-center f-16px strong'>
<?php
$browseLink = $this->session->buildList ? $this->session->buildList : $this->createLink('project', 'build', "projectID=$build->project");
if(!$build->deleted)
{
common::printLink('build', 'edit', "buildID=$build->id", $lang->edit);
common::printLink('build', 'delete', "buildID=$build->id", $lang->delete, 'hiddenwin');
}
echo html::a($browseLink, $lang->goback);
?>
</div>
<table class='table-1 fixed'>
<caption class='caption-t1'><?php echo $lang->build->stories;?></caption>
</fieldset>
<?php include '../../common/view/action.html.php';?>
<div class='a-center f-16px strong mb-10px'>
<?php
$browseLink = $this->session->buildList ? $this->session->buildList : $this->createLink('project', 'build', "projectID=$build->project");
if(!$build->deleted)
{
common::printLink('build', 'edit', "buildID=$build->id", $lang->edit);
common::printLink('build', 'delete', "buildID=$build->id", $lang->delete, 'hiddenwin');
}
echo html::a($browseLink, $lang->goback);
?>
</div>
<table class='table-1 fixed'>
<caption class='caption-t1'><?php echo $lang->build->stories;?></caption>
<tr>
<th class='w-id'><?php echo $lang->idAB;?></th>
<th class='w-pri'><?php echo $lang->priAB;?></th>
@@ -54,10 +54,10 @@
<td><?php echo $lang->story->stageList[$story->stage];?></td>
</tr>
<?php endforeach;?>
<tr><td colspan=7 class='a-left strong'><?php echo sprintf($lang->build->finishStories, count($stories));?></td></tr>
<tr><td colspan=7 class='a-left strong'><?php echo sprintf($lang->build->finishStories, count($stories));?></td></tr>
</table>
<table class='table-1 fixed'>
<caption class='caption-t1'><?php echo $lang->build->bugs;?></caption>
<caption class='caption-t1'><?php echo $lang->build->bugs;?></caption>
<tr>
<th class='w-id'><?php echo $lang->idAB;?></th>
<th><?php echo $lang->bug->title;?></th>
@@ -77,43 +77,43 @@
<td><?php echo substr($bug->openedDate, 5, 11)?></td>
<td><?php echo $users[$bug->resolvedBy];?></td>
<td><?php echo substr($bug->resolvedDate, 5, 11)?></td>
</tr>
<?php endforeach;?>
<tr><td colspan=7 class='a-left strong'><?php echo sprintf($lang->build->resolvedBugs, count($bugs));?></td></tr>
</table>
</td>
<td class="divider"></td>
<td class="side">
<fieldset>
<legend><?php echo $lang->build->basicInfo?></legend>
<table class='table-1 a-left'>
<tr>
<th width='25%' class='a-right'><?php echo $lang->build->product;?></th>
<td><?php echo $build->productName;?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->build->name;?></th>
<td><?php echo $build->name;?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->build->builder;?></th>
<td><?php echo $users[$build->builder];?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->build->date;?></th>
<td><?php echo $build->date;?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->build->scmPath;?></th>
<td><?php strpos($build->scmPath, 'http') === 0 ? printf(html::a($build->scmPath)) : printf($build->scmPath);?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->build->filePath;?></th>
<td><?php strpos($build->filePath, 'http') === 0 ? printf(html::a($build->filePath)) : printf($build->filePath);?></td>
</tr>
<?php endforeach;?>
<tr><td colspan=7 class='a-left strong'><?php echo sprintf($lang->build->resolvedBugs, count($bugs));?></td></tr>
</table>
</td>
<td class="divider"></td>
<td class="side">
<fieldset>
<legend><?php echo $lang->build->basicInfo?></legend>
<table class='table-1 a-left'>
<tr>
<th width='25%' class='a-right'><?php echo $lang->build->product;?></th>
<td><?php echo $build->productName;?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->build->name;?></th>
<td class='<?php if($build->deleted) echo 'deleted';?>'><?php echo $build->name;?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->build->builder;?></th>
<td><?php echo $users[$build->builder];?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->build->date;?></th>
<td><?php echo $build->date;?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->build->scmPath;?></th>
<td><?php strpos($build->scmPath, 'http') === 0 ? printf(html::a($build->scmPath)) : printf($build->scmPath);?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->build->filePath;?></th>
<td><?php strpos($build->filePath, 'http') === 0 ? printf(html::a($build->filePath)) : printf($build->filePath);?></td>
</tr>
</table>
</fieldset>
</td>
</tr>
</table>
</fieldset>
</td>
</tr>
</table>
<?php include '../../common/view/footer.html.php';?>

View File

@@ -31,6 +31,10 @@
ob_end_clean();
echo $actionLinks;
}
else
{
common::printRPN($browseLink);
}
?>
</div>
</div>

View File

@@ -29,6 +29,10 @@
ob_end_clean();
echo $actionLinks;
}
else
{
common::printRPN($browseLink);
}
?>
</div>
</div>

View File

@@ -13,7 +13,7 @@
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/tablesorter.html.php';?>
<table class='cont-rt5'>
<caption>PLAN #<?php echo $plan->id . ' ' . $plan->title;?></caption>
<caption <?php if($plan->deleted) echo "class='deleted'";?>>PLAN #<?php echo $plan->id . ' ' . $plan->title;?></caption>
<tr valign='top'>
<td>
<fieldset>
@@ -78,7 +78,7 @@
<table class='table-1 a-left'>
<tr>
<th width='25%' class='a-right'><?php echo $lang->productplan->title;?></th>
<td <?php if($plan->deleted) echo "class='deleted'";?>><?php echo $plan->title;?></th>
<td><?php echo $plan->title;?></th>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->productplan->begin;?></th>

View File

@@ -29,6 +29,10 @@
ob_end_clean();
echo $actionLinks;
}
else
{
common::printRPN($browseLink);
}
?>
</div>
</div>
@@ -50,7 +54,7 @@
<table class='table-1 a-left'>
<tr>
<th width='25%' class='a-right'><?php echo $lang->project->name;?></th>
<td <?php if($project->deleted) echo "class='deleted'";?>><?php echo $project->name;?></td>
<td><?php echo $project->name;?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->project->code;?></th>

View File

@@ -12,7 +12,7 @@
?>
<?php include '../../common/view/header.html.php';?>
<table class='cont-rt5'>
<caption>RELEASE #<?php echo $release->id . ' ' . $release->name;?></caption>
<caption class='<?php if($release->deleted) echo 'deleted';?>'>RELEASE #<?php echo $release->id . ' ' . $release->name;?></caption>
<tr valign='top'>
<td>
<fieldset>
@@ -99,7 +99,7 @@
</tr>
<tr>
<th class='rowhead'><?php echo $lang->release->name;?></th>
<td class='<?php if($release->deleted) echo 'deleted';?>'><?php echo $release->name;?></td>
<td><?php echo $release->name;?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->release->build;?></th>

View File

@@ -40,6 +40,10 @@
ob_clean();
echo $actionLinks;
}
else
{
common::printRPN($browseLink);
}
?>
</div>
</div>

View File

@@ -12,11 +12,11 @@
?>
<?php include '../../common/view/header.html.php';?>
<div id='titlebar'>
<?php if($task->fromBug == 0):?>
<div id='main' class='<?php if($task->deleted) echo 'deleted';?>'>TASK #<?php echo $task->id . ' ' . $task->name;?></div>
<?php else:?>
<div id='main' class='<?php if($task->deleted) echo 'deleted';?>'>TASK #<?php echo $task->id . ' ' . $task->name . '('. $lang->task->fromBug . $lang->colon . $task->fromBug . ')';?></div>
<?php endif;?>
<?php
$name = "TASK #$task->id $task->name";
if($task->fromBug != 0) $name .= "({$lang->task->fromBug}$lang->colon$task->fromBug)";
?>
<div id='main' class='<?php if($task->deleted) echo 'deleted';?>'><?php echo $name;?></div>
<div>
<?php
$browseLink = $app->session->taskList != false ? $app->session->taskList : $this->createLink('project', 'browse', "projectID=$task->project");
@@ -44,6 +44,10 @@
ob_clean();
echo $actionLinks;
}
else
{
common::printRPN($browseLink);
}
?>
</div>
</div>

View File

@@ -12,8 +12,8 @@
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/colorize.html.php';?>
<div id='titlebar' <?php if($case->deleted) echo "class='deleted'";?>>
<div id='main'>CASE #<?php echo $case->id . ' ' . $case->title;?></div>
<div id='titlebar'>
<div id='main' <?php if($case->deleted) echo "class='deleted'";?>>CASE #<?php echo $case->id . ' ' . $case->title;?></div>
<div>
<?php
$browseLink = $app->session->caseList != false ? $app->session->caseList : $this->createLink('testcase', 'browse', "productID=$case->product");
@@ -40,6 +40,10 @@
ob_clean();
echo $actionLinks;
}
else
{
common::printRPN($browseLink);
}
?>
</div>
</div>

View File

@@ -13,10 +13,10 @@
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/tablesorter.html.php';?>
<table class='table-1'>
<caption>TASK #<?php echo $task->id . ' ' . $task->name;?></caption>
<caption <?php if($task->deleted) echo "class='deleted'";?>>TASK #<?php echo $task->id . ' ' . $task->name;?></caption>
<tr>
<th class='rowhead'><?php echo $lang->testtask->name;?></th>
<td class='<?php if($task->deleted) echo 'deleted';?>'><?php echo $task->name;?>
<td><?php echo $task->name;?>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->testtask->project;?></th>
@@ -60,8 +60,8 @@
common::printLink('testtask', 'linkcase', "taskID=$task->id", $lang->testtask->linkCaseAB);
common::printLink('testtask', 'edit', "taskID=$task->id",$lang->edit);
common::printLink('testtask', 'delete', "taskID=$task->id", $lang->delete, 'hiddenwin');
echo html::a($browseLink, $lang->goback);
}
echo html::a($browseLink, $lang->goback);
?>
</div>
<?php include '../../common/view/action.html.php';?>