* adjust the icons of project views.
* add onlybody params for helper::createLink.
This commit is contained in:
@@ -61,7 +61,7 @@ class helper
|
||||
* @access public
|
||||
* @return string the link string.
|
||||
*/
|
||||
static public function createLink($moduleName, $methodName = 'index', $vars = '', $viewType = '')
|
||||
static public function createLink($moduleName, $methodName = 'index', $vars = '', $viewType = '', $onlybody = false)
|
||||
{
|
||||
global $app, $config;
|
||||
$link = $config->requestType == 'PATH_INFO' ? $config->webRoot : $_SERVER['PHP_SELF'];
|
||||
@@ -108,7 +108,7 @@ class helper
|
||||
}
|
||||
|
||||
/* if page has onlybody param then add this param in all link. the param hide header and footer. */
|
||||
if(isset($_GET['onlybody']) and $_GET['onlybody'] == 'yes')
|
||||
if($onlybody or (isset($_GET['onlybody']) and $_GET['onlybody'] == 'yes'))
|
||||
{
|
||||
$onlybody = $config->requestType == 'PATH_INFO' ? "?onlybody=yes" : "&onlybody=yes";
|
||||
$link .= $onlybody;
|
||||
|
||||
@@ -25,10 +25,10 @@
|
||||
$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');
|
||||
common::printIcon('build', 'edit', "buildID=$build->id");
|
||||
common::printIcon('build', 'delete', "buildID=$build->id", '', 'button', '', 'hiddenwin');
|
||||
}
|
||||
echo html::a($browseLink, $lang->goback);
|
||||
echo common::printRPN($browseLink);
|
||||
?>
|
||||
</div>
|
||||
<table class='table-1 fixed'>
|
||||
|
||||
@@ -203,10 +203,7 @@ class common extends control
|
||||
public static function printLink($module, $method, $vars = '', $label, $target = '', $misc = '', $newline = true, $onlyBody = false)
|
||||
{
|
||||
if(!common::hasPriv($module, $method)) return false;
|
||||
global $config;
|
||||
$concat = $config->requestType == 'GET' ? '&' : '?';
|
||||
$onlyBody = $onlyBody ? $concat . "onlybody=yes" : '';
|
||||
echo html::a(helper::createLink($module, $method, $vars) . $onlyBody, $label, $target, $misc, $newline);
|
||||
echo html::a(helper::createLink($module, $method, $vars, '', $onlyBody), $label, $target, $misc, $newline);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -254,7 +251,7 @@ class common extends control
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public static function printIcon($module, $method, $vars = '', $object = '', $type = 'button', $icon = '', $target = '', $extraClass = '')
|
||||
public static function printIcon($module, $method, $vars = '', $object = '', $type = 'button', $icon = '', $target = '', $extraClass = '', $onlyBody = false)
|
||||
{
|
||||
global $app, $lang;
|
||||
|
||||
@@ -276,7 +273,7 @@ class common extends control
|
||||
if(strtolower($module) == 'bug' and strtolower($method) == 'tostory') ($module = 'story') and ($method = 'create');
|
||||
if(strtolower($module) == 'bug' and strtolower($method) == 'createcase') ($module = 'testcase') and ($method = 'create');
|
||||
if(!common::hasPriv($module, $method)) return false;
|
||||
$link = helper::createLink($module, $method, $vars);
|
||||
$link = helper::createLink($module, $method, $vars, '', $onlyBody);
|
||||
|
||||
/* Set the icon title, try search the $method defination in $module's lang or $common's lang. */
|
||||
$title = $method;
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
caption {margin-bottom:10px}
|
||||
caption a{padding:5px}
|
||||
@@ -1,2 +1,4 @@
|
||||
#productsBox span{display:block; float:left; width:250px; overflow:hidden; word-break:keep-all; white-space:nowrap}
|
||||
#whitelistBox span{display:block; float:left; width:150px; overflow:hidden; word-break:keep-all; white-space:nowrap}
|
||||
caption {margin-bottom:10px}
|
||||
caption a{padding:5px}
|
||||
|
||||
@@ -49,7 +49,6 @@ $lang->project->totalConsumed = 'Done';
|
||||
$lang->project->totalLeft = 'Left';
|
||||
$lang->project->progess = 'Progess';
|
||||
$lang->project->viewBug = 'View bug';
|
||||
$lang->project->createTesttask= 'Create testtask';
|
||||
$lang->project->noProduct = 'No product';
|
||||
$lang->project->select = '--select project--';
|
||||
$lang->project->createStory = "Create story";
|
||||
|
||||
@@ -49,7 +49,6 @@ $lang->project->totalConsumed = '总消耗';
|
||||
$lang->project->totalLeft = '总剩余';
|
||||
$lang->project->progess = '进度';
|
||||
$lang->project->viewBug = '查看bug';
|
||||
$lang->project->createTesttask= '提交测试';
|
||||
$lang->project->noProduct = '无产品项目';
|
||||
$lang->project->select = '--请选择项目--';
|
||||
$lang->project->createStory = "新增需求";
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<table class='table-1 tablesorter fixed'>
|
||||
<caption class='caption-tl'>
|
||||
<div class='f-left'><?php echo $lang->project->build;?></div>
|
||||
<div class='f-right'><?php common::printLink('build', 'create', "project=$project->id", $lang->build->create);?></div>
|
||||
<div class='f-right'><?php common::printIcon('build', 'create', "project=$project->id");?></div>
|
||||
</caption>
|
||||
<thead>
|
||||
<tr class='colhead'>
|
||||
@@ -43,8 +43,8 @@
|
||||
<?php
|
||||
common::printLink('testtask', 'create', "product=0&project=$project->id&build=$build->id", $lang->testtask->create);
|
||||
common::printLink('project', 'bug', "project=$project->id&orderBy=status&build=$build->id", $lang->project->viewBug);
|
||||
common::printLink('build', 'edit', "buildID=$build->id", ' ', '', "class='icon-green-small-edit' title='{$lang->edit}'", false);
|
||||
common::printLink('build', 'delete', "buildID=$build->id", ' ', 'hiddenwin', "class='icon-green-small-delete' title='{$lang->delete}'", false);
|
||||
common::printIcon('build', 'edit', "buildID=$build->id");
|
||||
common::printIcon('build', 'delete', "buildID=$build->id", '', 'list', '', 'hiddenwin');
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -14,7 +14,10 @@
|
||||
<?php include '../../common/view/tablesorter.html.php';?>
|
||||
<?php include '../../common/view/colorize.html.php';?>
|
||||
<table class='table-1 fixed colored tablesorter' align='center'>
|
||||
<caption class='caption-tr'><?php common::printLink('doc', 'create', "libID=project&moduleID=0&productID=0&projectID=$project->id&from=project", $lang->doc->create);?></caption>
|
||||
<caption class='caption-tl'>
|
||||
<div class='f-left'> <?php echo $lang->project->doc;?></div>
|
||||
<div class='f-right'><?php common::printIcon('doc', 'create', "libID=project&moduleID=0&productID=0&projectID=$project->id&from=project");?></div>
|
||||
</caption>
|
||||
<thead>
|
||||
<tr class='colhead'>
|
||||
<th class='w-id'><?php echo $lang->idAB;?></th>
|
||||
@@ -40,8 +43,8 @@
|
||||
<td>
|
||||
<?php
|
||||
$vars = "doc={$doc->id}";
|
||||
if(!common::printLink('doc', 'edit', $vars, $lang->edit)) echo $lang->edit;
|
||||
if(!common::printLink('doc', 'delete', $vars, $lang->delete, 'hiddenwin')) echo $lang->delete;
|
||||
common::printIcon('doc', 'edit', $vars);
|
||||
common::printIcon('doc', 'delete', $vars, '', 'list', '','hiddenwin');
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
<th class='w-hour {sorter:false}'> <?php common::printOrderLink('status', $orderBy, $vars, $lang->statusAB);?></th>
|
||||
<th class='w-status {sorter:false}'> <?php common::printOrderLink('stage', $orderBy, $vars, $lang->story->stageAB);?></th>
|
||||
<th class='w-50px'> <?php echo $lang->story->taskCount;?></th>
|
||||
<th class='w-150px {sorter:false}'> <?php echo $lang->actions;?></th>
|
||||
<th class='w-80px {sorter:false}'> <?php echo $lang->actions;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -67,12 +67,12 @@
|
||||
$storyTasks[$story->id] > 0 ? print(html::a($tasksLink, $storyTasks[$story->id], '', 'class="iframe"')) : print(0);
|
||||
?>
|
||||
</td>
|
||||
<td class='a-right'>
|
||||
<td class='a-center'>
|
||||
<?php
|
||||
$param = "projectID={$project->id}&story={$story->id}";
|
||||
|
||||
// $lang->task->batchCreate = $lang->project->batchWBS;
|
||||
common::printLink('task', 'batchCreate', $param . "&iframe=1", $lang->project->batchWBS, '', "class='batchWBS'", true, true);
|
||||
$lang->task->batchCreate = $lang->project->batchWBS;
|
||||
common::printIcon('task', 'batchCreate', $param . "&iframe=1", '', 'list', '', '', 'batchWBS', true);
|
||||
|
||||
$lang->task->create = $lang->project->wbs;
|
||||
common::printIcon('task', 'create', $param, '', 'list');
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<table class='table-1 colored tablesorter fixed'>
|
||||
<caption class='caption-tl'>
|
||||
<div class='f-left'><?php echo $lang->testtask->browse;?></div>
|
||||
<div class='f-right'><?php common::printLink('testtask', 'create', "product=0&project=$projectID", $lang->project->createTesttask);?></div>
|
||||
<div class='f-right'><?php common::printIcon('testtask', 'create', "product=0&project=$projectID");?></div>
|
||||
</caption>
|
||||
<thead>
|
||||
<tr class='colhead'>
|
||||
@@ -26,7 +26,7 @@
|
||||
<th class='w-100px'><?php echo $lang->testtask->begin;?></th>
|
||||
<th class='w-100px'><?php echo $lang->testtask->end;?></th>
|
||||
<th class='w-80px'><?php echo $lang->statusAB;?></th>
|
||||
<th class='w-150px {sorter:false}'><?php echo $lang->actions;?></th>
|
||||
<th class='w-100px {sorter:false}'><?php echo $lang->actions;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -41,8 +41,8 @@
|
||||
<td><?php echo $lang->testtask->statusList[$task->status];?></td>
|
||||
<td>
|
||||
<?php
|
||||
common::printLink('testtask', 'cases', "taskID=$task->id", $lang->testtask->cases);
|
||||
common::printLink('testtask', 'linkcase', "taskID=$task->id", $lang->testtask->linkCaseAB);
|
||||
common::printIcon('testtask', 'cases', "taskID=$task->id", '', 'list');
|
||||
common::printIcon('testtask', 'linkCase', "taskID=$task->id", '', 'list');
|
||||
common::printIcon('testtask', 'edit', "taskID=$task->id", '', 'list');
|
||||
common::printIcon('testtask', 'delete', "taskID=$task->id", '', 'list', '', 'hiddenwin');
|
||||
?>
|
||||
|
||||
@@ -56,12 +56,14 @@
|
||||
$browseLink = $this->session->testtaskList ? $this->session->testtaskList : $this->createLink('testtask', 'browse', "productID=$task->product");
|
||||
if(!$task->deleted)
|
||||
{
|
||||
common::printLink('testtask', 'cases', "taskID=$task->id", $lang->testtask->cases);
|
||||
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');
|
||||
common::printIcon('testtask', 'cases', "taskID=$task->id");
|
||||
common::printIcon('testtask', 'linkCase', "taskID=$task->id");
|
||||
|
||||
common::printDivider();
|
||||
common::printIcon('testtask', 'edit', "taskID=$task->id");
|
||||
common::printIcon('testtask', 'delete', "taskID=$task->id", '', 'button', '', 'hiddenwin');
|
||||
}
|
||||
echo html::a($browseLink, $lang->goback);
|
||||
common::printRPN($browseLink);
|
||||
?>
|
||||
</div>
|
||||
<?php include '../../common/view/action.html.php';?>
|
||||
|
||||
@@ -448,7 +448,7 @@ table.tablesorter thead tr .headerSortDown {background-image: url(./images/table
|
||||
#featurebar .f-right .icon-green-common-report {padding:2px 10px; background:url(images/main/zt-icons.png) -40px -82px no-repeat;}
|
||||
#featurebar .f-right .icon-green-common-export, .icon-green-common-export {padding:2px 8px; background:url(images/main/zt-icons.png) -21px -82px;}
|
||||
|
||||
#featurebar .f-right .icon-green-todo-create, .icon-green-productplan-create, .icon-green-release-create, .icon-green-doc-create {padding:2px 8px; background:url(images/main/zt-icons.png) 0px -202px;}
|
||||
#featurebar .f-right .icon-green-todo-create, .icon-green-productplan-create, .icon-green-release-create, .icon-green-doc-create, .icon-green-build-create {padding:2px 8px; background:url(images/main/zt-icons.png) 0px -202px;}
|
||||
|
||||
/* Story icons. */
|
||||
.icon-green-story-toStory {padding:2px 8px; background:url(images/main/zt-icons.png) 0px -202px;}
|
||||
@@ -473,6 +473,15 @@ table.tablesorter thead tr .headerSortDown {background-image: url(./images/table
|
||||
#featurebar .f-right .icon-green-story-create {padding:2px 7px 2px 10px; background:url(images/main/zt-icons.png) 0px -202px;}
|
||||
#featurebar .f-right .icon-green-story-batchCreate {padding:2px 7px 2px 10px; background:url(images/main/zt-icons.png) -20px -202px;}
|
||||
|
||||
/* Project icons. */
|
||||
.icon-green-project-start {padding:2px 8px; background:url(images/main/zt-icons.png) -61px -242px;}
|
||||
.icon-green-project-activate {padding:2px 8px; background:url(images/main/zt-icons.png) -120px -241px;}
|
||||
|
||||
.icon-green-project-delay {}
|
||||
.icon-green-project-suspend {}
|
||||
|
||||
.icon-green-project-close {padding:2px 8px; background:url(images/main/zt-icons.png) -100px -241px;}
|
||||
|
||||
/* Task icons. */
|
||||
.icon-green-task-confirmStoryChange {padding:2px 8px; background:url(images/main/zt-icons.png) -60px -201px;}
|
||||
|
||||
@@ -494,7 +503,7 @@ table.tablesorter thead tr .headerSortDown {background-image: url(./images/table
|
||||
.icon-gray-task-close {padding:2px 8px; background:url(images/main/zt-icons.png) -100px -261px;}
|
||||
|
||||
#featurebar .f-right .icon-green-task-create, .icon-green-task-create {padding:2px 7px 2px 10px; background:url(images/main/zt-icons.png) 0px -242px;}
|
||||
#featurebar .f-right .icon-green-task-batchCreate {padding:2px 7px 2px 10px; background:url(images/main/zt-icons.png) -20px -242px;}
|
||||
#featurebar .f-right .icon-green-task-batchCreate, .icon-green-task-batchCreate {padding:2px 7px 2px 10px; background:url(images/main/zt-icons.png) -20px -242px;}
|
||||
|
||||
/* Bug icons. */
|
||||
.severity1 {width:17px; margin:0px auto; display:block; background:url(images/main/zt-icons.png) 0px -383px; text-indent:-9999px;}
|
||||
@@ -535,6 +544,11 @@ table.tablesorter thead tr .headerSortDown {background-image: url(./images/table
|
||||
.link-button a{color:black; font-weight:normal; font-size:14px;}
|
||||
.link-button a:hover {color:RGB(234, 0, 0);}
|
||||
|
||||
/* Testtask icons. */
|
||||
.icon-green-testtask-create {padding:2px 8px; background:url(images/main/zt-icons.png) 0px -202px;}
|
||||
.icon-green-testtask-cases {padding:1px 7px 1px 10px; background:url(images/main/zt-icons.png) -80px -322px;}
|
||||
.icon-green-testtask-linkCase {padding:2px 3px 2px 10px; background:url(images/main/zt-icons.png) -160px -201px;}
|
||||
|
||||
/* Effort icons. */
|
||||
.icon-green-effort-createForObject {padding:2px 8px; background:url(images/main/zt-icons.png) -80px -2px;}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user