From f8866ea2be827379bd97a5e40d3dd13f5b479fff Mon Sep 17 00:00:00 2001 From: "chencongzhi520@gmail.com" Date: Sun, 1 Jul 2012 13:43:57 +0000 Subject: [PATCH] * Adjust the icon of testtask module. --- module/testtask/view/browse.html.php | 4 ++-- module/testtask/view/cases.html.php | 12 +----------- module/testtask/view/view.html.php | 15 +++------------ 3 files changed, 6 insertions(+), 25 deletions(-) diff --git a/module/testtask/view/browse.html.php b/module/testtask/view/browse.html.php index fd98b18f99..e3cbde0b8b 100644 --- a/module/testtask/view/browse.html.php +++ b/module/testtask/view/browse.html.php @@ -45,8 +45,8 @@ id", $lang->testtask->cases); common::printLink('testtask', 'linkcase', "taskID=$task->id", $lang->testtask->linkCaseAB); - common::printLink('testtask', 'edit', "taskID=$task->id", ' ', '', "class='icon-green-small-edit' title={$lang->edit}", false); - common::printLink('testtask', 'delete', "taskID=$task->id", ' ', 'hiddenwin', "class='icon-green-small-delete' title='{$lang->delete}'", false); + common::printIcon('testtask', 'edit', "taskID=$task->id", '', 'small'); + common::printIcon('testtask', 'delete', "taskID=$task->id", '', 'small', '', 'hiddenwin'); ?> diff --git a/module/testtask/view/cases.html.php b/module/testtask/view/cases.html.php index 215fef1982..9e1912522e 100644 --- a/module/testtask/view/cases.html.php +++ b/module/testtask/view/cases.html.php @@ -77,17 +77,7 @@ var moduleID = ''; common::printLink('testtask', 'runcase', "id=$run->id", $lang->testtask->runCase, '', 'class="iframe"'); common::printLink('testtask', 'results', "id=$run->id", $lang->testtask->results, '', 'class="iframe"'); common::printLink('testtask', 'unlinkcase', "id=$run->id", $lang->testtask->unlinkCase, 'hiddenwin'); - if(common::hasPriv('bug', 'create')) - { - if($run->lastRunResult == 'fail') - { - echo html::a($this->createLink('bug', 'create', "product=$productID&extra=projectID=$task->project,buildID=$task->build,caseID=$run->case,runID=$run->id"), ' ', '', "class='icon-green-small-case-createBug' title='{$lang->testtask->createBug}'", false); - } - else - { - echo " "; - } - } + common::printIcon('testcase', 'toBug', "product=$productID&extra=projectID=$task->project,buildID=$task->build,caseID=$run->case,runID=$run->id", $run, 'small', 'createBug'); ?> diff --git a/module/testtask/view/view.html.php b/module/testtask/view/view.html.php index 819d589adc..5179e008b9 100644 --- a/module/testtask/view/view.html.php +++ b/module/testtask/view/view.html.php @@ -54,19 +54,10 @@ { common::printLink('testtask', 'cases', "taskID=$task->id", $lang->testtask->cases); common::printLink('testtask', 'linkcase', "taskID=$task->id", $lang->testtask->linkCaseAB); - if(common::hasPriv('testtask', 'cases') or common::hasPriv('testtask', 'linkcase')) - { - echo " "; - } - - common::printLink('testtask', 'edit', "taskID=$task->id", ' ', '', "class='icon-green-big-edit' title='{$lang->edit}'"); - common::printLink('testtask', 'delete', "taskID=$task->id", ' ', 'hiddenwin', "class='icon-green-big-delete' title='{$lang->delete}'", false); - if(common::hasPriv('testtask', 'edit') or common::hasPriv('testtask', 'delete')) - { - echo " "; - } + common::printIcon('testtask', 'edit', "taskID=$task->id", '', 'big'); + common::printIcon('testtask', 'delete', "taskID=$task->id", '', 'big', '', 'hiddenwin'); + echo common::printRPN($browseLink); } - echo html::a($browseLink, ' ', '', "class='icon-green-big-goback' title='{$lang->goback}'"); ?>