diff --git a/module/bug/config.php b/module/bug/config.php index ed27b6af24..c9596cd8ac 100644 --- a/module/bug/config.php +++ b/module/bug/config.php @@ -165,7 +165,7 @@ $config->bug->search['params']['lastEditedDate']= array('operator' => '=', $config->bug->search['params']['deadline'] = array('operator' => '=', 'control' => 'input', 'values' => '', 'class' => 'date'); $config->bug->datatable = new stdclass(); -$config->bug->datatable->defaultField = array('id', 'severity', 'pri', 'title', 'status', 'openedBy', 'openedDate', 'assignedTo', 'resolvedBy', 'resolution', 'resolvedDate', 'actions'); +$config->bug->datatable->defaultField = array('id', 'severity', 'pri', 'title', 'status', 'openedBy', 'openedDate', 'assignedTo', 'resolvedBy', 'resolution', 'actions'); $config->bug->datatable->fieldList['id']['title'] = 'idAB'; $config->bug->datatable->fieldList['id']['fixed'] = 'left'; @@ -174,7 +174,7 @@ $config->bug->datatable->fieldList['id']['required'] = 'yes'; $config->bug->datatable->fieldList['severity']['title'] = 'severityAB'; $config->bug->datatable->fieldList['severity']['fixed'] = 'left'; -$config->bug->datatable->fieldList['severity']['width'] = '50'; +$config->bug->datatable->fieldList['severity']['width'] = '40'; $config->bug->datatable->fieldList['severity']['required'] = 'no'; $config->bug->datatable->fieldList['pri']['title'] = 'P'; diff --git a/module/bug/view/browse.html.php b/module/bug/view/browse.html.php index d2443e5a5e..a761bba051 100644 --- a/module/bug/view/browse.html.php +++ b/module/bug/view/browse.html.php @@ -168,16 +168,37 @@ js::set('branch', $branch); moduleName . ucfirst($this->methodName); $useDatatable = (isset($this->config->datatable->$datatableId->mode) and $this->config->datatable->$datatableId->mode == 'datatable'); - $file2Include = $useDatatable ? dirname(__FILE__) . '/datatabledata.html.php' : dirname(__FILE__) . '/browsedata.html.php'; $vars = "productID=$productID&branch=$branch&browseType=$browseType¶m=$param&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}"; - include $file2Include; + if($useDatatable) include '../../common/view/datatable.html.php'; + + $setting = $this->datatable->getSetting('bug'); + $widths = $this->datatable->setFixedFieldWidth($setting); + $columns = 0; ?> + ' data-fixed-right-width='' data-custom-menu='true' data-checkbox-name='bugIDList[]'> + + + $value) + { + if($value->show) + { + $this->datatable->printHead($value, $orderBy, $vars); + $columns ++; + } + } + ?> + + + + + + $value) $this->bug->printCell($value, $bug, $users, $builds, $branches, $modulePairs, $projects, $plans, $stories, $tasks);?> + + + - cookie->windowWidth >= $this->config->wideSize ? 13 : 11; - if($browseType == 'needconfirm') $columns = 8; - ?>
diff --git a/module/bug/view/browsedata.html.php b/module/bug/view/browsedata.html.php deleted file mode 100644 index 46c59e165b..0000000000 --- a/module/bug/view/browsedata.html.php +++ /dev/null @@ -1,114 +0,0 @@ - - * @package bug - * @version $Id$ - * @link http://www.zentao.net - */ -?> - - - - - - - - - - - - - - - - - cookie->windowWidth >= $this->config->wideSize):?> - - - - - - - - cookie->windowWidth >= $this->config->wideSize):?> - - - - - - - - - - - id");?> - - - - - - confirmed;?> - - - - - - - - - - cookie->windowWidth >= $this->config->wideSize):?> - - - - - - - - cookie->windowWidth >= $this->config->wideSize):?> - - - - - - - - - diff --git a/module/bug/view/datatabledata.html.php b/module/bug/view/datatabledata.html.php deleted file mode 100644 index 47be55c06c..0000000000 --- a/module/bug/view/datatabledata.html.php +++ /dev/null @@ -1,29 +0,0 @@ - - * @package bug - * @version $Id$ - * @link http://www.zentao.net - */ -?> -datatable->getSetting('bug'); -$widths = $this->datatable->setFixedFieldWidth($setting); -extract($widths); -?> -
idAB);?> bug->severityAB);?> priAB);?> bug->title);?> bug->statusAB);?> bug->deadline);?>bug->story);?>actions;?>openedByAB);?>bug->openedDateAB);?>assignedToAB);?>bug->resolvedByAB);?>bug->resolutionAB);?>bug->resolvedDateAB);?>actions;?>
- - id));?> - bug->severityList, $bug->severity, $bug->severity);?>'>bug->severityList, $bug->severity, $bug->severity);?>bug->priList, $bug->pri, $bug->pri);?>'>bug->priList, $bug->pri, $bug->pri);?> - [{$lang->bug->confirmedList[$bug->confirmed]}] "; - if($bug->branch)echo "{$branches[$bug->branch]} "; - if($modulePairs and $bug->module)echo "{$modulePairs[$bug->module]} "; - echo html::a($bugLink, $bug->title, null, "style='color: $bug->color'"); - ?> - - needconfirm) - { - echo "({$lang->story->changed} "; - echo html::a($this->createLink('bug', 'confirmStoryChange', "bugID=$bug->id"), $lang->confirm, 'hiddenwin'); - echo ")"; - } - else - { - echo $lang->bug->statusList[$bug->status]; - } - ?> - deadline, 0, 4) > 0) echo substr($bug->deadline, 5, 6)?>createLink('story', 'view', "stoyID=$bug->story"), $bug->storyTitle, '_blank');?>bug->confirmStoryChange = $lang->confirm; common::printIcon('bug', 'confirmStoryChange', "bugID=$bug->id", '', 'list', '', 'hiddenwin')?>openedBy, $bug->openedBy);?>openedDate, 5, 11)?>assignedTo == $this->app->user->account) echo 'class="red"';?>>assignedTo, $bug->assignedTo);?>resolvedBy, $bug->resolvedBy)?>bug->resolutionList, $bug->resolution);?>resolvedDate, 5, 11)?> - id"; - common::printIcon('bug', 'confirmBug', $params, $bug, 'list', 'search', '', 'iframe', true); - common::printIcon('bug', 'assignTo', $params, $bug, 'list', '', '', 'iframe', true); - common::printIcon('bug', 'resolve', $params, $bug, 'list', '', '', 'iframe', true); - common::printIcon('bug', 'close', $params, $bug, 'list', '', '', 'iframe', true); - common::printIcon('bug', 'edit', $params, $bug, 'list'); - common::printIcon('bug', 'create', "product=$bug->product&branch=$bug->branch&extra=bugID=$bug->id", $bug, 'list', 'copy'); - ?> -
- - $value) $this->datatable->printHead($value, $orderBy, $vars);?> - - - - - $value) $this->bug->printCell($value, $bug, $users, $builds, $branches, $modulePairs, $projects, $plans, $stories, $tasks);?> - - - diff --git a/module/datatable/control.php b/module/datatable/control.php index 02391e4667..bfcbd6fea0 100644 --- a/module/datatable/control.php +++ b/module/datatable/control.php @@ -62,11 +62,12 @@ class datatable extends control $this->loadModel('testcase'); $this->app->loadConfig('testtask'); $this->config->testcase->datatable->defaultField = $this->config->testtask->datatable->defaultField; - $this->config->testcase->datatable->fieldList['assignedTo']['title'] = 'assignedTo'; - $this->config->testcase->datatable->fieldList['assignedTo']['fixed'] = 'no'; - $this->config->testcase->datatable->fieldList['assignedTo']['width'] = '80'; - $this->config->testcase->datatable->fieldList['assignedTo']['required'] = 'no'; - $this->config->testcase->datatable->fieldList['actions']['width'] = '100'; + $this->config->testcase->datatable->fieldList['actions']['width'] = '100'; + } + if($module == 'testcase') + { + $this->loadModel('testcase'); + unset($this->config->testcase->datatable->fieldList['assignedTo']); } $this->view->module = $module; diff --git a/module/datatable/model.php b/module/datatable/model.php index 28d2e68fbf..342778e247 100644 --- a/module/datatable/model.php +++ b/module/datatable/model.php @@ -72,6 +72,7 @@ class datatableModel extends model $set->fixed = $fieldList[$id]['fixed']; $set->title = $fieldList[$id]['title']; $set->sort = isset($fieldList[$id]['sort']) ? $fieldList[$id]['sort'] : 'yes'; + $set->name = isset($fieldList[$id]['name']) ? $fieldList[$id]['name'] : ''; $setting[$key] = $set; } } @@ -123,7 +124,12 @@ class datatableModel extends model $id = $col->id; if($col->show) { - echo "
"; + $fixed = $col->fixed == 'no' ? 'true': 'false'; + $width = is_numeric($col->width) ? "{$col->width}px" : $col->width; + $sorter = (isset($col->sort) and $col->sort == 'no') ? '' : '{sorter:false}'; + $title = isset($col->name) ? "title='$col->name'" : ''; + + echo ""; if($id == 'actions') { echo $this->lang->actions; diff --git a/module/datatable/view/ajaxcustom.html.php b/module/datatable/view/ajaxcustom.html.php index ea1c2686d3..37f34fcdcd 100644 --- a/module/datatable/view/ajaxcustom.html.php +++ b/module/datatable/view/ajaxcustom.html.php @@ -62,7 +62,8 @@
' data-key='' data-fixed='' data-width=''>   ({$lang->datatable->required})"?>
- datatable->width?> '> + + datatable->width?> '>
@@ -179,8 +180,9 @@ $(function() var setting = $('.col').map(function(index) { var $col = $(this); - var sets = {id: $col.data('key'), order: index + 1, show: !$col.hasClass('disabled'), width: $col.find('input').val(), fixed: $col.data('fixed')}; + var sets = {id: $col.data('key'), order: index + 1, show: !$col.hasClass('disabled'), width: $col.find('input#width').val(), fixed: $col.data('fixed')}; if(sets.width !== 'auto') sets.width += 'px'; + if($col.find('#name').size() > 0) sets.name = $col.find('#name').val(); return sets; }).get(); diff --git a/module/product/view/browse.html.php b/module/product/view/browse.html.php index 098c419bbf..8bb6c7f7b5 100644 --- a/module/product/view/browse.html.php +++ b/module/product/view/browse.html.php @@ -104,13 +104,39 @@ moduleName . ucfirst($this->methodName); $useDatatable = (isset($this->config->datatable->$datatableId->mode) and $this->config->datatable->$datatableId->mode == 'datatable'); - $file2Include = $useDatatable ? dirname(__FILE__) . '/datatabledata.html.php' : dirname(__FILE__) . '/browsedata.html.php'; $vars = "productID=$productID&branch=$branch&browseType=$browseType¶m=$param&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}"; - include $file2Include; + + if($useDatatable) include '../../common/view/datatable.html.php'; + if(!$useDatatable) include '../../common/view/tablesorter.html.php'; + $setting = $this->datatable->getSetting('product'); + $widths = $this->datatable->setFixedFieldWidth($setting); + $columns = 0; ?> + ' data-fixed-right-width='' data-custom-menu='true' data-checkbox-name='storyIDList[]'> + + + $value) + { + if($value->show) + { + $this->datatable->printHead($value, $orderBy, $vars); + $columns ++; + } + } + ?> + + + + + + $value) $this->story->printCell($value, $story, $users, $branches, $storyStages, $modulePairs, $storyTasks, $storyBugs, $storyCases);?> + + + -
+
diff --git a/module/product/view/browsedata.html.php b/module/product/view/browsedata.html.php deleted file mode 100644 index fe73a5445a..0000000000 --- a/module/product/view/browsedata.html.php +++ /dev/null @@ -1,103 +0,0 @@ - - * @package product - * @version $Id$ - * @link http://www.zentao.net - */ -?> - - - - - - - - - - - - - - - - - - - - - - $story):?> - createLink('story', 'view', "storyID=$story->id"); - $canView = common::hasPriv('story', 'view'); - ?> - - - - - - - - - - - - - - - - - - diff --git a/module/product/view/datatabledata.html.php b/module/product/view/datatabledata.html.php deleted file mode 100644 index 5d1aacadda..0000000000 --- a/module/product/view/datatabledata.html.php +++ /dev/null @@ -1,29 +0,0 @@ - - * @package product - * @version $Id$ - * @link http://www.zentao.net - */ -?> -datatable->getSetting('product'); -$widths = $this->datatable->setFixedFieldWidth($setting); -extract($widths); -?> -
idAB);?> priAB);?> story->title);?>story->planAB);?>openedByAB);?>assignedToAB);?>story->estimateAB);?>statusAB);?>story->stageAB);?>story->taskCountAB;?>story->bugCountAB;?>story->caseCountAB;?>actions;?>
- - id)): sprintf('%03d', $story->id);?> - story->priList, $story->pri, $story->pri);?>'>story->priList, $story->pri, $story->pri)?> - branch) echo "{$branches[$story->branch]}"?> - module) echo "{$modulePairs[$story->module]} "?> - title, null, "style='color: $story->color'");?> - planTitle;?>openedBy, $story->openedBy);?>assignedTo, $story->assignedTo);?>estimate;?>story->statusList[$story->status];?> - id]) ? " class='popoverStage' data-toggle='popover' data-placement='bottom' data-target='\$next'" : '') . "'>"; - echo $lang->story->stageList[$story->stage]; - if(isset($storyStages[$story->id])) echo ""; - echo ''; - if(isset($storyStages[$story->id])) - { - echo "
"; - foreach($storyStages[$story->id] as $storyBranch => $storyStage) echo $branches[$storyBranch] . ": " . $lang->story->stageList[$storyStage->stage] . '
'; - echo "
"; - } - ?> -
- id}"; - common::printIcon('story', 'change', $vars, $story, 'list', 'random'); - common::printIcon('story', 'review', $vars, $story, 'list', 'review'); - common::printIcon('story', 'close', $vars, $story, 'list', 'off', '', 'iframe', true); - common::printIcon('story', 'edit', $vars, $story, 'list', 'pencil'); - if($this->config->global->flow != 'onlyStory') - { - common::printIcon('story', 'createCase', "productID=$story->product&branch=$story->branch&module=0&from=¶m=0&$vars", $story, 'list', 'sitemap'); - } - ?> -
- - $value) $this->datatable->printHead($value, $orderBy, $vars);?> - - - - - $value) $this->story->printCell($value, $story, $users, $branches, $storyStages, $modulePairs, $storyTasks, $storyBugs, $storyCases);?> - - - diff --git a/module/project/view/datatabledata.html.php b/module/project/view/datatabledata.html.php deleted file mode 100644 index ad92507c5d..0000000000 --- a/module/project/view/datatabledata.html.php +++ /dev/null @@ -1,39 +0,0 @@ - - * @package project - * @version $Id$ - * @link http://www.zentao.net - */ -?> -datatable->getSetting('project'); -$widths = $this->datatable->setFixedFieldWidth($setting); -$columns = 0; -extract($widths); -?> -
- - $value) - { - if($value->show) - { - $this->datatable->printHead($value, $orderBy, $vars); - $columns++; - } - } - ?> - - - - - $value) $this->task->printCell($value, $task, $users, $browseType, $branchGroups, $modulePairs);?> - - - diff --git a/module/project/view/task.html.php b/module/project/view/task.html.php index 7dc32f6935..fead5bc024 100644 --- a/module/project/view/task.html.php +++ b/module/project/view/task.html.php @@ -45,10 +45,33 @@ js::set('browseType', $browseType); moduleName . ucfirst($this->methodName); $useDatatable = (isset($this->config->datatable->$datatableId->mode) and $this->config->datatable->$datatableId->mode == 'datatable'); - $file2Include = $useDatatable ? dirname(__FILE__) . '/datatabledata.html.php' : dirname(__FILE__) . '/taskdata.html.php'; $vars = "projectID=$project->id&status=$status&parma=$param&orderBy=%s&recTotal=$recTotal&recPerPage=$recPerPage"; - include $file2Include; + + if($useDatatable) include '../../common/view/datatable.html.php'; + $setting = $this->datatable->getSetting('project'); + $widths = $this->datatable->setFixedFieldWidth($setting); + $columns = 0; ?> +
' data-fixed-right-width='' data-custom-menu='true' data-checkbox-name='taskIDList[]'> + + $value) + { + if($value->show) + { + $this->datatable->printHead($value, $orderBy, $vars); + $columns++; + } + } + ?> + + + + + $value) $this->task->printCell($value, $task, $users, $browseType, $branchGroups, $modulePairs);?> + + + cookie->windowWidth > $this->config->wideSize ? 15 : 13) - ($project->type == 'sprint' ? 0 : 1);?> diff --git a/module/project/view/taskdata.html.php b/module/project/view/taskdata.html.php deleted file mode 100644 index 152b51c3b2..0000000000 --- a/module/project/view/taskdata.html.php +++ /dev/null @@ -1,130 +0,0 @@ - - * @package project - * @version $Id$ - * @link http://www.zentao.net - */ -?> - - -
- - - - - - - - - cookie->windowWidth > $this->config->wideSize):?> - - - - - - - - cookie->windowWidth > $this->config->wideSize):?> - - - - - - - - - - type == 'sprint'): ?> - - - - - - - - - - - assignedTo == $app->user->account ? 'style=color:red' : ''; ?> - - - - - - - - cookie->windowWidth > $this->config->wideSize):?> - - - - - - - cookie->windowWidth > $this->config->wideSize):?> - - - - - - - - type == 'sprint') - { - echo ''; - } - ?> - - - - - diff --git a/module/story/config.php b/module/story/config.php index 5da07f186a..b8ced4326f 100644 --- a/module/story/config.php +++ b/module/story/config.php @@ -47,7 +47,7 @@ $config->story->custom->batchCreateFields = 'module,plan,spec,pri,estimate,revie $config->story->custom->batchEditFields = 'branch,module,plan,estimate,pri,source,stage,closedBy,closedReason'; $config->story->datatable = new stdclass(); -$config->story->datatable->defaultField = array('id', 'pri', 'title', 'plan', 'source', 'openedBy', 'assignedTo', 'estimate', 'status', 'stage', 'taskCount', 'bugCount', 'caseCount', 'actions'); +$config->story->datatable->defaultField = array('id', 'pri', 'title', 'plan', 'openedBy', 'assignedTo', 'estimate', 'status', 'stage', 'taskCount', 'bugCount', 'caseCount', 'actions'); $config->story->datatable->fieldList['id']['title'] = 'idAB'; $config->story->datatable->fieldList['id']['fixed'] = 'left'; @@ -91,37 +91,19 @@ $config->story->datatable->fieldList['sourceNote']['required'] = 'no'; $config->story->datatable->fieldList['status']['title'] = 'statusAB'; $config->story->datatable->fieldList['status']['fixed'] = 'no'; -$config->story->datatable->fieldList['status']['width'] = '80'; +$config->story->datatable->fieldList['status']['width'] = '50'; $config->story->datatable->fieldList['status']['required'] = 'no'; $config->story->datatable->fieldList['estimate']['title'] = 'estimateAB'; $config->story->datatable->fieldList['estimate']['fixed'] = 'no'; -$config->story->datatable->fieldList['estimate']['width'] = '80'; +$config->story->datatable->fieldList['estimate']['width'] = '50'; $config->story->datatable->fieldList['estimate']['required'] = 'no'; $config->story->datatable->fieldList['stage']['title'] = 'stageAB'; $config->story->datatable->fieldList['stage']['fixed'] = 'no'; -$config->story->datatable->fieldList['stage']['width'] = '90'; +$config->story->datatable->fieldList['stage']['width'] = '70'; $config->story->datatable->fieldList['stage']['required'] = 'no'; -$config->story->datatable->fieldList['taskCount']['title'] = 'taskCount'; -$config->story->datatable->fieldList['taskCount']['fixed'] = 'no'; -$config->story->datatable->fieldList['taskCount']['width'] = '90'; -$config->story->datatable->fieldList['taskCount']['required'] = 'no'; -$config->story->datatable->fieldList['taskCount']['sort'] = 'no'; - -$config->story->datatable->fieldList['bugCount']['title'] = 'bugCount'; -$config->story->datatable->fieldList['bugCount']['fixed'] = 'no'; -$config->story->datatable->fieldList['bugCount']['width'] = '90'; -$config->story->datatable->fieldList['bugCount']['required'] = 'no'; -$config->story->datatable->fieldList['bugCount']['sort'] = 'no'; - -$config->story->datatable->fieldList['caseCount']['title'] = 'caseCount'; -$config->story->datatable->fieldList['caseCount']['fixed'] = 'no'; -$config->story->datatable->fieldList['caseCount']['width'] = '90'; -$config->story->datatable->fieldList['caseCount']['required'] = 'no'; -$config->story->datatable->fieldList['caseCount']['sort'] = 'no'; - $config->story->datatable->fieldList['openedBy']['title'] = 'openedByAB'; $config->story->datatable->fieldList['openedBy']['fixed'] = 'no'; $config->story->datatable->fieldList['openedBy']['width'] = '80'; @@ -187,6 +169,28 @@ $config->story->datatable->fieldList['version']['fixed'] = 'no'; $config->story->datatable->fieldList['version']['width'] = '60'; $config->story->datatable->fieldList['version']['required'] = 'no'; +global $lang; +$config->story->datatable->fieldList['taskCount']['title'] = 'T'; +$config->story->datatable->fieldList['taskCount']['fixed'] = 'no'; +$config->story->datatable->fieldList['taskCount']['width'] = '30'; +$config->story->datatable->fieldList['taskCount']['required'] = 'no'; +$config->story->datatable->fieldList['taskCount']['sort'] = 'no'; +$config->story->datatable->fieldList['taskCount']['name'] = $lang->story->taskCount; + +$config->story->datatable->fieldList['bugCount']['title'] = 'B'; +$config->story->datatable->fieldList['bugCount']['fixed'] = 'no'; +$config->story->datatable->fieldList['bugCount']['width'] = '30'; +$config->story->datatable->fieldList['bugCount']['required'] = 'no'; +$config->story->datatable->fieldList['bugCount']['sort'] = 'no'; +$config->story->datatable->fieldList['bugCount']['name'] = $lang->story->bugCount; + +$config->story->datatable->fieldList['caseCount']['title'] = 'C'; +$config->story->datatable->fieldList['caseCount']['fixed'] = 'no'; +$config->story->datatable->fieldList['caseCount']['width'] = '30'; +$config->story->datatable->fieldList['caseCount']['required'] = 'no'; +$config->story->datatable->fieldList['caseCount']['sort'] = 'no'; +$config->story->datatable->fieldList['caseCount']['name'] = $lang->story->caseCount; + $config->story->datatable->fieldList['actions']['title'] = 'actions'; $config->story->datatable->fieldList['actions']['fixed'] = 'right'; $config->story->datatable->fieldList['actions']['width'] = '140'; diff --git a/module/task/config.php b/module/task/config.php index eb91526364..7e9ca2a596 100644 --- a/module/task/config.php +++ b/module/task/config.php @@ -58,7 +58,7 @@ if($config->global->flow == 'onlyTask') } $config->task->datatable = new stdclass(); -$config->task->datatable->defaultField = array('id', 'pri', 'name', 'status', 'deadline', 'openedDate', 'assignedTo', 'finishedBy', 'finishedDate', 'estimate', 'consumed', 'left', 'story', 'actions'); +$config->task->datatable->defaultField = array('id', 'pri', 'name', 'status', 'deadline', 'openedDate', 'assignedTo', 'finishedBy', 'estimate', 'consumed', 'left', 'story', 'actions'); $config->task->datatable->fieldList['id']['title'] = 'idAB'; $config->task->datatable->fieldList['id']['fixed'] = 'left'; diff --git a/module/testcase/config.php b/module/testcase/config.php index d0bd0f68e2..40c08e6a09 100644 --- a/module/testcase/config.php +++ b/module/testcase/config.php @@ -91,9 +91,14 @@ $config->testcase->datatable->fieldList['title']['fixed'] = 'left'; $config->testcase->datatable->fieldList['title']['width'] = 'auto'; $config->testcase->datatable->fieldList['title']['required'] = 'yes'; +$config->testcase->datatable->fieldList['branch']['title'] = 'branch'; +$config->testcase->datatable->fieldList['branch']['fixed'] = 'left'; +$config->testcase->datatable->fieldList['branch']['width'] = '100'; +$config->testcase->datatable->fieldList['branch']['required'] = 'no'; + $config->testcase->datatable->fieldList['type']['title'] = 'type'; $config->testcase->datatable->fieldList['type']['fixed'] = 'no'; -$config->testcase->datatable->fieldList['type']['width'] = '90'; +$config->testcase->datatable->fieldList['type']['width'] = '80'; $config->testcase->datatable->fieldList['type']['required'] = 'no'; $config->testcase->datatable->fieldList['stage']['title'] = 'stage'; @@ -101,11 +106,6 @@ $config->testcase->datatable->fieldList['stage']['fixed'] = 'no'; $config->testcase->datatable->fieldList['stage']['width'] = '110'; $config->testcase->datatable->fieldList['stage']['required'] = 'no'; -$config->testcase->datatable->fieldList['status']['title'] = 'statusAB'; -$config->testcase->datatable->fieldList['status']['fixed'] = 'no'; -$config->testcase->datatable->fieldList['status']['width'] = '80'; -$config->testcase->datatable->fieldList['status']['required'] = 'no'; - $config->testcase->datatable->fieldList['precondition']['title'] = 'precondition'; $config->testcase->datatable->fieldList['precondition']['fixed'] = 'no'; $config->testcase->datatable->fieldList['precondition']['width'] = '120'; @@ -116,6 +116,11 @@ $config->testcase->datatable->fieldList['keywords']['fixed'] = 'no'; $config->testcase->datatable->fieldList['keywords']['width'] = '100'; $config->testcase->datatable->fieldList['keywords']['required'] = 'no'; +$config->testcase->datatable->fieldList['assignedTo']['title'] = 'assignedTo'; +$config->testcase->datatable->fieldList['assignedTo']['fixed'] = 'no'; +$config->testcase->datatable->fieldList['assignedTo']['width'] = '80'; +$config->testcase->datatable->fieldList['assignedTo']['required'] = 'no'; + $config->testcase->datatable->fieldList['openedBy']['title'] = 'openedByAB'; $config->testcase->datatable->fieldList['openedBy']['fixed'] = 'no'; $config->testcase->datatable->fieldList['openedBy']['width'] = '80'; @@ -143,7 +148,7 @@ $config->testcase->datatable->fieldList['lastRunner']['required'] = 'no'; $config->testcase->datatable->fieldList['lastRunDate']['title'] = 'lastRunDate'; $config->testcase->datatable->fieldList['lastRunDate']['fixed'] = 'no'; -$config->testcase->datatable->fieldList['lastRunDate']['width'] = '90'; +$config->testcase->datatable->fieldList['lastRunDate']['width'] = '120'; $config->testcase->datatable->fieldList['lastRunDate']['required'] = 'no'; $config->testcase->datatable->fieldList['lastRunResult']['title'] = 'lastRunResult'; @@ -151,6 +156,11 @@ $config->testcase->datatable->fieldList['lastRunResult']['fixed'] = 'no'; $config->testcase->datatable->fieldList['lastRunResult']['width'] = '80'; $config->testcase->datatable->fieldList['lastRunResult']['required'] = 'no'; +$config->testcase->datatable->fieldList['status']['title'] = 'statusAB'; +$config->testcase->datatable->fieldList['status']['fixed'] = 'no'; +$config->testcase->datatable->fieldList['status']['width'] = '100'; +$config->testcase->datatable->fieldList['status']['required'] = 'no'; + $config->testcase->datatable->fieldList['lastEditedBy']['title'] = 'lastEditedBy'; $config->testcase->datatable->fieldList['lastEditedBy']['fixed'] = 'no'; $config->testcase->datatable->fieldList['lastEditedBy']['width'] = '80'; @@ -171,31 +181,29 @@ $config->testcase->datatable->fieldList['story']['fixed'] = 'no'; $config->testcase->datatable->fieldList['story']['width'] = '90'; $config->testcase->datatable->fieldList['story']['required'] = 'no'; +$config->testcase->datatable->fieldList['bugs']['title'] = 'B'; +$config->testcase->datatable->fieldList['bugs']['fixed'] = 'no'; +$config->testcase->datatable->fieldList['bugs']['width'] = '30'; +$config->testcase->datatable->fieldList['bugs']['required'] = 'no'; +$config->testcase->datatable->fieldList['bugs']['sort'] = 'no'; +$config->testcase->datatable->fieldList['bugs']['name'] = $lang->testcase->bugs; + +$config->testcase->datatable->fieldList['results']['title'] = 'R'; +$config->testcase->datatable->fieldList['results']['fixed'] = 'no'; +$config->testcase->datatable->fieldList['results']['width'] = '30'; +$config->testcase->datatable->fieldList['results']['required'] = 'no'; +$config->testcase->datatable->fieldList['results']['sort'] = 'no'; +$config->testcase->datatable->fieldList['results']['name'] = $lang->testcase->results; + +$config->testcase->datatable->fieldList['stepNumber']['title'] = 'S'; +$config->testcase->datatable->fieldList['stepNumber']['fixed'] = 'no'; +$config->testcase->datatable->fieldList['stepNumber']['width'] = '30'; +$config->testcase->datatable->fieldList['stepNumber']['required'] = 'no'; +$config->testcase->datatable->fieldList['stepNumber']['sort'] = 'no'; +$config->testcase->datatable->fieldList['stepNumber']['name'] = $lang->testcase->stepNumber; + $config->testcase->datatable->fieldList['actions']['title'] = 'actions'; $config->testcase->datatable->fieldList['actions']['fixed'] = 'right'; $config->testcase->datatable->fieldList['actions']['width'] = '140'; $config->testcase->datatable->fieldList['actions']['required'] = 'yes'; $config->testcase->datatable->fieldList['actions']['sort'] = 'no'; - -$config->testcase->datatable->fieldList['branch']['title'] = 'branch'; -$config->testcase->datatable->fieldList['branch']['fixed'] = 'left'; -$config->testcase->datatable->fieldList['branch']['width'] = '100'; -$config->testcase->datatable->fieldList['branch']['required'] = 'no'; - -$config->testcase->datatable->fieldList['bugs']['title'] = 'bugs'; -$config->testcase->datatable->fieldList['bugs']['fixed'] = 'no'; -$config->testcase->datatable->fieldList['bugs']['width'] = '80'; -$config->testcase->datatable->fieldList['bugs']['required'] = 'no'; -$config->testcase->datatable->fieldList['bugs']['sort'] = 'no'; - -$config->testcase->datatable->fieldList['results']['title'] = 'results'; -$config->testcase->datatable->fieldList['results']['fixed'] = 'no'; -$config->testcase->datatable->fieldList['results']['width'] = '80'; -$config->testcase->datatable->fieldList['results']['required'] = 'no'; -$config->testcase->datatable->fieldList['results']['sort'] = 'no'; - -$config->testcase->datatable->fieldList['stepNumber']['title'] = 'stepNumber'; -$config->testcase->datatable->fieldList['stepNumber']['fixed'] = 'no'; -$config->testcase->datatable->fieldList['stepNumber']['width'] = '80'; -$config->testcase->datatable->fieldList['stepNumber']['required'] = 'no'; -$config->testcase->datatable->fieldList['stepNumber']['sort'] = 'no'; diff --git a/module/testcase/view/browse.html.php b/module/testcase/view/browse.html.php index 003eaa50a9..44fbe3fda3 100644 --- a/module/testcase/view/browse.html.php +++ b/module/testcase/view/browse.html.php @@ -43,14 +43,39 @@ js::set('branch', $branch); moduleName . ucfirst($this->methodName); $useDatatable = (isset($this->config->datatable->$datatableId->mode) and $this->config->datatable->$datatableId->mode == 'datatable'); - $file2Include = $useDatatable ? dirname(__FILE__) . '/datatabledata.html.php' : dirname(__FILE__) . '/browsedata.html.php'; $vars = "productID=$productID&branch=$branch&browseType=$browseType¶m=$param&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}"; - include $file2Include; + + if($useDatatable) include '../../common/view/datatable.html.php'; + if(!$useDatatable) include '../../common/view/tablesorter.html.php'; + $setting = $this->datatable->getSetting('testcase'); + $widths = $this->datatable->setFixedFieldWidth($setting); + $columns = 0; ?> +
idAB);?> priAB);?> task->name);?> statusAB);?> task->deadlineAB);?> task->openedDateAB);?> task->assignedToAB);?> task->finishedByAB);?> task->finishedDateAB);?> task->estimateAB);?> task->consumedAB);?> task->leftAB);?>task->progess;?>task->story); ?>actions;?>
- - id", sprintf('%03d', $task->id))) printf('%03d', $task->id);?> - task->priList, $task->pri, $task->pri)?>'>pri == '0' ? '' : zget($lang->task->priList, $task->pri, $task->pri);?> - product][$task->branch])) echo "" . $branchGroups[$task->product][$task->branch] . '';?> - module) echo "" . $modulePairs[$task->module] . '';?> - id", $task->name, null, "style='color: $task->color'")) echo $task->name; - if($task->fromBug) echo html::a($this->createLink('bug', 'view', "id=$task->fromBug"), "[BUG#$task->fromBug]", '_blank', "class='bug'"); - ?> - - storyStatus == 'active' and $task->latestStoryVersion > $task->storyVersion); - if($storyChanged) - { - echo "({$lang->story->changed} "; - echo html::a($this->createLink('task', 'confirmStoryChange', "taskID=$task->id"), $lang->confirm, 'hiddenwin'); - echo ")"; - } - else - { - echo $lang->task->statusList[$task->status]; - } - ?> - deadline, 0, 4) > 0) echo substr($task->deadline, 5, 6);?>openedDate, 5, 6);?>>assignedTo == 'closed' ? 'Closed' : zget($users, $task->assignedTo, $task->assignedTo);?>finishedBy, $task->finishedBy);?>finishedDate, 5, 6);?>estimate;?>consumed;?>left;?>progess?>%'; - if($task->storyID) - { - if(!common::printLink('story', 'view', "storyid=$task->storyID", $task->storyTitle)) print $task->storyTitle; - } - echo ' - project&taskID=$task->id", $task, 'list', '', '', 'iframe', true); - common::printIcon('task', 'start', "taskID=$task->id", $task, 'list', '', '', 'iframe', true); - - common::printIcon('task', 'recordEstimate', "taskID=$task->id", $task, 'list', 'time', '', 'iframe', true); - if($browseType == 'needconfirm') - { - $lang->task->confirmStoryChange = $lang->confirm; - common::printIcon('task', 'confirmStoryChange', "taskid=$task->id", '', 'list', '', 'hiddenwin'); - } - common::printIcon('task', 'finish', "taskID=$task->id", $task, 'list', '', '', 'iframe', true); - common::printIcon('task', 'close', "taskID=$task->id", $task, 'list', '', '', 'iframe', true); - common::printIcon('task', 'edit', "taskID=$task->id", $task, 'list'); - ?> -
' data-fixed-right-width='' data-custom-menu='true' data-checkbox-name='caseIDList[]'> + + + $value) + { + if($value->show) + { + $this->datatable->printHead($value, $orderBy, $vars); + $columns ++; + } + } + ?> + + + + + + $value) $this->testcase->printCell($value, $case, $users, $branches, $modulePairs, $browseType);?> + + + - -
+
diff --git a/module/testcase/view/browsedata.html.php b/module/testcase/view/browsedata.html.php deleted file mode 100644 index 121fbd0548..0000000000 --- a/module/testcase/view/browsedata.html.php +++ /dev/null @@ -1,99 +0,0 @@ - - * @package testcase - * @version $Id$ - * @link http://www.zentao.net - */ -?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - id&version=$case->version");?> - - - - - - - - - - - - - - - - - - - - - - diff --git a/module/testcase/view/datatabledata.html.php b/module/testcase/view/datatabledata.html.php deleted file mode 100644 index 01713084e1..0000000000 --- a/module/testcase/view/datatabledata.html.php +++ /dev/null @@ -1,29 +0,0 @@ - - * @package testcase - * @version $Id$ - * @link http://www.zentao.net - */ -?> -datatable->getSetting('testcase'); -$widths = $this->datatable->setFixedFieldWidth($setting); -extract($widths); -?> -
idAB);?> priAB);?> testcase->title);?> testcase->story);?> actions;?> typeAB);?> openedByAB);?> testtask->lastRunAccount);?> testtask->lastRunTime);?> testtask->lastRunResult);?> statusAB);?> testcase->bugsAB;?> testcase->resultsAB;?> testcase->stepNumberAB;?> {sorter:false}'>actions;?>
- - id));?> - testcase->priList, $case->pri, $case->pri)?>'>testcase->priList, $case->pri, $case->pri);?> - branch) echo "{$branches[$case->branch]} "?> - module) echo "{$modulePairs[$case->module]} "?> - title, null, "style='color: $case->color'");?> - createLink('story', 'view', "storyID=$case->story"), $case->storyTitle, '_blank');?>testcase->confirmStoryChange = $lang->confirm; common::printIcon('testcase', 'confirmStoryChange', "caseID=$case->id", '', 'list', '', 'hiddenwin');?>testcase->typeList[$case->type];?>openedBy];?>lastRunner];?>lastRunDate)) echo date(DT_MONTHTIME1, strtotime($case->lastRunDate));?>lastRunResult) echo $lang->testcase->resultList[$case->lastRunResult];?> - needconfirm) - { - echo "({$lang->story->changed} "; - echo html::a($this->createLink('testcase', 'confirmStoryChange', "caseID=$case->id"), $lang->confirm, 'hiddenwin'); - echo ")"; - } - else - { - echo $lang->testcase->statusList[$case->status]; - } - ?> - bugs) ? html::a(inlink('bugs', "runID=0&caseID={$case->id}"), $case->bugs, '', "class='iframe'") : $case->bugs;?>results) ? html::a($this->createLink('testtask', 'results', "runID=0&caseID={$case->id}"), $case->results, '', "class='iframe'") : $case->results;?>stepNumber;?> - id&version=$case->version", $case, 'list', 'play', '', 'runCase iframe', false, "data-width='95%'"); - common::printIcon('testtask', 'results', "runID=0&caseID=$case->id", $case, 'list', 'list-alt', '', 'results iframe', false, "data-width='95%'"); - if($config->testcase->needReview or !empty($config->testcase->forceReview)) common::printIcon('testcase', 'review', "caseID=$case->id", $case, 'list', 'review', '', 'iframe'); - common::printIcon('testcase', 'edit', "caseID=$case->id", $case, 'list'); - common::printIcon('testcase', 'create', "productID=$case->product&branch=$case->branch&moduleID=$case->module&from=testcase¶m=$case->id", $case, 'list', 'copy'); - - if(common::hasPriv('testcase', 'delete', $case)) - { - $deleteURL = $this->createLink('testcase', 'delete', "caseID=$case->id&confirm=yes"); - echo html::a("javascript:ajaxDelete(\"$deleteURL\",\"caseList\",confirmDelete)", '', '', "title='{$lang->testcase->delete}' class='btn-icon'"); - } - - common::printIcon('testcase', 'createBug', "product=$case->product&branch=$case->branch&extra=caseID=$case->id,version=$case->version,runID=", $case, 'list', 'bug', '', 'iframe',false,"data-width='95%'"); - ?> -
- - $value) $this->datatable->printHead($value, $orderBy, $vars);?> - - - - - $value) $this->testcase->printCell($value, $case, $users, $branches, $modulePairs, $browseType);?> - - - diff --git a/module/testtask/config.php b/module/testtask/config.php index e56adeac74..130f031c8d 100644 --- a/module/testtask/config.php +++ b/module/testtask/config.php @@ -15,4 +15,4 @@ $config->testtask->editor->block = array('id' => 'comment', 'tools' => 'simple $config->testtask->editor->activate= array('id' => 'comment', 'tools' => 'simpleTools'); $config->testtask->datatable = new stdclass(); -$config->testtask->datatable->defaultField = array('id', 'pri', 'title', 'type', 'assignedTo', 'lastRunner', 'lastRunDate', 'lastRunResult', 'status', 'bugs', 'results', 'actions'); +$config->testtask->datatable->defaultField = array('id', 'pri', 'title', 'type', 'assignedTo', 'lastRunner', 'lastRunDate', 'lastRunResult', 'status', 'bugs', 'results', 'stepNumber','actions'); diff --git a/module/testtask/view/cases.html.php b/module/testtask/view/cases.html.php index 997fee9970..05b6d970a6 100644 --- a/module/testtask/view/cases.html.php +++ b/module/testtask/view/cases.html.php @@ -37,17 +37,47 @@ var moduleID = ''; $vars = "taskID=$task->id&browseType=$browseType¶m=$param&orderBy=%s&recToal={$pager->recTotal}&recPerPage={$pager->recPerPage}"; $datatableId = $this->moduleName . ucfirst($this->methodName); $useDatatable = (isset($this->config->datatable->$datatableId->mode) and $this->config->datatable->$datatableId->mode == 'datatable'); - $file2Include = $useDatatable ? dirname(__FILE__) . '/datatabledata.html.php' : dirname(__FILE__) . '/casesdata.html.php'; $canBatchEdit = common::hasPriv('testcase', 'batchEdit'); $canBatchAssign = common::hasPriv('testtask', 'batchAssign'); $canBatchRun = common::hasPriv('testtask', 'batchRun'); $hasCheckbox = ($canBatchEdit or $canBatchAssign or $canBatchRun); - include $file2Include; + + if($useDatatable) include '../../common/view/datatable.html.php'; + if(!$useDatatable) include '../../common/view/tablesorter.html.php'; + + $this->config->testcase->datatable->defaultField = $this->config->testtask->datatable->defaultField; + $this->config->testcase->datatable->fieldList['actions']['width'] = '100'; + + $setting = $this->datatable->getSetting('testtask'); + $widths = $this->datatable->setFixedFieldWidth($setting); + $columns = 0; ?> +
' data-fixed-right-width='' data-custom-menu='true' data-checkbox-name='caseIDList[]'> + + + $value) + { + if($value->show) + { + $this->datatable->printHead($value, $orderBy, $vars); + $columns ++; + } + } + ?> + + + + + + $value) $this->testtask->printCell($value, $run, $users, $task, $branches);?> + + + -
+
diff --git a/module/testtask/view/casesdata.html.php b/module/testtask/view/casesdata.html.php deleted file mode 100644 index a172a05b70..0000000000 --- a/module/testtask/view/casesdata.html.php +++ /dev/null @@ -1,79 +0,0 @@ - - * @package testtask - * @version $Id$ - * @link http://www.zentao.net - */ -?> - - id&browseType=$browseType¶m=$param&orderBy=%s&recToal={$pager->recTotal}&recPerPage={$pager->recPerPage}"; ?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/module/testtask/view/datatabledata.html.php b/module/testtask/view/datatabledata.html.php deleted file mode 100644 index f4264a1116..0000000000 --- a/module/testtask/view/datatabledata.html.php +++ /dev/null @@ -1,36 +0,0 @@ - - * @package testtask - * @version $Id$ - * @link http://www.zentao.net - */ -?> -config->testcase->datatable->defaultField = $this->config->testtask->datatable->defaultField; -$this->config->testcase->datatable->fieldList['assignedTo']['title'] = 'assignedTo'; -$this->config->testcase->datatable->fieldList['assignedTo']['fixed'] = 'no'; -$this->config->testcase->datatable->fieldList['assignedTo']['width'] = '80'; -$this->config->testcase->datatable->fieldList['assignedTo']['required'] = 'no'; -$this->config->testcase->datatable->fieldList['actions']['width'] = '100'; - -$setting = $this->datatable->getSetting('testtask'); -$widths = $this->datatable->setFixedFieldWidth($setting); -extract($widths); -?> -
idAB);?> priAB);?> testcase->title);?> testcase->type);?> testtask->assignedTo);?> testtask->lastRunAccount);?> testtask->lastRunTime);?> testtask->lastRunResult);?> statusAB);?> testcase->bugsAB;?> testcase->resultsAB;?> testcase->stepNumberAB;?>actions;?>
- - - - case);?> - testcase->priList, $run->pri, $run->pri)?>'>testcase->priList, $run->pri, $run->pri)?> - branch) echo "{$branches[$run->branch]}"?> - createLink('testcase', 'view', "caseID=$run->case&version=$run->version&from=testtask&taskID=$run->task"), $run->title);?> - testcase->typeList[$run->type];?>assignedTo]; echo substr($assignedTo, strpos($assignedTo, ':') + 1);?>lastRunner]; echo substr($lastRunner, strpos($lastRunner, ':') + 1);?>lastRunDate)) echo date(DT_MONTHTIME1, strtotime($run->lastRunDate));?>lastRunResult) echo $lang->testcase->resultList[$run->lastRunResult];?>version < $run->caseVersion) ? "{$lang->testcase->changed}" : $lang->testtask->statusList[$run->status];?>bugs) ? html::a($this->createLink('testcase', 'bugs', "runID={$run->id}&caseID={$run->case}"), $run->bugs, '', "class='iframe'") : $run->bugs;?>results) ? html::a($this->createLink('testtask', 'results', "runID={$run->id}&caseID={$run->case}"), $run->results, '', "class='iframe'") : $run->results;?>stepNumber;?> - id", $run, 'list', '', '', 'runCase iframe', false, "data-width='95%'"); - common::printIcon('testtask', 'results', "id=$run->id", $run, 'list', '', '', 'iframe', '', "data-width='90%'"); - - if(common::hasPriv('testtask', 'unlinkCase', $run)) - { - $unlinkURL = $this->createLink('testtask', 'unlinkCase', "caseID=$run->id&confirm=yes"); - echo html::a("javascript:ajaxDelete(\"$unlinkURL\",\"caseList\",confirmUnlink)", '', '', "title='{$lang->testtask->unlinkCase}' class='btn-icon'"); - } - - common::printIcon('testcase', 'createBug', "product=$productID&branch=$task->branch&extra=projectID=$task->project,buildID=$task->build,caseID=$run->case,version=$run->version,runID=$run->id,testtask=$taskID", $run, 'list', 'bug', '', 'iframe', '', "data-width='90%'"); - ?> -
- - $value) $this->datatable->printHead($value, $orderBy, $vars);?> - - - - - $value) $this->testtask->printCell($value, $run, $users, $task, $branches);?> - - -