From 3f41b340a01233d8750eeec8be5e1bf7af1351a4 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Tue, 8 Jan 2013 05:39:51 +0000 Subject: [PATCH] * refactory action-trash. --- module/action/control.php | 1 + module/bug/view/view.html.php | 4 + module/build/view/view.html.php | 110 +++++++++++++------------- module/doc/view/view.html.php | 4 + module/product/view/view.html.php | 4 + module/productplan/view/view.html.php | 4 +- module/project/view/view.html.php | 6 +- module/release/view/view.html.php | 4 +- module/story/view/view.html.php | 4 + module/task/view/view.html.php | 14 ++-- module/testcase/view/view.html.php | 8 +- module/testtask/view/view.html.php | 6 +- 12 files changed, 99 insertions(+), 70 deletions(-) diff --git a/module/action/control.php b/module/action/control.php index c71f561f77..d4e9250434 100644 --- a/module/action/control.php +++ b/module/action/control.php @@ -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; diff --git a/module/bug/view/view.html.php b/module/bug/view/view.html.php index f736687d0f..dc76d6e945 100644 --- a/module/bug/view/view.html.php +++ b/module/bug/view/view.html.php @@ -44,6 +44,10 @@ ob_end_clean(); echo $actionLinks; } + else + { + common::printRPN($browseLink); + } ?> diff --git a/module/build/view/view.html.php b/module/build/view/view.html.php index bda7c2213e..4a69a5daa0 100644 --- a/module/build/view/view.html.php +++ b/module/build/view/view.html.php @@ -12,27 +12,27 @@ ?> - + + + - - - +
BUILD #id . ' ' . $build->name;?>'>BUILD #id . ' ' . $build->name;?>
build->desc;?>
desc;?>
-
- -
- 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); - ?> -
- - + + +
+ 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); + ?> +
+
build->stories;?>
+ @@ -54,10 +54,10 @@ - +
build->stories;?>
idAB;?> priAB;?>story->stageList[$story->stage];?>
build->finishStories, count($stories));?>
build->finishStories, count($stories));?>
- + @@ -77,43 +77,43 @@ + + + +
build->bugs;?>build->bugs;?>
idAB;?> bug->title;?>openedDate, 5, 11)?> resolvedBy];?> resolvedDate, 5, 11)?>
build->resolvedBugs, count($bugs));?>
+
+
+ build->basicInfo?> + + + + + + + + + + + + + + + + + + + + + + + + - - -
build->product;?>productName;?>
build->name;?>name;?>
build->builder;?>builder];?>
build->date;?>date;?>
build->scmPath;?>scmPath, 'http') === 0 ? printf(html::a($build->scmPath)) : printf($build->scmPath);?>
build->filePath;?>filePath, 'http') === 0 ? printf(html::a($build->filePath)) : printf($build->filePath);?>
build->resolvedBugs, count($bugs));?>
-
-
- build->basicInfo?> - - - - - - - - - - - - - - - - - - - - - - - - - -
build->product;?>productName;?>
build->name;?>'>name;?>
build->builder;?>builder];?>
build->date;?>date;?>
build->scmPath;?>scmPath, 'http') === 0 ? printf(html::a($build->scmPath)) : printf($build->scmPath);?>
build->filePath;?>filePath, 'http') === 0 ? printf(html::a($build->filePath)) : printf($build->filePath);?>
-
-
+ + + diff --git a/module/doc/view/view.html.php b/module/doc/view/view.html.php index 057f5f5307..765b168eac 100644 --- a/module/doc/view/view.html.php +++ b/module/doc/view/view.html.php @@ -31,6 +31,10 @@ ob_end_clean(); echo $actionLinks; } + else + { + common::printRPN($browseLink); + } ?> diff --git a/module/product/view/view.html.php b/module/product/view/view.html.php index 9a27a5a6d0..ff65577f7c 100644 --- a/module/product/view/view.html.php +++ b/module/product/view/view.html.php @@ -29,6 +29,10 @@ ob_end_clean(); echo $actionLinks; } + else + { + common::printRPN($browseLink); + } ?> diff --git a/module/productplan/view/view.html.php b/module/productplan/view/view.html.php index 6f3c7c2211..fbf541e552 100644 --- a/module/productplan/view/view.html.php +++ b/module/productplan/view/view.html.php @@ -13,7 +13,7 @@ - +
PLAN #id . ' ' . $plan->title;?>deleted) echo "class='deleted'";?>>PLAN #id . ' ' . $plan->title;?>
@@ -78,7 +78,7 @@ - diff --git a/module/project/view/view.html.php b/module/project/view/view.html.php index a65f1b0d16..1094da112e 100644 --- a/module/project/view/view.html.php +++ b/module/project/view/view.html.php @@ -29,6 +29,10 @@ ob_end_clean(); echo $actionLinks; } + else + { + common::printRPN($browseLink); + } ?> @@ -50,7 +54,7 @@
productplan->title;?>deleted) echo "class='deleted'";?>>title;?> + title;?>
productplan->begin;?>
- + diff --git a/module/release/view/view.html.php b/module/release/view/view.html.php index 2d3547d4db..fc44fab8cf 100644 --- a/module/release/view/view.html.php +++ b/module/release/view/view.html.php @@ -12,7 +12,7 @@ ?>
project->name;?>deleted) echo "class='deleted'";?>>name;?>name;?>
project->code;?>
- + - + diff --git a/module/story/view/view.html.php b/module/story/view/view.html.php index 530de51ea1..950ea81fc0 100644 --- a/module/story/view/view.html.php +++ b/module/story/view/view.html.php @@ -40,6 +40,10 @@ ob_clean(); echo $actionLinks; } + else + { + common::printRPN($browseLink); + } ?> diff --git a/module/task/view/view.html.php b/module/task/view/view.html.php index 81efcc6caf..db8421ac54 100644 --- a/module/task/view/view.html.php +++ b/module/task/view/view.html.php @@ -12,11 +12,11 @@ ?>
-fromBug == 0):?> -
'>TASK #id . ' ' . $task->name;?>
- -
'>TASK #id . ' ' . $task->name . '('. $lang->task->fromBug . $lang->colon . $task->fromBug . ')';?>
- + id $task->name"; + if($task->fromBug != 0) $name .= "({$lang->task->fromBug}$lang->colon$task->fromBug)"; + ?> +
'>
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); + } ?>
diff --git a/module/testcase/view/view.html.php b/module/testcase/view/view.html.php index 991fe36775..3cc32eb0cd 100644 --- a/module/testcase/view/view.html.php +++ b/module/testcase/view/view.html.php @@ -12,8 +12,8 @@ ?> -
deleted) echo "class='deleted'";?>> -
CASE #id . ' ' . $case->title;?>
+
+
deleted) echo "class='deleted'";?>>CASE #id . ' ' . $case->title;?>
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); + } ?>
diff --git a/module/testtask/view/view.html.php b/module/testtask/view/view.html.php index 649608db9d..691efea73c 100644 --- a/module/testtask/view/view.html.php +++ b/module/testtask/view/view.html.php @@ -13,10 +13,10 @@
RELEASE #id . ' ' . $release->name;?>'>RELEASE #id . ' ' . $release->name;?>
@@ -99,7 +99,7 @@
release->name;?>'>name;?>name;?>
release->build;?>
- + - @@ -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); ?>
TASK #id . ' ' . $task->name;?>deleted) echo "class='deleted'";?>>TASK #id . ' ' . $task->name;?>
testtask->name;?>'>name;?> + name;?>
testtask->project;?>