Merge branch 'master' of git@github.com:easysoft/zentaopms

Conflicts:

	module/project/view/task.html.php
	module/testcase/view/browse.html.php
This commit is contained in:
azhi
2013-07-31 16:50:09 +08:00
61 changed files with 1296 additions and 984 deletions
+1 -1
View File
@@ -30,7 +30,7 @@ tgz:
# create the restart file for svn.
# touch zentaopms/module/svn/restart
# delee the unused files.
find zentaopms -name .svn |xargs rm -fr
find zentaopms -name .gitkeep |xargs rm -fr
find zentaopms -name tests |xargs rm -fr
# notify.zip.
mkdir zentaopms/www/data/notify/
+71 -1
View File
@@ -12,7 +12,77 @@
<td class='divider'></td>
<td>
<form method='post' action='<?php echo inLink('batchEdit', "productID=$productID");?>'>
<?php include './buglist.custom.html.php'?>
<table class='table-1 colored tablesorter datatable' id='bugList'>
<?php $vars = "productID=$productID&browseType=$browseType&param=$param&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}"; ?>
<thead>
<tr class='colhead'>
<?php foreach($customFields as $fieldName):?>
<th><nobr><?php common::printOrderLink($fieldName, $orderBy, $vars, $lang->bug->$fieldName);?></nobr></th>
<?php endforeach;?>
<th class='w-70px {sorter:false}'><nobr><?php echo $lang->actions;?></nobr></th>
</tr>
</thead>
<tbody>
<?php foreach($bugs as $bug):?>
<?php $bugLink = inlink('view', "bugID=$bug->id");?>
<tr>
<?php $i = 0;?>
<?php foreach($customFields as $fieldName):?>
<?php $i ++;?>
<td><nobr>
<?php if($i == 1):?>
<input type='checkbox' name='bugIDList[]' value='<?php echo $bug->id;?>'/>
<?php endif;?>
<?php
if(preg_match('/^(id|title)$/i', $fieldName))
{
echo html::a($bugLink, $bug->$fieldName);
}
elseif(preg_match('/assignedTo|by/i', $fieldName))
{
echo $users[$bug->$fieldName];
}
elseif(preg_match('/^(severity|pri|resolution|os|type|browse|status|confirmed)$/i', $fieldName))
{
$key = $fieldName . 'List';
$list = $lang->bug->$key;
echo $list[$bug->$fieldName];
}
else
{
echo !($bug->$fieldName == '0') ? $bug->$fieldName : '';
}
?>
</nobr></td>
<?php endforeach;?>
<td class='a-center'><nobr>
<?php
$params = "bugID=$bug->id";
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');
?>
</nobr>
</td>
</tr>
<?php endforeach;?>
</tbody>
<tfoot>
<tr>
<td colspan='<?php echo count($customFields) + 1?>'>
<?php if(!empty($bugs)):?>
<div class='f-left'>
<?php
echo html::selectAll() . html::selectReverse();
if(common::hasPriv('bug', 'batchEdit') and $bugs) echo html::submitButton($lang->edit);
?>
</div>
<?php endif?>
<div class='f-right'><?php $pager->show();?></div>
</td>
</tr>
</tfoot>
</table>
</form>
</td>
</tr>
+110 -8
View File
@@ -11,13 +11,6 @@
*/
?>
<?php
if(isset($_GET['ajax']) and $_GET['ajax'] == 'yes')
{
if($customed) die(include './buglist.custom.html.php');
die(include './buglist.html.php');
}
?>
<?php
include '../../common/view/header.html.php';
include '../../common/view/treeview.html.php';
include '../../common/view/colorize.html.php';
@@ -80,7 +73,116 @@ js::set('customed', $customed);
</td>
<td class='divider <?php echo $treeClass;?>'></td>
<td>
<?php include './buglist.html.php'?>
<table class='table-1 fixed colored tablesorter datatable' id='bugList'>
<?php $vars = "productID=$productID&browseType=$browseType&param=$param&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}"; ?>
<thead>
<tr class='colhead'>
<th class='w-id'> <?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?></th>
<th class='w-severity'> <?php common::printOrderLink('severity', $orderBy, $vars, $lang->bug->severityAB);?></th>
<th class='w-pri'> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
<th> <?php common::printOrderLink('title', $orderBy, $vars, $lang->bug->title);?></th>
<?php if($this->cookie->windowWidth >= $this->config->wideSize):?>
<th class='w-80px'><?php common::printOrderLink('status', $orderBy, $vars, $lang->bug->statusAB);?></th>
<?php endif;?>
<?php if($browseType == 'needconfirm'):?>
<th class='w-200px'><?php common::printOrderLink('story', $orderBy, $vars, $lang->bug->story);?></th>
<th class='w-50px'><?php echo $lang->actions;?></th>
<?php else:?>
<th class='w-user'><?php common::printOrderLink('openedBy', $orderBy, $vars, $lang->openedByAB);?></th>
<?php if($this->cookie->windowWidth >= $this->config->wideSize):?>
<th class='w-date'><?php common::printOrderLink('openedDate', $orderBy, $vars, $lang->bug->openedDateAB);?></th>
<?php endif;?>
<th class='w-user'><?php common::printOrderLink('assignedTo', $orderBy, $vars, $lang->assignedToAB);?></th>
<th class='w-user'><?php common::printOrderLink('resolvedBy', $orderBy, $vars, $lang->bug->resolvedByAB);?></th>
<th class='w-resolution'><?php common::printOrderLink('resolution', $orderBy, $vars, $lang->bug->resolutionAB);?></th>
<?php if($this->cookie->windowWidth >= $this->config->wideSize):?>
<th class='w-date'><?php common::printOrderLink('resolvedDate', $orderBy, $vars, $lang->bug->resolvedDateAB);?></th>
<?php endif;?>
<th class='w-140px {sorter:false}'><?php echo $lang->actions;?></th>
<?php endif;?>
</tr>
</thead>
<tbody>
<?php $canBatchEdit = common::hasPriv('bug', 'batchEdit');?>
<?php foreach($bugs as $bug):?>
<?php $bugLink = inlink('view', "bugID=$bug->id");?>
<tr class='a-center'>
<td class='<?php echo $bug->status;?>' style="font-weight:bold">
<?php if($canBatchEdit):?>
<input type='checkbox' name='bugIDList[]' value='<?php echo $bug->id;?>'/>
<?php endif;?>
<?php echo html::a($bugLink, sprintf('%03d', $bug->id));?>
</td>
<td><span class='<?php echo 'severity' . $bug->severity;?>'><?php echo $bug->severity;?></span></td>
<td><span class='<?php echo 'pri' . $lang->bug->priList[$bug->pri];?>'><?php echo $lang->bug->priList[$bug->pri];?></span></td>
<?php $class = 'confirm' . $bug->confirmed;?>
<td class='a-left' title="<?php echo $bug->title?>"><?php echo "<span class='$class'>[{$lang->bug->confirmedList[$bug->confirmed]}] </span>" . html::a($bugLink, $bug->title);?></td>
<?php if($this->cookie->windowWidth >= $this->config->wideSize):?>
<td><?php echo $lang->bug->statusList[$bug->status];?></td>
<?php endif;?>
<?php if($browseType == 'needconfirm'):?>
<td class='a-left' title="<?php echo $bug->storyTitle?>"><?php echo html::a($this->createLink('story', 'view', "stoyID=$bug->story"), $bug->storyTitle, '_blank');?></td>
<td><?php $lang->bug->confirmStoryChange = $lang->confirm; common::printIcon('bug', 'confirmStoryChange', "bugID=$bug->id", '', 'list', '', 'hiddenwin')?></td>
<?php else:?>
<td><?php echo $users[$bug->openedBy];?></td>
<?php if($this->cookie->windowWidth >= $this->config->wideSize):?>
<td><?php echo substr($bug->openedDate, 5, 11)?></td>
<?php endif;?>
<td <?php if($bug->assignedTo == $this->app->user->account) echo 'class="red"';?>><?php echo $users[$bug->assignedTo];?></td>
<td><?php echo $users[$bug->resolvedBy];?></td>
<td><?php echo $lang->bug->resolutionList[$bug->resolution];?></td>
<?php if($this->cookie->windowWidth >= $this->config->wideSize):?>
<td><?php echo substr($bug->resolvedDate, 5, 11)?></td>
<?php endif;?>
<td class='a-right'>
<?php
$params = "bugID=$bug->id";
common::printIcon('bug', 'confirmBug', $params, $bug, 'list', '', '', 'iframe', true);
common::printIcon('bug', 'assignTo', $params, '', '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&extra=bugID=$bug->id", $bug, 'list', 'copy');
?>
</td>
<?php endif;?>
</tr>
<?php endforeach;?>
</tbody>
<tfoot>
<tr>
<?php
$columns = $this->cookie->windowWidth >= $this->config->wideSize ? 12 : 9;
if($browseType == 'needconfirm') $columns = $this->cookie->windowWidth >= $this->config->wideSize ? 7 : 6;
?>
<td colspan='<?php echo $columns;?>'>
<?php if(!empty($bugs) and $canBatchEdit):?>
<div class='f-left'>
<?php
echo html::selectAll() . html::selectReverse();
echo html::submitButton($lang->edit);
?>
</div>
<?php endif?>
<div class='f-right'><?php $pager->show();?></div>
</td>
</tr>
</tfoot>
</table>
</td>
</tr>
</table>
-71
View File
@@ -1,71 +0,0 @@
<table class='table-1 colored tablesorter datatable' id='bugList'>
<?php $vars = "productID=$productID&browseType=$browseType&param=$param&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}"; ?>
<thead>
<tr class='colhead'>
<?php foreach($customFields as $fieldName):?>
<th><nobr><?php common::printOrderLink($fieldName, $orderBy, $vars, $lang->bug->$fieldName);?></nobr></th>
<?php endforeach;?>
<th class='w-70px {sorter:false}'><nobr><?php echo $lang->actions;?></nobr></th>
</tr>
</thead>
<tbody>
<?php foreach($bugs as $bug):?>
<?php $bugLink = inlink('view', "bugID=$bug->id");?>
<tr>
<?php $i = 0;?>
<?php foreach($customFields as $fieldName):?>
<?php $i ++;?>
<td><nobr>
<?php if($i == 1):?>
<input type='checkbox' name='bugIDList[]' value='<?php echo $bug->id;?>'/>
<?php endif;?>
<?php
if(preg_match('/^(id|title)$/i', $fieldName))
{
echo html::a($bugLink, $bug->$fieldName);
}
elseif(preg_match('/assignedTo|by/i', $fieldName))
{
echo $users[$bug->$fieldName];
}
elseif(preg_match('/^(severity|pri|resolution|os|type|browse|status|confirmed)$/i', $fieldName))
{
$key = $fieldName . 'List';
$list = $lang->bug->$key;
echo $list[$bug->$fieldName];
}
else
{
echo !($bug->$fieldName == '0') ? $bug->$fieldName : '';
}
?>
</nobr></td>
<?php endforeach;?>
<td class='a-center'><nobr>
<?php
$params = "bugID=$bug->id";
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');
?>
</nobr>
</td>
</tr>
<?php endforeach;?>
</tbody>
<tfoot>
<tr>
<td colspan='<?php echo count($customFields) + 1?>'>
<?php if(!empty($bugs)):?>
<div class='f-left'>
<?php
echo html::selectAll() . html::selectReverse();
if(common::hasPriv('bug', 'batchEdit') and $bugs) echo html::submitButton($lang->edit);
?>
</div>
<?php endif?>
<div class='f-right'><?php $pager->show();?></div>
</td>
</tr>
</tfoot>
</table>
-110
View File
@@ -1,110 +0,0 @@
<table class='table-1 fixed colored tablesorter datatable' id='bugList'>
<?php $vars = "productID=$productID&browseType=$browseType&param=$param&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}"; ?>
<thead>
<tr class='colhead'>
<th class='w-id'> <?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?></th>
<th class='w-severity'> <?php common::printOrderLink('severity', $orderBy, $vars, $lang->bug->severityAB);?></th>
<th class='w-pri'> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
<th> <?php common::printOrderLink('title', $orderBy, $vars, $lang->bug->title);?></th>
<?php if($this->cookie->windowWidth >= $this->config->wideSize):?>
<th class='w-80px'><?php common::printOrderLink('status', $orderBy, $vars, $lang->bug->statusAB);?></th>
<?php endif;?>
<?php if($browseType == 'needconfirm'):?>
<th class='w-200px'><?php common::printOrderLink('story', $orderBy, $vars, $lang->bug->story);?></th>
<th class='w-50px'><?php echo $lang->actions;?></th>
<?php else:?>
<th class='w-user'><?php common::printOrderLink('openedBy', $orderBy, $vars, $lang->openedByAB);?></th>
<?php if($this->cookie->windowWidth >= $this->config->wideSize):?>
<th class='w-date'><?php common::printOrderLink('openedDate', $orderBy, $vars, $lang->bug->openedDateAB);?></th>
<?php endif;?>
<th class='w-user'><?php common::printOrderLink('assignedTo', $orderBy, $vars, $lang->assignedToAB);?></th>
<th class='w-user'><?php common::printOrderLink('resolvedBy', $orderBy, $vars, $lang->bug->resolvedByAB);?></th>
<th class='w-resolution'><?php common::printOrderLink('resolution', $orderBy, $vars, $lang->bug->resolutionAB);?></th>
<?php if($this->cookie->windowWidth >= $this->config->wideSize):?>
<th class='w-date'><?php common::printOrderLink('resolvedDate', $orderBy, $vars, $lang->bug->resolvedDateAB);?></th>
<?php endif;?>
<th class='w-140px {sorter:false}'><?php echo $lang->actions;?></th>
<?php endif;?>
</tr>
</thead>
<tbody>
<?php $canBatchEdit = common::hasPriv('bug', 'batchEdit');?>
<?php foreach($bugs as $bug):?>
<?php $bugLink = inlink('view', "bugID=$bug->id");?>
<tr class='a-center'>
<td class='<?php echo $bug->status;?>' style="font-weight:bold">
<?php if($canBatchEdit):?>
<input type='checkbox' name='bugIDList[]' value='<?php echo $bug->id;?>'/>
<?php endif;?>
<?php echo html::a($bugLink, sprintf('%03d', $bug->id));?>
</td>
<td><span class='<?php echo 'severity' . $bug->severity;?>'><?php echo $bug->severity;?></span></td>
<td><span class='<?php echo 'pri' . $lang->bug->priList[$bug->pri];?>'><?php echo $lang->bug->priList[$bug->pri];?></span></td>
<?php $class = 'confirm' . $bug->confirmed;?>
<td class='a-left' title="<?php echo $bug->title?>"><?php echo "<span class='$class'>[{$lang->bug->confirmedList[$bug->confirmed]}] </span>" . html::a($bugLink, $bug->title);?></td>
<?php if($this->cookie->windowWidth >= $this->config->wideSize):?>
<td><?php echo $lang->bug->statusList[$bug->status];?></td>
<?php endif;?>
<?php if($browseType == 'needconfirm'):?>
<td class='a-left' title="<?php echo $bug->storyTitle?>"><?php echo html::a($this->createLink('story', 'view', "stoyID=$bug->story"), $bug->storyTitle, '_blank');?></td>
<td><?php $lang->bug->confirmStoryChange = $lang->confirm; common::printIcon('bug', 'confirmStoryChange', "bugID=$bug->id", '', 'list', '', 'hiddenwin')?></td>
<?php else:?>
<td><?php echo $users[$bug->openedBy];?></td>
<?php if($this->cookie->windowWidth >= $this->config->wideSize):?>
<td><?php echo substr($bug->openedDate, 5, 11)?></td>
<?php endif;?>
<td <?php if($bug->assignedTo == $this->app->user->account) echo 'class="red"';?>><?php echo $users[$bug->assignedTo];?></td>
<td><?php echo $users[$bug->resolvedBy];?></td>
<td><?php echo $lang->bug->resolutionList[$bug->resolution];?></td>
<?php if($this->cookie->windowWidth >= $this->config->wideSize):?>
<td><?php echo substr($bug->resolvedDate, 5, 11)?></td>
<?php endif;?>
<td class='a-right'>
<?php
$params = "bugID=$bug->id";
common::printIcon('bug', 'confirmBug', $params, $bug, 'list', '', '', 'iframe', true);
common::printIcon('bug', 'assignTo', $params, '', '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&extra=bugID=$bug->id", $bug, 'list', 'copy');
?>
</td>
<?php endif;?>
</tr>
<?php endforeach;?>
</tbody>
<tfoot>
<tr>
<?php
$columns = $this->cookie->windowWidth >= $this->config->wideSize ? 12 : 9;
if($browseType == 'needconfirm') $columns = $this->cookie->windowWidth >= $this->config->wideSize ? 7 : 6;
?>
<td colspan='<?php echo $columns;?>'>
<?php if(!empty($bugs) and $canBatchEdit):?>
<div class='f-left'>
<?php
echo html::selectAll() . html::selectReverse();
echo html::submitButton($lang->edit);
?>
</div>
<?php endif?>
<div class='f-right'><?php $pager->show();?></div>
</td>
</tr>
</tfoot>
</table>
+9 -1
View File
@@ -153,9 +153,17 @@ class build extends control
}
else
{
$response['result'] = 'success';
$response['message'] = '';
$build = $this->build->getById($buildID);
$this->build->delete(TABLE_BUILD, $buildID);
die(js::locate($this->createLink('project', 'build', "projectID=$build->project"), 'parent'));
if(dao::isError())
{
$response['result'] = 'fail';
$response['message'] = dao::getError();
}
$this->send($response);
}
}
+6 -2
View File
@@ -4,8 +4,12 @@ js::import($jsRoot . 'jquery/tablesorter/min.js');
js::import($jsRoot . 'jquery/tablesorter/metadata.js');
?>
<script language='javascript'>
$(function() {
/* sort table after page load. */
$(function() { sortTable(); } );
function sortTable()
{
$('.tablesorter').tablesorter(
{
widgets: ['zebra'],
@@ -32,5 +36,5 @@ $(function() {
}
}
);
});
}
</script>
+9 -1
View File
@@ -417,8 +417,16 @@ class doc extends control
}
else
{
$response['result'] = 'success';
$response['message'] = '';
$this->doc->delete(TABLE_DOC, $docID);
die(js::locate($this->session->docList, 'parent'));
if(dao::isError())
{
$response['result'] = 'fail';
$response['message'] = dao::getError();
}
$this->send($response);
}
}
}
+32
View File
@@ -27,3 +27,35 @@ $(function(){
browseBySearch();
}
});
/**
* Delete doc.
*
* @param int $docID
* @access public
* @return void
*/
function deleteDoc(docID)
{
if(confirm(confirmDelete))
{
url = createLink('doc', 'delete','docID=' + docID + '&confrim=yes');
$.ajax(
{
type: 'GET',
url: url,
dataType: 'json',
success: function(data)
{
if(data.result == 'success')
{
$('#docbox').load(request + ' #doclist', function()
{
$('.colored').colorize();
$('tfoot td').css('background', 'white').unbind('click').unbind('hover');
});
}
}
});
}
}
+5 -3
View File
@@ -14,6 +14,8 @@
<?php include '../../common/view/datepicker.html.php';?>
<?php include '../../common/view/treeview.html.php';?>
<?php include '../../common/view/colorize.html.php';?>
<?php js::set('confirmDelete', $lang->doc->confirmDelete)?>
<?php js::set('request', $this->app->getURI(true))?>
<script language='Javascript'>
var browseType = '<?php echo $browseType;?>';
</script>
@@ -41,8 +43,8 @@ var browseType = '<?php echo $browseType;?>';
</div>
</td>
<td class='divider'></td>
<td>
<table class='table-1 fixed colored tablesorter datatable'>
<td id='docbox'>
<table class='table-1 fixed colored tablesorter datatable' id='doclist'>
<thead>
<tr class='colhead'>
<?php $vars = "libID=$libID&module=$moduleID&productID=$productID&projectID=$projectID&browseType=$browseType&param=$param&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}";?>
@@ -70,7 +72,7 @@ var browseType = '<?php echo $browseType;?>';
<?php
$vars = "doc={$doc->id}";
common::printIcon('doc', 'edit', $vars, '', 'list');
common::printIcon('doc', 'delete', $vars, '', 'list', '', 'hiddenwin');
echo html::a("javascript:deleteDoc($doc->id)", '&nbsp;', '', "class='icon-green-common-delete' title='{$lang->doc->delete}'");
?>
</td>
</tr>
+33
View File
@@ -20,4 +20,37 @@ function changeAction(formName, actionName, actionLink)
$('#' + formName).attr('action', actionLink).submit();
}
/**
* Delete todo.
*
* @param int todoID
* @access public
* @return void
*/
function deleteTodo(todoID)
{
if(confirm(confirmDelete))
{
url = createLink('todo', 'delete','todoID=' + todoID + '&confrim=yes');
$.ajax(
{
type: 'GET',
url: url,
dataType: 'json',
success: function(data)
{
if(data.result == 'success')
{
url = createLink('my', 'todo');
$('#todo').load(url + ' #todoList', function()
{
$('.colored').colorize();
$('tfoot td').css('background', 'white').unbind('click').unbind('hover');
});
}
}
});
}
}
$(".colorbox").colorbox({width:960, height:550, iframe:true, transition:'none'});
+54 -2
View File
@@ -10,7 +10,6 @@
* @link http://www.zentao.net
*/
?>
<?php if(isset($_GET['ajax']) and $_GET['ajax'] == 'yes') die(include "./buglist.html.php")?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/colorize.html.php';?>
<div id='featurebar'>
@@ -24,7 +23,60 @@
</div>
</div>
<form method='post' action='<?php echo $this->createLink('bug', 'batchEdit', "productID=0");?>'>
<?php include "./buglist.html.php"?>
<table class='table-1 fixed tablesorter colored' id='bugList'>
<?php $vars = "type=$type&orderBy=%s&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID"; ?>
<thead>
<tr class='colhead'>
<th class='w-id'> <?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?></th>
<th class='w-severity'> <?php common::printOrderLink('severity', $orderBy, $vars, $lang->bug->severityAB);?></th>
<th class='w-pri'> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
<th class='w-type'> <?php common::printOrderLink('type', $orderBy, $vars, $lang->typeAB);?></th>
<th> <?php common::printOrderLink('title', $orderBy, $vars, $lang->bug->title);?></th>
<th class='w-user'> <?php common::printOrderLink('openedBy', $orderBy, $vars, $lang->openedByAB);?></th>
<th class='w-user'> <?php common::printOrderLink('resolvedBy', $orderBy, $vars, $lang->bug->resolvedByAB);?></th>
<th class='w-resolution'><?php common::printOrderLink('resolution', $orderBy, $vars, $lang->bug->resolutionAB);?></th>
<th class='w-140px'><?php echo $lang->actions;?></th>
</tr>
</thead>
<tbody>
<?php $canBatchEdit = common::hasPriv('bug', 'batchEdit');?>
<?php foreach($bugs as $bug):?>
<tr class='a-center'>
<td class='a-left'>
<?php if($canBatchEdit):?><input type='checkbox' name='bugIDList[]' value='<?php echo $bug->id;?>' /><?php endif;?>
<?php echo html::a($this->createLink('bug', 'view', "bugID=$bug->id"), sprintf('%03d', $bug->id), '_blank');?>
</td>
<td><span class='<?php echo 'severity' . $lang->bug->severityList[$bug->severity]?>'><?php echo isset($lang->bug->severityList[$bug->severity]) ? $lang->bug->severityList[$bug->severity] : $bug->severity;?></span></td>
<td><span class='<?php echo 'pri' . $lang->bug->priList[$bug->pri]?>'><?php echo isset($lang->bug->priList[$bug->pri]) ? $lang->bug->priList[$bug->pri] : $bug->pri?></span></td>
<td><?php echo $lang->bug->typeList[$bug->type]?></td>
<td class='a-left nobr'><?php echo html::a($this->createLink('bug', 'view', "bugID=$bug->id"), $bug->title);?></td>
<td><?php echo $users[$bug->openedBy];?></td>
<td><?php echo $users[$bug->resolvedBy];?></td>
<td><?php echo $lang->bug->resolutionList[$bug->resolution];?></td>
<td class='a-right'>
<?php
$params = "bugID=$bug->id";
common::printIcon('bug', 'confirmBug', $params, $bug, 'list', '', '', 'iframe', true);
common::printIcon('bug', 'assignTo', $params, '', '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, '', 'list');
?>
</td>
</tr>
<?php endforeach;?>
</tbody>
<tfoot>
<tr><td colspan='9'>
<?php if($bugs and $canBatchEdit):?>
<div class='f-left'>
<?php echo html::selectAll() . html::selectReverse() . html::submitButton($lang->edit);?>
</div>
<?php endif;?>
<?php $pager->show();?>
</td></tr>
</tfoot>
</table>
</form>
<?php js::set('listName', 'bugList')?>
<script language='javascript'>$("#<?php echo $type;?>Tab").addClass('active');</script>
-54
View File
@@ -1,54 +0,0 @@
<table class='table-1 fixed tablesorter colored' id='bugList'>
<?php $vars = "type=$type&orderBy=%s&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID"; ?>
<thead>
<tr class='colhead'>
<th class='w-id'> <?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?></th>
<th class='w-severity'> <?php common::printOrderLink('severity', $orderBy, $vars, $lang->bug->severityAB);?></th>
<th class='w-pri'> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
<th class='w-type'> <?php common::printOrderLink('type', $orderBy, $vars, $lang->typeAB);?></th>
<th> <?php common::printOrderLink('title', $orderBy, $vars, $lang->bug->title);?></th>
<th class='w-user'> <?php common::printOrderLink('openedBy', $orderBy, $vars, $lang->openedByAB);?></th>
<th class='w-user'> <?php common::printOrderLink('resolvedBy', $orderBy, $vars, $lang->bug->resolvedByAB);?></th>
<th class='w-resolution'><?php common::printOrderLink('resolution', $orderBy, $vars, $lang->bug->resolutionAB);?></th>
<th class='w-140px'><?php echo $lang->actions;?></th>
</tr>
</thead>
<tbody>
<?php $canBatchEdit = common::hasPriv('bug', 'batchEdit');?>
<?php foreach($bugs as $bug):?>
<tr class='a-center'>
<td class='a-left'>
<?php if($canBatchEdit):?><input type='checkbox' name='bugIDList[]' value='<?php echo $bug->id;?>' /><?php endif;?>
<?php echo html::a($this->createLink('bug', 'view', "bugID=$bug->id"), sprintf('%03d', $bug->id), '_blank');?>
</td>
<td><span class='<?php echo 'severity' . $lang->bug->severityList[$bug->severity]?>'><?php echo isset($lang->bug->severityList[$bug->severity]) ? $lang->bug->severityList[$bug->severity] : $bug->severity;?></span></td>
<td><span class='<?php echo 'pri' . $lang->bug->priList[$bug->pri]?>'><?php echo isset($lang->bug->priList[$bug->pri]) ? $lang->bug->priList[$bug->pri] : $bug->pri?></span></td>
<td><?php echo $lang->bug->typeList[$bug->type]?></td>
<td class='a-left nobr'><?php echo html::a($this->createLink('bug', 'view', "bugID=$bug->id"), $bug->title);?></td>
<td><?php echo $users[$bug->openedBy];?></td>
<td><?php echo $users[$bug->resolvedBy];?></td>
<td><?php echo $lang->bug->resolutionList[$bug->resolution];?></td>
<td class='a-right'>
<?php
$params = "bugID=$bug->id";
common::printIcon('bug', 'confirmBug', $params, $bug, 'list', '', '', 'iframe', true);
common::printIcon('bug', 'assignTo', $params, '', '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, '', 'list');
?>
</td>
</tr>
<?php endforeach;?>
</tbody>
<tfoot>
<tr><td colspan='9'>
<?php if($bugs and $canBatchEdit):?>
<div class='f-left'>
<?php echo html::selectAll() . html::selectReverse() . html::submitButton($lang->edit);?>
</div>
<?php endif;?>
<?php $pager->show();?>
</td></tr>
</tfoot>
</table>
-76
View File
@@ -1,76 +0,0 @@
<table class='table-1 fixed tablesorter colored' id='caseList'>
<?php
$vars = "type=$type&orderBy=%s&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID";
$this->app->loadLang('testtask');
?>
<thead>
<tr class='colhead'>
<th class='w-id'> <?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?></th>
<th class='w-pri'> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
<th> <?php common::printOrderLink('title', $orderBy, $vars, $lang->testcase->title);?></th>
<th class='w-type'> <?php common::printOrderLink('type', $orderBy, $vars, $lang->typeAB);?></th>
<th class='w-user'> <?php common::printOrderLink('openedBy', $orderBy, $vars, $lang->openedByAB);?></th>
<th class='w-80px'> <?php common::printOrderLink('lastRunner', $orderBy, $vars, $lang->testtask->lastRunAccount);?></th>
<th class='w-120px'> <?php common::printOrderLink('lastRunDate', $orderBy, $vars, $lang->testtask->lastRunTime);?></th>
<th class='w-80px'> <?php common::printOrderLink('lastRunResult', $orderBy, $vars, $lang->testtask->lastRunResult);?></th>
<th class='w-status'><?php common::printOrderLink('status', $orderBy, $vars, $lang->statusAB);?></th>
<th class='w-140px'><?php echo $lang->actions;?></th>
</tr>
</thead>
<tbody>
<?php
$canBatchEdit = common::hasPriv('testcase', 'batchEdit');
$canBatchRun = common::hasPriv('testtask', 'batchRun');
?>
<?php foreach($cases as $case):?>
<tr class='a-center'>
<td>
<?php if($canBatchEdit or $canBatchRun):?><input type='checkbox' name='caseIDList[]' value='<?php echo $case->id;?>'/><?php endif;?>
<?php echo html::a($this->createLink('testcase', 'view', "testcaseID=$case->id"), sprintf('%03d', $case->id));?>
</td>
<td><span class='<?php echo 'pri' . $case->pri?>'><?php echo $case->pri?></span</td>
<td class='a-left'><?php echo html::a($this->createLink('testcase', 'view', "testcaseID=$case->id"), $case->title);?></td>
<td><?php echo $lang->testcase->typeList[$case->type];?></td>
<td><?php echo $users[$case->openedBy];?></td>
<td><?php echo $users[$case->lastRunner];?></td>
<td><?php if(!helper::isZeroDate($case->lastRunDate)) echo date(DT_MONTHTIME1, strtotime($case->lastRunDate));?></td>
<td class='<?php echo $case->lastRunResult;?>'><?php if($case->lastRunResult) echo $lang->testcase->resultList[$case->lastRunResult];?></td>
<td class='<?php echo $run->status;?>'><?php echo $lang->testcase->statusList[$case->status];?></td>
<td>
<?php
common::printIcon('testtask', 'runCase', "runID=0&caseID=$case->id&version=$case->version", '', 'list', '', '', 'iframe');
common::printIcon('testtask', 'results', "runID=0&caseID=$case->id", '', 'list', '', '', 'iframe');
common::printIcon('testcase', 'edit', "caseID=$case->id", $case, 'list');
common::printIcon('testcase', 'create', "productID=$case->product&moduleID=$case->module&from=testcase&param=$case->id", $case, 'list', 'copy');
common::printIcon('testcase', 'delete', "caseID=$case->id", '', 'list', '', 'hiddenwin');
common::printIcon('testcase', 'createBug', "product=$case->product&extra=caseID=$case->id,version=$case->version,runID=", $case, 'list', 'createBug');
?>
</td>
</tr>
<?php endforeach;?>
</tbody>
<tfoot>
<tr>
<td colspan='10'>
<?php if($cases):?>
<div class='f-left'>
<?php
if($canBatchEdit or $canBatchRun) echo html::selectAll() . html::selectReverse();
if($canBatchEdit)
{
$actionLink = $this->createLink('testcase', 'batchEdit');
echo html::submitButton($lang->edit, "onclick=changeAction('myCaseForm','batchEdit','$actionLink')");
}
if($canBatchRun)
{
$actionLink = $this->createLink('testtask', 'batchRun', "productID=0&orderBy=$orderBy&from=testcase");
echo html::submitButton($lang->testtask->runCase, "onclick=changeAction('myCaseForm','batchEdit','$actionLink')");
}
?>
</div>
<?php endif?>
<?php $pager->show();?>
</td>
</tr>
</tfoot>
</table>
+73 -2
View File
@@ -10,7 +10,6 @@
* @link http://www.zentao.net
*/
?>
<?php if(isset($_GET['ajax']) and $_GET['ajax'] == 'yes') die(include "./tasklist.html.php");?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/colorize.html.php';?>
<script language="Javascript">var type='<?php echo $type;?>';</script>
@@ -26,7 +25,79 @@
</div>
</div>
<form method='post' id='myTaskForm'>
<?php include "./tasklist.html.php";?>
<table class='table-1 tablesorter fixed colored' id='tasktable'>
<?php $vars = "type=$type&orderBy=%s&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID"; ?>
<thead>
<tr class='colhead'>
<th class='w-id'> <?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?></th>
<th class='w-pri'> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
<th class='w-150px'> <?php common::printOrderLink('project', $orderBy, $vars, $lang->task->project);?></th>
<th> <?php common::printOrderLink('name', $orderBy, $vars, $lang->task->name);?></th>
<th class='w-hour'> <?php common::printOrderLink('estimate', $orderBy, $vars, $lang->task->estimateAB);?></th>
<th class='w-hour'> <?php common::printOrderLink('consumed', $orderBy, $vars, $lang->task->consumedAB);?></th>
<th class='w-hour'> <?php common::printOrderLink('left', $orderBy, $vars, $lang->task->leftAB);?></th>
<th class='w-date'> <?php common::printOrderLink('deadline', $orderBy, $vars, $lang->task->deadlineAB);?></th>
<th class='w-status'><?php common::printOrderLink('status', $orderBy, $vars, $lang->statusAB);?></th>
<th class='w-user'> <?php common::printOrderLink('openedBy', $orderBy, $vars, $lang->openedByAB);?></th>
<th class='w-140px'> <?php echo $lang->actions;?></th>
</tr>
</thead>
<tbody>
<?php $canBatchEdit = common::hasPriv('task', 'batchEdit');?>
<?php $canBatchClose = (common::hasPriv('task', 'batchClose') and $type != 'closedBy');?>
<?php foreach($tasks as $task):?>
<tr class='a-center'>
<td class='a-left'>
<?php if($canBatchEdit or $canBatchClose):?><input type='checkbox' name='taskIDList[]' value='<?php echo $task->id;?>' /><?php endif;?>
<?php echo html::a($this->createLink('task', 'view', "taskID=$task->id"), sprintf('%03d', $task->id));?>
</td>
<td><span class='<?php echo 'pri' . $lang->task->priList[$task->pri];?>'><?php echo isset($lang->task->priList[$task->pri]) ? $lang->task->priList[$task->pri] : $task->pri;?></span></td>
<td class='nobr a-left'><?php echo html::a($this->createLink('project', 'browse', "projectid=$task->projectID"), $task->projectName);?></th>
<td class='a-left nobr'><?php echo html::a($this->createLink('task', 'view', "taskID=$task->id"), $task->name);?></td>
<td><?php echo $task->estimate;?></td>
<td><?php echo $task->consumed;?></td>
<td><?php echo $task->left;?></td>
<td class=<?php if(isset($task->delay)) echo 'delayed';?>><?php if(substr($task->deadline, 0, 4) > 0) echo $task->deadline;?></td>
<td class='<?php echo $task->status;?>'><?php echo $lang->task->statusList[$task->status];?></td>
<td><?php echo $users[$task->openedBy];?></td>
<td class='a-right'>
<?php
common::printIcon('task', 'assignTo', "projectID=$task->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', '', '', 'iframe', true);
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", '', 'list');
?>
</td>
</tr>
<?php endforeach;?>
</tbody>
<tfoot>
<tr>
<td colspan='11'>
<?php if(count($tasks)):?>
<div class='f-left'>
<?php
if($canBatchEdit or $canBatchClose) echo html::selectAll() . html::selectReverse();
if($canBatchEdit)
{
$actionLink = $this->createLink('task', 'batchEdit', "projectID=0&orderBy=$orderBy");
echo html::commonButton($lang->edit, "onclick=\"changeAction('myTaskForm', 'batchEdit', '$actionLink')\"");
}
if($canBatchClose)
{
$actionLink = $this->createLink('task', 'batchClose');
echo html::commonButton($lang->close, "onclick=\"changeAction('myTaskForm', 'batchClose', '$actionLink')\"");
}
?>
</div>
<?php endif;?>
<?php $pager->show();?>
</td>
</tr>
</tfoot>
</table>
</form>
<?php js::set('listName', 'tasktable')?>
<?php include '../../common/view/footer.html.php';?>
-73
View File
@@ -1,73 +0,0 @@
<table class='table-1 tablesorter fixed colored' id='tasktable'>
<?php $vars = "type=$type&orderBy=%s&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID"; ?>
<thead>
<tr class='colhead'>
<th class='w-id'> <?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?></th>
<th class='w-pri'> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
<th class='w-150px'> <?php common::printOrderLink('project', $orderBy, $vars, $lang->task->project);?></th>
<th> <?php common::printOrderLink('name', $orderBy, $vars, $lang->task->name);?></th>
<th class='w-hour'> <?php common::printOrderLink('estimate', $orderBy, $vars, $lang->task->estimateAB);?></th>
<th class='w-hour'> <?php common::printOrderLink('consumed', $orderBy, $vars, $lang->task->consumedAB);?></th>
<th class='w-hour'> <?php common::printOrderLink('left', $orderBy, $vars, $lang->task->leftAB);?></th>
<th class='w-date'> <?php common::printOrderLink('deadline', $orderBy, $vars, $lang->task->deadlineAB);?></th>
<th class='w-status'><?php common::printOrderLink('status', $orderBy, $vars, $lang->statusAB);?></th>
<th class='w-user'> <?php common::printOrderLink('openedBy', $orderBy, $vars, $lang->openedByAB);?></th>
<th class='w-140px'> <?php echo $lang->actions;?></th>
</tr>
</thead>
<tbody>
<?php $canBatchEdit = common::hasPriv('task', 'batchEdit');?>
<?php $canBatchClose = (common::hasPriv('task', 'batchClose') and $type != 'closedBy');?>
<?php foreach($tasks as $task):?>
<tr class='a-center'>
<td class='a-left'>
<?php if($canBatchEdit or $canBatchClose):?><input type='checkbox' name='taskIDList[]' value='<?php echo $task->id;?>' /><?php endif;?>
<?php echo html::a($this->createLink('task', 'view', "taskID=$task->id"), sprintf('%03d', $task->id));?>
</td>
<td><span class='<?php echo 'pri' . $lang->task->priList[$task->pri];?>'><?php echo isset($lang->task->priList[$task->pri]) ? $lang->task->priList[$task->pri] : $task->pri;?></span></td>
<td class='nobr a-left'><?php echo html::a($this->createLink('project', 'browse', "projectid=$task->projectID"), $task->projectName);?></th>
<td class='a-left nobr'><?php echo html::a($this->createLink('task', 'view', "taskID=$task->id"), $task->name);?></td>
<td><?php echo $task->estimate;?></td>
<td><?php echo $task->consumed;?></td>
<td><?php echo $task->left;?></td>
<td class=<?php if(isset($task->delay)) echo 'delayed';?>><?php if(substr($task->deadline, 0, 4) > 0) echo $task->deadline;?></td>
<td class='<?php echo $task->status;?>'><?php echo $lang->task->statusList[$task->status];?></td>
<td><?php echo $users[$task->openedBy];?></td>
<td class='a-right'>
<?php
common::printIcon('task', 'assignTo', "projectID=$task->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', '', '', 'iframe', true);
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", '', 'list');
?>
</td>
</tr>
<?php endforeach;?>
</tbody>
<tfoot>
<tr>
<td colspan='11'>
<?php if(count($tasks)):?>
<div class='f-left'>
<?php
if($canBatchEdit or $canBatchClose) echo html::selectAll() . html::selectReverse();
if($canBatchEdit)
{
$actionLink = $this->createLink('task', 'batchEdit', "projectID=0&orderBy=$orderBy");
echo html::commonButton($lang->edit, "onclick=\"changeAction('myTaskForm', 'batchEdit', '$actionLink')\"");
}
if($canBatchClose)
{
$actionLink = $this->createLink('task', 'batchClose');
echo html::commonButton($lang->close, "onclick=\"changeAction('myTaskForm', 'batchClose', '$actionLink')\"");
}
?>
</div>
<?php endif;?>
<?php $pager->show();?>
</td>
</tr>
</tfoot>
</table>
+76 -2
View File
@@ -10,7 +10,6 @@
* @link http://www.zentao.net
*/
?>
<?php if(isset($_GET['ajax']) and $_GET['ajax'] == 'yes') die(include "./caselist.html.php");?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/colorize.html.php';?>
<div id='featurebar'>
@@ -25,7 +24,82 @@
</div>
<form method='post' id='myCaseForm'>
<?php include './caselist.html.php';?>
<table class='table-1 fixed tablesorter colored' id='caseList'>
<?php
$vars = "type=$type&orderBy=%s&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID";
$this->app->loadLang('testtask');
?>
<thead>
<tr class='colhead'>
<th class='w-id'> <?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?></th>
<th class='w-pri'> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
<th> <?php common::printOrderLink('title', $orderBy, $vars, $lang->testcase->title);?></th>
<th class='w-type'> <?php common::printOrderLink('type', $orderBy, $vars, $lang->typeAB);?></th>
<th class='w-user'> <?php common::printOrderLink('openedBy', $orderBy, $vars, $lang->openedByAB);?></th>
<th class='w-80px'> <?php common::printOrderLink('lastRunner', $orderBy, $vars, $lang->testtask->lastRunAccount);?></th>
<th class='w-120px'> <?php common::printOrderLink('lastRunDate', $orderBy, $vars, $lang->testtask->lastRunTime);?></th>
<th class='w-80px'> <?php common::printOrderLink('lastRunResult', $orderBy, $vars, $lang->testtask->lastRunResult);?></th>
<th class='w-status'><?php common::printOrderLink('status', $orderBy, $vars, $lang->statusAB);?></th>
<th class='w-140px'><?php echo $lang->actions;?></th>
</tr>
</thead>
<tbody>
<?php
$canBatchEdit = common::hasPriv('testcase', 'batchEdit');
$canBatchRun = common::hasPriv('testtask', 'batchRun');
?>
<?php foreach($cases as $case):?>
<tr class='a-center'>
<td>
<?php if($canBatchEdit or $canBatchRun):?><input type='checkbox' name='caseIDList[]' value='<?php echo $case->id;?>'/><?php endif;?>
<?php echo html::a($this->createLink('testcase', 'view', "testcaseID=$case->id"), sprintf('%03d', $case->id));?>
</td>
<td><span class='<?php echo 'pri' . $case->pri?>'><?php echo $case->pri?></span</td>
<td class='a-left'><?php echo html::a($this->createLink('testcase', 'view', "testcaseID=$case->id"), $case->title);?></td>
<td><?php echo $lang->testcase->typeList[$case->type];?></td>
<td><?php echo $users[$case->openedBy];?></td>
<td><?php echo $users[$case->lastRunner];?></td>
<td><?php if(!helper::isZeroDate($case->lastRunDate)) echo date(DT_MONTHTIME1, strtotime($case->lastRunDate));?></td>
<td class='<?php echo $case->lastRunResult;?>'><?php if($case->lastRunResult) echo $lang->testcase->resultList[$case->lastRunResult];?></td>
<td class='<?php echo $run->status;?>'><?php echo $lang->testcase->statusList[$case->status];?></td>
<td>
<?php
common::printIcon('testtask', 'runCase', "runID=0&caseID=$case->id&version=$case->version", '', 'list', '', '', 'iframe');
common::printIcon('testtask', 'results', "runID=0&caseID=$case->id", '', 'list', '', '', 'iframe');
common::printIcon('testcase', 'edit', "caseID=$case->id", $case, 'list');
common::printIcon('testcase', 'create', "productID=$case->product&moduleID=$case->module&from=testcase&param=$case->id", $case, 'list', 'copy');
common::printIcon('testcase', 'delete', "caseID=$case->id", '', 'list', '', 'hiddenwin');
common::printIcon('testcase', 'createBug', "product=$case->product&extra=caseID=$case->id,version=$case->version,runID=", $case, 'list', 'createBug');
?>
</td>
</tr>
<?php endforeach;?>
</tbody>
<tfoot>
<tr>
<td colspan='10'>
<?php if($cases):?>
<div class='f-left'>
<?php
if($canBatchEdit or $canBatchRun) echo html::selectAll() . html::selectReverse();
if($canBatchEdit)
{
$actionLink = $this->createLink('testcase', 'batchEdit');
echo html::submitButton($lang->edit, "onclick=changeAction('myCaseForm','batchEdit','$actionLink')");
}
if($canBatchRun)
{
$actionLink = $this->createLink('testtask', 'batchRun', "productID=0&orderBy=$orderBy&from=testcase");
echo html::submitButton($lang->testtask->runCase, "onclick=changeAction('myCaseForm','batchEdit','$actionLink')");
}
?>
</div>
<?php endif?>
<?php $pager->show();?>
</td>
</tr>
</tfoot>
</table>
</form>
<?php js::set('listName', 'caseList')?>
<script language="Javascript">$("#<?php echo $type;?>Tab").addClass('active'); </script>
+78 -2
View File
@@ -10,10 +10,10 @@
* @link http://www.zentao.net
*/
?>
<?php if(isset($_GET['ajax']) and $_GET['ajax'] == 'yes') die(include "./todolist.html.php")?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/colorize.html.php';?>
<?php include '../../common/view/datepicker.html.php';?>
<?php js::set('confirmDelete', $lang->todo->confirmDelete)?>
<form method='post' id='todoform'>
<div id='featurebar'>
<div class='f-left'>
@@ -48,7 +48,83 @@
?>
</div>
</div>
<?php include "./todolist.html.php"?>
<table class='table-1 tablesorter colored' id='todoList'>
<?php $vars = "type=$type&account=$account&status=$status&orderBy=%s&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID"; ?>
<thead>
<tr class='colhead'>
<th class='w-id'> <?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?></th>
<th class='w-date'> <?php common::printOrderLink('date', $orderBy, $vars, $lang->todo->date);?></th>
<th class='w-type'> <?php common::printOrderLink('type', $orderBy, $vars, $lang->todo->type);?></th>
<th class='w-pri'> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
<th> <?php common::printOrderLink('name', $orderBy, $vars, $lang->todo->name);?></th>
<th class='w-hour'> <?php common::printOrderLink('begin', $orderBy, $vars, $lang->todo->beginAB);?></th>
<th class='w-hour'> <?php common::printOrderLink('end', $orderBy, $vars, $lang->todo->endAB);?></th>
<th class='w-status'><?php common::printOrderLink('status', $orderBy, $vars, $lang->todo->status);?></th>
<th class='w-80px {sorter:false}'><?php echo $lang->actions;?></th>
</tr>
</thead>
<tbody>
<?php foreach($todos as $todo):?>
<tr class='a-center'>
<td class='a-left'>
<?php if(common::hasPriv('todo', 'batchEdit') or (common::hasPriv('todo', 'import2Today') and $importFuture)):?>
<input type='checkbox' name='todoIDList[<?php echo $todo->id;?>]' value='<?php echo $todo->id;?>' />
<?php endif;?>
<?php echo $todo->id; ?>
</td>
<td><?php echo $todo->date == '2030-01-01' ? $lang->todo->periods['future'] : $todo->date;?></td>
<td><?php echo $lang->todo->typeList[$todo->type];?></td>
<td><span class='<?php echo 'pri' . $todo->pri;?>'><?php echo $todo->pri?></span></td>
<td class='a-left'><?php echo html::a($this->createLink('todo', 'view', "id=$todo->id&from=my", '', true), $todo->name, '', "class='colorbox'");?></td>
<td><?php echo $todo->begin;?></td>
<td><?php echo $todo->end;?></td>
<td class='<?php echo $todo->status;?>'><?php echo $lang->todo->statusList[$todo->status];?></td>
<td class='a-right'>
<?php
common::printIcon('todo', 'finish', "id=$todo->id", $todo, 'list', '', 'hiddenwin');
common::printIcon('todo', 'edit', "id=$todo->id", '', 'list', '', '', 'iframe', true);
common::printIcon('todo', 'delete', "id=$todo->id", '', 'list', '', 'hiddenwin');
?>
</td>
</tr>
<?php endforeach;?>
</tbody>
<?php if(count($todos)):?>
<tfoot>
<tr>
<td colspan='9' align='left'>
<div class='f-left'>
<?php
if(common::hasPriv('todo', 'batchEdit') or (common::hasPriv('todo', 'import2Today') and $importFuture))
{
echo html::selectAll() . html::selectReverse();
}
if(common::hasPriv('todo', 'batchEdit'))
{
$actionLink = $this->createLink('todo', 'batchEdit', "from=myTodo&type=$type&account=$account&status=$status");
echo html::commonButton($lang->edit, "onclick=\"changeAction('todoform', 'batchEdit', '$actionLink')\"");
}
if(common::hasPriv('todo', 'batchFinish'))
{
$actionLink = $this->createLink('todo', 'batchFinish');
echo html::commonButton($lang->todo->finish, "onclick=\"changeAction('todoform', 'batchFinish', '$actionLink')\"");
}
if(common::hasPriv('todo', 'import2Today') and $importFuture)
{
$actionLink = $this->createLink('todo', 'import2Today');
echo html::commonButton($lang->todo->import, "onclick=\"changeAction('todoform', 'import2Today', '$actionLink')\"");
echo html::input('date', date('Y-m-d'), "class='date w-80px'");
}
?>
</div>
<?php $pager->show();?>
</td>
</tr>
</tfoot>
<?php endif;?>
</table>
</form>
<?php js::set('listName', 'todoList')?>
<?php include '../../common/view/footer.html.php';?>
-77
View File
@@ -1,77 +0,0 @@
<table class='table-1 tablesorter colored' id='todoList'>
<?php $vars = "type=$type&account=$account&status=$status&orderBy=%s&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID"; ?>
<thead>
<tr class='colhead'>
<th class='w-id'> <?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?></th>
<th class='w-date'> <?php common::printOrderLink('date', $orderBy, $vars, $lang->todo->date);?></th>
<th class='w-type'> <?php common::printOrderLink('type', $orderBy, $vars, $lang->todo->type);?></th>
<th class='w-pri'> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
<th> <?php common::printOrderLink('name', $orderBy, $vars, $lang->todo->name);?></th>
<th class='w-hour'> <?php common::printOrderLink('begin', $orderBy, $vars, $lang->todo->beginAB);?></th>
<th class='w-hour'> <?php common::printOrderLink('end', $orderBy, $vars, $lang->todo->endAB);?></th>
<th class='w-status'><?php common::printOrderLink('status', $orderBy, $vars, $lang->todo->status);?></th>
<th class='w-80px {sorter:false}'><?php echo $lang->actions;?></th>
</tr>
</thead>
<tbody>
<?php foreach($todos as $todo):?>
<tr class='a-center'>
<td class='a-left'>
<?php if(common::hasPriv('todo', 'batchEdit') or (common::hasPriv('todo', 'import2Today') and $importFuture)):?>
<input type='checkbox' name='todoIDList[<?php echo $todo->id;?>]' value='<?php echo $todo->id;?>' />
<?php endif;?>
<?php echo $todo->id; ?>
</td>
<td><?php echo $todo->date == '2030-01-01' ? $lang->todo->periods['future'] : $todo->date;?></td>
<td><?php echo $lang->todo->typeList[$todo->type];?></td>
<td><span class='<?php echo 'pri' . $todo->pri;?>'><?php echo $todo->pri?></span></td>
<td class='a-left'><?php echo html::a($this->createLink('todo', 'view', "id=$todo->id&from=my", '', true), $todo->name, '', "class='colorbox'");?></td>
<td><?php echo $todo->begin;?></td>
<td><?php echo $todo->end;?></td>
<td class='<?php echo $todo->status;?>'><?php echo $lang->todo->statusList[$todo->status];?></td>
<td class='a-right'>
<?php
common::printIcon('todo', 'finish', "id=$todo->id", $todo, 'list', '', 'hiddenwin');
common::printIcon('todo', 'edit', "id=$todo->id", '', 'list', '', '', 'iframe', true);
common::printIcon('todo', 'delete', "id=$todo->id", '', 'list', '', 'hiddenwin');
?>
</td>
</tr>
<?php endforeach;?>
</tbody>
<?php if(count($todos)):?>
<tfoot>
<tr>
<td colspan='9' align='left'>
<div class='f-left'>
<?php
if(common::hasPriv('todo', 'batchEdit') or (common::hasPriv('todo', 'import2Today') and $importFuture))
{
echo html::selectAll() . html::selectReverse();
}
if(common::hasPriv('todo', 'batchEdit'))
{
$actionLink = $this->createLink('todo', 'batchEdit', "from=myTodo&type=$type&account=$account&status=$status");
echo html::commonButton($lang->edit, "onclick=\"changeAction('todoform', 'batchEdit', '$actionLink')\"");
}
if(common::hasPriv('todo', 'batchFinish'))
{
$actionLink = $this->createLink('todo', 'batchFinish');
echo html::commonButton($lang->todo->finish, "onclick=\"changeAction('todoform', 'batchFinish', '$actionLink')\"");
}
if(common::hasPriv('todo', 'import2Today') and $importFuture)
{
$actionLink = $this->createLink('todo', 'import2Today');
echo html::commonButton($lang->todo->import, "onclick=\"changeAction('todoform', 'import2Today', '$actionLink')\"");
echo html::input('date', date('Y-m-d'), "class='date w-80px'");
}
?>
</div>
<?php $pager->show();?>
</td>
</tr>
</tfoot>
<?php endif;?>
</table>
+3 -3
View File
@@ -183,9 +183,9 @@ class product extends control
$this->view->title = $this->lang->product->create;
$this->view->position[] = $this->view->title;
$this->view->groups = $this->loadModel('group')->getPairs();
$this->view->poUsers = $this->loadModel('user')->getPairs('nodeleted|pofirst');
$this->view->qdUsers = $this->loadModel('user')->getPairs('nodeleted|qdfirst');
$this->view->rdUsers = $this->loadModel('user')->getPairs('nodeleted|devfirst');
$this->view->poUsers = $this->loadModel('user')->getPairs('nodeleted|pofirst|noclosed');
$this->view->qdUsers = $this->loadModel('user')->getPairs('nodeleted|qdfirst|noclosed');
$this->view->rdUsers = $this->loadModel('user')->getPairs('nodeleted|devfirst|noclosed');
$this->display();
}
-1
View File
@@ -87,5 +87,4 @@ function toggleSubMenu(currentID, position, menuIndex)
$(function()
{
if(browseType == 'bysearch') ajaxGetSearchForm();
setModal4List('iframe', 'storyList');
})
+28
View File
@@ -0,0 +1,28 @@
/**
* Delete doc.
*
* @param int $docID
* @access public
* @return void
*/
function deleteDoc(docID)
{
if(confirm(confirmDelete))
{
url = createLink('doc', 'delete','docID=' + docID + '&confrim=yes');
$.ajax(
{
type: 'GET',
url: url,
dataType: 'json',
success: function(data)
{
if(data.result == 'success')
{
url = createLink('product', 'doc', 'productID=' + productID);
$('.outer').load(url + ' #doclist', function(){sortTable();});
}
}
});
}
}
+169 -2
View File
@@ -10,7 +10,6 @@
* @link http://www.zentao.net
*/
?>
<?php if(isset($_GET['ajax']) and $_GET['ajax'] == 'yes') die(include './storylist.html.php'); ?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/treeview.html.php';?>
<?php include '../../common/view/colorize.html.php';?>
@@ -56,7 +55,175 @@ var browseType = '<?php echo $browseType;?>';
</td>
<td class='divider <?php echo $treeClass;?>'></td>
<td>
<?php include "./storylist.html.php";?>
<table class='table-1 fixed colored tablesorter datatable' id='storyList'>
<thead>
<tr class='colhead'>
<?php $vars = "productID=$productID&browseType=$browseType&param=$moduleID&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}";?>
<th class='w-id'> <?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?></th>
<th class='w-pri'> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
<th class='w-p30'> <?php common::printOrderLink('title', $orderBy, $vars, $lang->story->title);?></th>
<th> <?php common::printOrderLink('plan', $orderBy, $vars, $lang->story->planAB);?></th>
<th> <?php common::printOrderLink('source', $orderBy, $vars, $lang->story->source);?></th>
<th> <?php common::printOrderLink('openedBy', $orderBy, $vars, $lang->openedByAB);?></th>
<th> <?php common::printOrderLink('assignedTo', $orderBy, $vars, $lang->assignedToAB);?></th>
<th class='w-hour'><?php common::printOrderLink('estimate', $orderBy, $vars, $lang->story->estimateAB);?></th>
<th> <?php common::printOrderLink('status', $orderBy, $vars, $lang->statusAB);?></th>
<th> <?php common::printOrderLink('stage', $orderBy, $vars, $lang->story->stageAB);?></th>
<th class='w-140px {sorter:false}'><?php echo $lang->actions;?></th>
</tr>
</thead>
<tbody>
<?php foreach($stories as $key => $story):?>
<?php
$viewLink = $this->createLink('story', 'view', "storyID=$story->id");
$canView = common::hasPriv('story', 'view');
?>
<tr class='a-center'>
<td>
<input type='checkbox' name='storyIDList[<?php echo $story->id;?>]' value='<?php echo $story->id;?>' />
<?php if($canView) echo html::a($viewLink, sprintf('%03d', $story->id)); else printf('%03d', $story->id);?>
</td>
<td><span class='<?php echo 'pri' . $lang->story->priList[$story->pri];?>'><?php echo $lang->story->priList[$story->pri]?></span></td>
<td class='a-left' title="<?php echo $story->title?>"><nobr><?php echo html::a($viewLink, $story->title);?></nobr></td>
<td title="<?php echo $story->planTitle?>"><?php echo $story->planTitle;?></td>
<td><?php echo $lang->story->sourceList[$story->source];?></td>
<td><?php echo $users[$story->openedBy];?></td>
<td><?php echo $users[$story->assignedTo];?></td>
<td><?php echo $story->estimate;?></td>
<td class='<?php echo $story->status;?>'><?php echo $lang->story->statusList[$story->status];?></td>
<td><?php echo $lang->story->stageList[$story->stage];?></td>
<td class='a-right'>
<?php
$vars = "story={$story->id}";
common::printIcon('story', 'change', $vars, $story, 'list');
common::printIcon('story', 'review', $vars, $story, 'list');
common::printIcon('story', 'close', $vars, $story, 'list');
common::printIcon('story', 'edit', $vars, $story, 'list');
common::printIcon('story', 'createCase', "productID=$story->product&module=0&from=&param=0&$vars", $story, 'list', 'createCase');
?>
</td>
</tr>
<?php endforeach;?>
</tbody>
<tfoot>
<tr>
<td colspan='11' class='a-right'>
<div class='f-left'>
<?php
if(count($stories))
{
echo "<div class='groupButton'>";
echo html::selectAll() . html::selectReverse();
echo "</div>";
$canBatchEdit = common::hasPriv('story', 'batchEdit');
$disabled = $canBatchEdit ? '' : "disabled='disabled'";
$actionLink = $this->createLink('story', 'batchEdit', "productID=$productID&projectID=0");
echo "<div class='groupButton'>";
echo html::commonButton($lang->edit, "onclick=\"changeAction('$actionLink')\" $disabled");
echo "<button id='moreAction' type='button' onclick=\"toggleSubMenu(this.id, 'top', 0)\"><span class='caret'></span></button>";
echo "</div>";
}
echo $summary;
?>
</div>
<?php $pager->show();?>
</td>
</tr>
</tfoot>
</table>
<div id='moreActionMenu' class='listMenu hidden'>
<ul>
<?php
$class = "class='disabled'";
$canBatchClose = common::hasPriv('story', 'batchClose') and strtolower($browseType) != 'closedbyme' and strtolower($browseType) != 'closedstory';
$actionLink = $this->createLink('story', 'batchClose', "productID=$productID&projectID=0");
$misc = $canBatchClose ? "onclick=changeAction('$actionLink')" : $class;
echo "<li>" . html::a('#', $lang->close, '', $misc) . "</li>";
$misc = common::hasPriv('story', 'batchReview') ? "onmouseover='toggleSubMenu(this.id)' onmouseout='toggleSubMenu(this.id)' id='reviewItem'" : $class;
echo "<li>" . html::a('#', $lang->story->review, '', $misc) . "</li>";
$misc = common::hasPriv('story', 'batchChangePlan') ? "onmouseover='toggleSubMenu(this.id)' onmouseout='toggleSubMenu(this.id)' id='planItem'" : $class;
echo "<li>" . html::a('#', $lang->story->planAB, '', $misc) . "</li>";
$misc = common::hasPriv('story', 'batchChangeStage') ? "onmouseover='toggleSubMenu(this.id)' onmouseout='toggleSubMenu(this.id)' id='stageItem'" : $class;
echo "<li>" . html::a('#', $lang->story->stageAB, '', $misc) . "</li>";
?>
</ul>
</div>
<div id='reviewItemMenu' class='hidden listMenu'>
<ul>
<?php
unset($lang->story->reviewResultList['']);
unset($lang->story->reviewResultList['revert']);
foreach($lang->story->reviewResultList as $key => $result)
{
$actionLink = $this->createLink('story', 'batchReview', "result=$key");
echo "<li>";
if($key == 'reject')
{
echo html::a('#', $result, '', "onmouseover='toggleSubMenu(this.id, \"right\", 2)' id='rejectItem'");
}
else
{
echo html::a('#', $result, '', "onclick=\"changeAction('$actionLink',true)\"");
}
echo "</li>";
}
?>
</ul>
</div>
<div id='rejectItemMenu' class='hidden listMenu'>
<ul>
<?php
unset($lang->story->reasonList['']);
unset($lang->story->reasonList['subdivided']);
unset($lang->story->reasonList['duplicate']);
foreach($lang->story->reasonList as $key => $reason)
{
$actionLink = $this->createLink('story', 'batchReview', "result=reject&reason=$key");
echo "<li>";
echo html::a('#', $reason, '', "onclick=\"changeAction('$actionLink',true)\"");
echo "</li>";
}
?>
</ul>
</div>
<div id='planItemMenu' class='hidden listMenu'>
<ul>
<?php
unset($plans['']);
$plans = array(0 => $lang->null) + $plans;
foreach($plans as $planID => $plan)
{
$actionLink = $this->createLink('story', 'batchChangePlan', "planID=$planID");
echo "<li>" . html::a('#', $plan, '', "onclick=\"changeAction('$actionLink',true)\"") . "</li>";
}
?>
</ul>
</div>
<div id='stageItemMenu' class='hidden listMenu'>
<ul>
<?php
$lang->story->stageList[''] = $lang->null;
foreach($lang->story->stageList as $key => $stage)
{
$actionLink = $this->createLink('story', 'batchChangeStage', "stage=$key");
echo "<li>" . html::a('#', $stage, '', "onclick=\"changeAction('$actionLink',true)\"") . "</li>";
}
?>
</ul>
</div>
</td>
</tr>
</table>
+5 -4
View File
@@ -13,9 +13,11 @@
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/tablesorter.html.php';?>
<?php include '../../common/view/colorize.html.php';?>
<?php js::set('confirmDelete', $lang->doc->confirmDelete)?>
<?php js::set('productID', $product->id)?>
<div class='yui-d0'>
<table class='table-1 fixed colored tablesorter' align='center'>
<table class='table-1 fixed colored tablesorter' align='center' id='doclist'>
<caption class='caption-tr'><?php common::printIcon('doc', 'create', "libID=product&moduleID=0&productID={$product->id}&projectID=0&from=product");?></caption>
<thead>
<tr class='colhead'>
@@ -41,9 +43,8 @@
<td><?php echo $doc->addedDate;?></td>
<td>
<?php
$vars = "doc={$doc->id}";
common::printIcon('doc', 'edit', $vars);
common::printIcon('doc', 'delete', $vars, '', 'button', '', 'hiddenwin');
common::printIcon('doc', 'edit', "doc={$doc->id}");
echo html::a("javascript:deleteDoc($doc->id)", '&nbsp;', '', "class='icon-green-common-delete' title='{$lang->doc->delete}'");
?>
</td>
</tr>
-169
View File
@@ -1,169 +0,0 @@
<table class='table-1 fixed colored tablesorter datatable' id='storyList'>
<thead>
<tr class='colhead'>
<?php $vars = "productID=$productID&browseType=$browseType&param=$moduleID&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}";?>
<th class='w-id'> <?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?></th>
<th class='w-pri'> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
<th class='w-p30'> <?php common::printOrderLink('title', $orderBy, $vars, $lang->story->title);?></th>
<th> <?php common::printOrderLink('plan', $orderBy, $vars, $lang->story->planAB);?></th>
<th> <?php common::printOrderLink('source', $orderBy, $vars, $lang->story->source);?></th>
<th> <?php common::printOrderLink('openedBy', $orderBy, $vars, $lang->openedByAB);?></th>
<th> <?php common::printOrderLink('assignedTo', $orderBy, $vars, $lang->assignedToAB);?></th>
<th class='w-hour'><?php common::printOrderLink('estimate', $orderBy, $vars, $lang->story->estimateAB);?></th>
<th> <?php common::printOrderLink('status', $orderBy, $vars, $lang->statusAB);?></th>
<th> <?php common::printOrderLink('stage', $orderBy, $vars, $lang->story->stageAB);?></th>
<th class='w-140px {sorter:false}'><?php echo $lang->actions;?></th>
</tr>
</thead>
<tbody>
<?php foreach($stories as $key => $story):?>
<?php
$viewLink = $this->createLink('story', 'view', "storyID=$story->id");
$canView = common::hasPriv('story', 'view');
?>
<tr class='a-center'>
<td>
<input type='checkbox' name='storyIDList[<?php echo $story->id;?>]' value='<?php echo $story->id;?>' />
<?php if($canView) echo html::a($viewLink, sprintf('%03d', $story->id)); else printf('%03d', $story->id);?>
</td>
<td><span class='<?php echo 'pri' . $lang->story->priList[$story->pri];?>'><?php echo $lang->story->priList[$story->pri]?></span></td>
<td class='a-left' title="<?php echo $story->title?>"><nobr><?php echo html::a($viewLink, $story->title);?></nobr></td>
<td title="<?php echo $story->planTitle?>"><?php echo $story->planTitle;?></td>
<td><?php echo $lang->story->sourceList[$story->source];?></td>
<td><?php echo $users[$story->openedBy];?></td>
<td><?php echo $users[$story->assignedTo];?></td>
<td><?php echo $story->estimate;?></td>
<td class='<?php echo $story->status;?>'><?php echo $lang->story->statusList[$story->status];?></td>
<td><?php echo $lang->story->stageList[$story->stage];?></td>
<td class='a-right'>
<?php
$vars = "story={$story->id}";
common::printIcon('story', 'change', $vars, $story, 'list');
common::printIcon('story', 'review', $vars, $story, 'list');
common::printIcon('story', 'close', $vars, $story, 'list');
common::printIcon('story', 'edit', $vars, $story, 'list');
common::printIcon('story', 'createCase', "productID=$story->product&module=0&from=&param=0&$vars", $story, 'list', 'createCase');
?>
</td>
</tr>
<?php endforeach;?>
</tbody>
<tfoot>
<tr>
<td colspan='11' class='a-right'>
<div class='f-left'>
<?php
if(count($stories))
{
echo "<div class='groupButton'>";
echo html::selectAll() . html::selectReverse();
echo "</div>";
$canBatchEdit = common::hasPriv('story', 'batchEdit');
$disabled = $canBatchEdit ? '' : "disabled='disabled'";
$actionLink = $this->createLink('story', 'batchEdit', "productID=$productID&projectID=0");
echo "<div class='groupButton'>";
echo html::commonButton($lang->edit, "onclick=\"changeAction('$actionLink')\" $disabled");
echo "<button id='moreAction' type='button' onclick=\"toggleSubMenu(this.id, 'top', 0)\"><span class='caret'></span></button>";
echo "</div>";
}
echo $summary;
?>
</div>
<?php $pager->show();?>
</td>
</tr>
</tfoot>
</table>
<div id='moreActionMenu' class='listMenu hidden'>
<ul>
<?php
$class = "class='disabled'";
$canBatchClose = common::hasPriv('story', 'batchClose') and strtolower($browseType) != 'closedbyme' and strtolower($browseType) != 'closedstory';
$actionLink = $this->createLink('story', 'batchClose', "productID=$productID&projectID=0");
$misc = $canBatchClose ? "onclick=changeAction('$actionLink')" : $class;
echo "<li>" . html::a('#', $lang->close, '', $misc) . "</li>";
$misc = common::hasPriv('story', 'batchReview') ? "onmouseover='toggleSubMenu(this.id)' onmouseout='toggleSubMenu(this.id)' id='reviewItem'" : $class;
echo "<li>" . html::a('#', $lang->story->review, '', $misc) . "</li>";
$misc = common::hasPriv('story', 'batchChangePlan') ? "onmouseover='toggleSubMenu(this.id)' onmouseout='toggleSubMenu(this.id)' id='planItem'" : $class;
echo "<li>" . html::a('#', $lang->story->planAB, '', $misc) . "</li>";
$misc = common::hasPriv('story', 'batchChangeStage') ? "onmouseover='toggleSubMenu(this.id)' onmouseout='toggleSubMenu(this.id)' id='stageItem'" : $class;
echo "<li>" . html::a('#', $lang->story->stageAB, '', $misc) . "</li>";
?>
</ul>
</div>
<div id='reviewItemMenu' class='hidden listMenu'>
<ul>
<?php
unset($lang->story->reviewResultList['']);
unset($lang->story->reviewResultList['revert']);
foreach($lang->story->reviewResultList as $key => $result)
{
$actionLink = $this->createLink('story', 'batchReview', "result=$key");
echo "<li>";
if($key == 'reject')
{
echo html::a('#', $result, '', "onmouseover='toggleSubMenu(this.id, \"right\", 2)' id='rejectItem'");
}
else
{
echo html::a('#', $result, '', "onclick=\"changeAction('$actionLink',true)\"");
}
echo "</li>";
}
?>
</ul>
</div>
<div id='rejectItemMenu' class='hidden listMenu'>
<ul>
<?php
unset($lang->story->reasonList['']);
unset($lang->story->reasonList['subdivided']);
unset($lang->story->reasonList['duplicate']);
foreach($lang->story->reasonList as $key => $reason)
{
$actionLink = $this->createLink('story', 'batchReview', "result=reject&reason=$key");
echo "<li>";
echo html::a('#', $reason, '', "onclick=\"changeAction('$actionLink',true)\"");
echo "</li>";
}
?>
</ul>
</div>
<div id='planItemMenu' class='hidden listMenu'>
<ul>
<?php
unset($plans['']);
$plans = array(0 => $lang->null) + $plans;
foreach($plans as $planID => $plan)
{
$actionLink = $this->createLink('story', 'batchChangePlan', "planID=$planID");
echo "<li>" . html::a('#', $plan, '', "onclick=\"changeAction('$actionLink',true)\"") . "</li>";
}
?>
</ul>
</div>
<div id='stageItemMenu' class='hidden listMenu'>
<ul>
<?php
$lang->story->stageList[''] = $lang->null;
foreach($lang->story->stageList as $key => $stage)
{
$actionLink = $this->createLink('story', 'batchChangeStage', "stage=$key");
echo "<li>" . html::a('#', $stage, '', "onclick=\"changeAction('$actionLink',true)\"") . "</li>";
}
?>
</ul>
</div>
+9 -1
View File
@@ -94,9 +94,17 @@ class productplan extends control
}
else
{
$response['result'] = 'success';
$response['message'] = '';
$plan = $this->productplan->getById($planID);
$this->productplan->delete(TABLE_PRODUCTPLAN, $planID);
die(js::locate(inlink('browse', "productID=$plan->product"), 'parent'));
if(dao::isError())
{
$response['result'] = 'fail';
$response['message'] = dao::getError();
}
$this->send($response);
}
}
+21
View File
@@ -0,0 +1,21 @@
function deletePlan(planID)
{
if(confirm(confirmDelete))
{
url = createLink('productplan', 'delete','planID=' + planID + '&confrim=yes');
$.ajax(
{
type: 'GET',
url: url,
dataType: 'json',
success: function(data)
{
if(data.result == 'success')
{
url = createLink('productplan', 'browse', 'productID=' + productID);
$('.outer').load(url + ' #productplan');
}
}
});
}
}
+3 -1
View File
@@ -11,6 +11,8 @@
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php js::set('confirmDelete', $lang->productplan->confirmDelete)?>
<?php js::set('productID', $productID)?>
<table class='table-1 tablesorter fixed' id="productplan">
<caption class='caption-tr'>
<div class='f-left'><?php echo $lang->productplan->browse;?></div>
@@ -40,7 +42,7 @@
common::printIcon('productplan', 'linkStory', "planID=$plan->id", '', 'list');
common::printIcon('productplan', 'linkBug', "planID=$plan->id", '', 'list');
common::printIcon('productplan', 'edit', "planID=$plan->id", '', 'list');
common::printIcon('productplan', 'delete', "planID=$plan->id", '', 'list', '', 'hiddenwin');
echo html::a("javascript:deletePlan($plan->id)", '&nbsp;', '', "class='icon-green-common-delete' title='{$lang->productplan->delete}'");
?>
</td>
</tr>
+18 -3
View File
@@ -1349,8 +1349,16 @@ class project extends control
}
else
{
$response['result'] = 'success';
$response['message'] = '';
$this->project->unlinkMember($projectID, $account);
die(js::locate($this->inlink('team', "projectID=$projectID"), 'parent'));
if(dao::isError())
{
$response['result'] = 'fail';
$response['message'] = dao::getError();
}
$this->send($response);
}
}
@@ -1441,9 +1449,16 @@ class project extends control
}
else
{
$response['result'] = 'success';
$response['message'] = '';
$this->project->unlinkStory($projectID, $storyID);
echo js::locate($this->app->session->storyList, 'parent');
exit;
if(dao::isError())
{
$response['result'] = 'fail';
$response['message'] = dao::getError();
}
$this->send($response);
}
}
-26
View File
@@ -1,26 +0,0 @@
function setModal4List(colorboxClass, replaceID)
{
replaceID = 'bugList';
$('.' + colorboxClass).colorbox(
{
width:900,
height:500,
iframe:true,
transition:'none',
onCleanup:function()
{
saveWindowSize();
var link = self.location.href;
$.get(link, {ajax: "yes"}, function(data)
{
$('#' + replaceID).replaceWith(data)
setModal4List(colorboxClass, replaceID)
$('.colored').colorize();
$('tfoot td').css('background', 'white').unbind('click').unbind('hover');
});
}
});
}
+28
View File
@@ -0,0 +1,28 @@
/**
* Delete build.
*
* @param int buildID
* @access public
* @return void
*/
function deleteBuild(buildID)
{
if(confirm(confirmDelete))
{
url = createLink('build', 'delete','buildID=' + buildID + '&confrim=yes');
$.ajax(
{
type: 'GET',
url: url,
dataType: 'json',
success: function(data)
{
if(data.result == 'success')
{
url = createLink('project', 'build', 'projectID=' + projectID);
$('.outer').load(url + ' #buildlist', function(){sortTable();});
}
}
});
}
}
+1 -1
View File
@@ -113,7 +113,7 @@ function computeEndDate(delta)
$(function()
{
$(".chosenBox select").chosen({no_results_text: noResultsMatch});
setModal4List('iframe', 'taskList');
if(typeof(replaceID) != 'undefined') setModal4List('iframe', replaceID);
$(".date").bind('dateSelected', function()
{
computeWorkDays(this.id);
+28
View File
@@ -0,0 +1,28 @@
/**
* Delete doc.
*
* @param int $docID
* @access public
* @return void
*/
function deleteDoc(docID)
{
if(confirm(confirmDelete))
{
url = createLink('doc', 'delete','docID=' + docID + '&confrim=yes');
$.ajax(
{
type: 'GET',
url: url,
dataType: 'json',
success: function(data)
{
if(data.result == 'success')
{
url = createLink('project', 'doc', 'projectID=' + projectID);
$('.outer').load(url + ' #doclist', function(){sortTable();});
}
}
});
}
}
+30
View File
@@ -16,3 +16,33 @@ function changeAction(formName, actionName, actionLink)
{
$('#' + formName).attr('action', actionLink).submit();
}
/**
* unlink story.
*
* @param int $projectID
* @param int $storyID
* @access public
* @return void
*/
function unlink(projectID, storyID)
{
if(confirm(confirmUnlinkStory))
{
url = createLink('project', 'unlinkStory','projectID=' + projectID + '&storyID=' + storyID + '&confrim=yes');
$.ajax(
{
type: 'GET',
url: url,
dataType: 'json',
success: function(data)
{
if(data.result == 'success')
{
url = createLink('project', 'story', 'projectID=' + projectID);
$('#projectStoryForm').load(url + ' #storyList', function(){sortTable();});
}
}
});
}
}
+29
View File
@@ -0,0 +1,29 @@
/**
* unlink member.
*
* @param int projectID
* @param string account
* @access public
* @return void
*/
function unlinkMember(projectID, account)
{
if(confirm(confirmUnlinkMember))
{
url = createLink('project', 'unlinkMember','projectID=' + projectID + '&account=' + account + '&confrim=yes');
$.ajax(
{
type: 'GET',
url: url,
dataType: 'json',
success: function(data)
{
if(data.result == 'success')
{
url = createLink('project', 'team', 'projectID=' + projectID);
$('.outer').load(url + ' #memberlist', function(){sortTable();});
}
}
});
}
}
+1
View File
@@ -193,6 +193,7 @@ $lang->project->setTeam = 'Set team';
$lang->project->linkStory = 'Link story';
$lang->project->createTask = 'Create task';
$lang->project->goback = 'Go back(Automatically after 5 seconds)';
$lang->project->linkProduct = 'Select product to link...';
/* Report. */
$lang->project->charts = new stdclass();
+1
View File
@@ -193,6 +193,7 @@ $lang->project->setTeam = '设置团队';
$lang->project->linkStory = '关联需求';
$lang->project->createTask = '添加任务';
$lang->project->goback = '返回项目首页(5秒后将自动跳转)';
$lang->project->linkProduct = '选择产品关联...';
/* 统计。*/
$lang->project->charts = new stdclass();
+52 -2
View File
@@ -10,8 +10,58 @@
* @link http://www.zentao.net
*/
?>
<?php if(isset($_GET['ajax']) and $_GET['ajax'] == 'yes') die(include './buglist.html.php')?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/colorize.html.php';?>
<?php include './buglist.html.php'?>
<table class='table-1 fixed colored tablesorter' id='bugList'>
<caption class='caption-tl pb-10px'>
<div class='f-left'>
<?php
echo $lang->project->bug;
if($build) echo '<span class="red">(Build:' . $build->name . ')</span>';
?>
</div>
<div class='f-right'><?php common::printIcon('bug', 'create', "productID=$productID&extra=projectID=$project->id");?></div>
</caption>
<thead>
<tr class='colhead'>
<?php $vars = "projectID={$project->id}&orderBy=%s&build=$buildID&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}"; ?>
<th class='w-id'> <?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?></th>
<th class='w-severity'><?php common::printOrderLink('severity', $orderBy, $vars, $lang->bug->severityAB);?></th>
<th class='w-pri'> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
<th> <?php common::printOrderLink('title', $orderBy, $vars, $lang->bug->title);?></th>
<th class='w-user'> <?php common::printOrderLink('openedBy', $orderBy, $vars, $lang->openedByAB);?></th>
<th class='w-user'> <?php common::printOrderLink('assignedTo', $orderBy, $vars, $lang->assignedToAB);?></th>
<th class='w-user'> <?php common::printOrderLink('resolvedBy', $orderBy, $vars, $lang->bug->resolvedBy);?></th>
<th class='w-resolution'><?php common::printOrderLink('resolution', $orderBy, $vars, $lang->bug->resolutionAB);?></th>
<th class='w-140px {sorter:false}'><?php echo $lang->actions;?></th>
</tr>
</thead>
<tbody>
<?php foreach($bugs as $bug):?>
<tr class='a-center'>
<td><?php echo html::a($this->createLink('bug', 'view', "bugID=$bug->id"), $bug->id, '_blank');?></td>
<td><span class='<?php echo 'severity' . $lang->bug->severityList[$bug->severity]?>'><?php echo $lang->bug->severityList[$bug->severity]?></span></td>
<td><span class='<?php echo 'pri' . $lang->bug->priList[$bug->pri]?>'><?php echo $lang->bug->priList[$bug->pri]?></span></td>
<td class='a-left' title="<?php echo $bug->title?>"><?php echo html::a($this->createLink('bug', 'view', "bugID=$bug->id"), $bug->title);?></td>
<td><?php echo $users[$bug->openedBy];?></td>
<td><?php echo $users[$bug->assignedTo];?></td>
<td><?php echo $users[$bug->resolvedBy];?></td>
<td><?php echo $lang->bug->resolutionList[$bug->resolution];?></td>
<td class='a-right'>
<?php
$params = "bugID=$bug->id";
common::printIcon('bug', 'confirmBug', $params, $bug, 'list', '', '', 'iframe', true);
common::printIcon('bug', 'assignTo', $params, '', '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&extra=bugID=$bug->id", $bug, 'list', 'copy');
?>
</td>
</tr>
<?php endforeach;?>
</tbody>
<tfoot><tr><td colspan='9'><?php $pager->show();?></td></tr></table>
</table>
<?php js::set('replaceID', 'bugList')?>
<?php include '../../common/view/footer.html.php';?>
-51
View File
@@ -1,51 +0,0 @@
<table class='table-1 fixed colored tablesorter' id='bugList'>
<caption class='caption-tl pb-10px'>
<div class='f-left'>
<?php
echo $lang->project->bug;
if($build) echo '<span class="red">(Build:' . $build->name . ')</span>';
?>
</div>
<div class='f-right'><?php common::printIcon('bug', 'create', "productID=$productID&extra=projectID=$project->id");?></div>
</caption>
<thead>
<tr class='colhead'>
<?php $vars = "projectID={$project->id}&orderBy=%s&build=$buildID&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}"; ?>
<th class='w-id'> <?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?></th>
<th class='w-severity'><?php common::printOrderLink('severity', $orderBy, $vars, $lang->bug->severityAB);?></th>
<th class='w-pri'> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
<th> <?php common::printOrderLink('title', $orderBy, $vars, $lang->bug->title);?></th>
<th class='w-user'> <?php common::printOrderLink('openedBy', $orderBy, $vars, $lang->openedByAB);?></th>
<th class='w-user'> <?php common::printOrderLink('assignedTo', $orderBy, $vars, $lang->assignedToAB);?></th>
<th class='w-user'> <?php common::printOrderLink('resolvedBy', $orderBy, $vars, $lang->bug->resolvedBy);?></th>
<th class='w-resolution'><?php common::printOrderLink('resolution', $orderBy, $vars, $lang->bug->resolutionAB);?></th>
<th class='w-140px {sorter:false}'><?php echo $lang->actions;?></th>
</tr>
</thead>
<tbody>
<?php foreach($bugs as $bug):?>
<tr class='a-center'>
<td><?php echo html::a($this->createLink('bug', 'view', "bugID=$bug->id"), $bug->id, '_blank');?></td>
<td><span class='<?php echo 'severity' . $lang->bug->severityList[$bug->severity]?>'><?php echo $lang->bug->severityList[$bug->severity]?></span></td>
<td><span class='<?php echo 'pri' . $lang->bug->priList[$bug->pri]?>'><?php echo $lang->bug->priList[$bug->pri]?></span></td>
<td class='a-left' title="<?php echo $bug->title?>"><?php echo html::a($this->createLink('bug', 'view', "bugID=$bug->id"), $bug->title);?></td>
<td><?php echo $users[$bug->openedBy];?></td>
<td><?php echo $users[$bug->assignedTo];?></td>
<td><?php echo $users[$bug->resolvedBy];?></td>
<td><?php echo $lang->bug->resolutionList[$bug->resolution];?></td>
<td class='a-right'>
<?php
$params = "bugID=$bug->id";
common::printIcon('bug', 'confirmBug', $params, $bug, 'list', '', '', 'iframe', true);
common::printIcon('bug', 'assignTo', $params, '', '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&extra=bugID=$bug->id", $bug, 'list', 'copy');
?>
</td>
</tr>
<?php endforeach;?>
</tbody>
<tfoot><tr><td colspan='9'><?php $pager->show();?></td></tr></table>
</table>
+4 -2
View File
@@ -12,7 +12,9 @@
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/tablesorter.html.php';?>
<table class='table-1 tablesorter fixed'>
<?php js::set('confirmDelete', $lang->build->confirmDelete)?>
<?php js::set('projectID', $projectID)?>
<table class='table-1 tablesorter fixed' id='buildlist'>
<caption class='caption-tl pb-10px'>
<div class='f-left'><?php echo $lang->project->build;?></div>
<div class='f-right'><?php common::printIcon('build', 'create', "project=$project->id");?></div>
@@ -45,7 +47,7 @@
$lang->project->bug = $lang->project->viewBug;
common::printIcon('project', 'bug', "project=$project->id&orderBy=status&build=$build->id", '', 'list');
common::printIcon('build', 'edit', "buildID=$build->id");
common::printIcon('build', 'delete', "buildID=$build->id", '', 'list', '', 'hiddenwin');
echo html::a("javascript:deleteBuild($build->id)", '&nbsp;', '', "class='icon-green-common-delete' title='{$lang->build->delete}'");
?>
</td>
</tr>
+1 -1
View File
@@ -78,7 +78,7 @@ $(document).ready(function()
</tr>
<tr>
<th class='rowhead'><?php echo $lang->project->manageProducts;?></th>
<td class='a-left chosenBox' id='productsBox'><?php echo html::select("products[]", $allProducts, $products, "class='select-1' multiple");?></td>
<td class='a-left chosenBox' id='productsBox'><?php echo html::select("products[]", $allProducts, $products, "class='select-1' data-placeholder='{$lang->project->linkProduct}' multiple");?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->project->goal;?></th>
+5 -4
View File
@@ -13,7 +13,9 @@
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/tablesorter.html.php';?>
<?php include '../../common/view/colorize.html.php';?>
<table class='table-1 fixed colored tablesorter' align='center'>
<?php js::set('confirmDelete', $lang->doc->confirmDelete)?>
<?php js::set('projectID', $project->id)?>
<table class='table-1 fixed colored tablesorter' align='center' id='doclist'>
<caption class='caption-tl pb-10px'>
<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>
@@ -42,9 +44,8 @@
<td><?php echo $doc->addedDate;?></td>
<td>
<?php
$vars = "doc={$doc->id}";
common::printIcon('doc', 'edit', $vars);
common::printIcon('doc', 'delete', $vars, '', 'list', '','hiddenwin');
common::printIcon('doc', 'edit', "doc=$doc->id");
echo html::a("javascript:deleteDoc($doc->id)", '&nbsp;', '', "class='icon-green-common-delete' title='{$lang->doc->delete}'");
?>
</td>
</tr>
+1 -1
View File
@@ -67,7 +67,7 @@
</tr>
<tr>
<th class='rowhead'><?php echo $lang->project->manageProducts;?></th>
<td class='a-left chosenBox' id='productsBox'><?php echo html::select("products[]", $allProducts, $linkedProducts, "class='select-1' multiple");?></td>
<td class='a-left chosenBox' id='productsBox'><?php echo html::select("products[]", $allProducts, $linkedProducts, "class='select-1' data-placeholder='{$lang->project->linkProduct}' multiple");?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->project->goal;?></th>
+4 -3
View File
@@ -12,8 +12,9 @@
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/tablesorter.html.php';?>
<?php js::set('confirmUnlinkStory', $lang->project->confirmUnlinkStory)?>
<form method='post' id='projectStoryForm'>
<table class='table-1 fixed colored tablesorter datatable'>
<table class='table-1 fixed colored tablesorter datatable' id='storyList'>
<caption class='caption-tl pb-10px'>
<div class='f-left'><?php echo $lang->project->story;?></div>
<div class='f-right'>
@@ -53,7 +54,7 @@
$storyLink = $this->createLink('story', 'view', "storyID=$story->id");
$totalEstimate += $story->estimate;
?>
<tr class='a-center'>
<tr class='a-center' id="story<?php echo $story->id?>">
<td>
<?php if($canBatchEdit or $canBatchClose):?>
<input type='checkbox' name='storyIDList[<?php echo $story->id;?>]' value='<?php echo $story->id;?>' />
@@ -87,7 +88,7 @@
if($productID) common::printIcon('testcase', 'batchCreate', "productID=$story->product&moduleID=$story->module&storyID=$story->id", '', 'list');
$lang->project->unlinkStory = $lang->unlink;
common::printIcon('project', 'unlinkStory', $param, '', 'list', '', 'hiddenwin');
echo html::a("javascript:unlink($project->id,$story->id)", '&nbsp;', '', "class='icon-green-project-unlinkStory' title='$lang->unlink'");
?>
</td>
</tr>
+131 -2
View File
@@ -10,7 +10,6 @@
* @link http://www.zentao.net
*/
?>
<?php if(isset($_GET['ajax']) and $_GET['ajax'] == 'yes') die(include "./tasklist.html.php")?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/datepicker.html.php';?>
<?php include '../../common/view/colorize.html.php';?>
@@ -40,11 +39,141 @@ var browseType = '<?php echo $browseType;?>';
</td>
<td class='divider'></td>
<td>
<?php include "./tasklist.html.php"?>
<table class='table-1 fixed colored tablesorter datatable' id='taskList'>
<?php $vars = "projectID=$project->id&status=$status&parma=$param&orderBy=%s&recTotal=$recTotal&recPerPage=$recPerPage"; ?>
<thead>
<tr class='colhead'>
<th class='w-id'> <?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?></th>
<th class='w-pri'> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
<th class='w-p30'> <?php common::printOrderLink('name', $orderBy, $vars, $lang->task->name);?></th>
<th class='w-status'><?php common::printOrderLink('status', $orderBy, $vars, $lang->statusAB);?></th>
<th class='w-70px'> <?php common::printOrderLink('deadline', $orderBy, $vars, $lang->task->deadlineAB);?></th>
<?php if($this->cookie->windowWidth > $this->config->wideSize):?>
<th class='w-id'> <?php common::printOrderLink('openedDate', $orderBy, $vars, $lang->task->openedDateAB);?></th>
<?php endif;?>
<th class='w-user'> <?php common::printOrderLink('assignedTo', $orderBy, $vars, $lang->task->assignedToAB);?></th>
<th class='w-user'> <?php common::printOrderLink('finishedBy', $orderBy, $vars, $lang->task->finishedByAB);?></th>
<?php if($this->cookie->windowWidth > $this->config->wideSize):?>
<th class='w-40px'> <?php common::printOrderLink('finishedDate', $orderBy, $vars, $lang->task->finishedDateAB);?></th>
<?php endif;?>
<th class='w-35px'> <?php common::printOrderLink('estimate', $orderBy, $vars, $lang->task->estimateAB);?></th>
<th class='w-40px'> <?php common::printOrderLink('consumed', $orderBy, $vars, $lang->task->consumedAB);?></th>
<th class='w-40px'> <?php common::printOrderLink('left', $orderBy, $vars, $lang->task->leftAB);?></th>
<?php if($project->type == 'sprint') print '<th>' and common::printOrderLink('story', $orderBy, $vars, $lang->task->story) and print '</th>';?>
<th class='w-140px {sorter:false}'><?php echo $lang->actions;?></th>
</tr>
</thead>
<tbody>
<?php
$canBatchEdit = common::hasPriv('task', 'batchEdit');
$canBatchClose = common::hasPriv('task', 'batchClose') and strtolower($browseType) != 'closedBy';
?>
<?php foreach($tasks as $task):?>
<?php $class = $task->assignedTo == $app->user->account ? 'style=color:red' : ''; ?>
<tr class='a-center'>
<td>
<?php if($canBatchEdit or $canBatchClose):?>
<input type='checkbox' name='taskIDList[]' value='<?php echo $task->id;?>'/>
<?php endif;?>
<?php if(!common::printLink('task', 'view', "task=$task->id", sprintf('%03d', $task->id))) printf('%03d', $task->id);?>
</td>
<td><span class='<?php echo 'pri'. $lang->task->priList[$task->pri]?>'><?php echo $lang->task->priList[$task->pri];?></span></td>
<td class='a-left' title="<?php echo $task->name?>">
<?php
if(!common::printLink('task', 'view', "task=$task->id", $task->name)) echo $task->name;
if($task->fromBug) echo html::a($this->createLink('bug', 'view', "id=$task->fromBug"), "[BUG#$task->fromBug]", '_blank', "class='bug'");
?>
</td>
<td class=<?php echo $task->status;?> >
<?php
$storyChanged = ($task->storyStatus == 'active' and $task->latestStoryVersion > $task->storyVersion);
$storyChanged ? print("<span class='warning'>{$lang->story->changed}</span> ") : print($lang->task->statusList[$task->status]);
?>
</td>
<td class=<?php if(isset($task->delay)) echo 'delayed';?>><?php if(substr($task->deadline, 0, 4) > 0) echo substr($task->deadline, 5, 6);?></td>
<?php if($this->cookie->windowWidth > $this->config->wideSize):?>
<td><?php echo substr($task->openedDate, 5, 6);?></th>
<?php endif;?>
<td <?php echo $class;?>><?php echo $task->assignedTo == 'closed' ? 'Closed' : $task->assignedToRealName;?></td>
<td><?php echo $users[$task->finishedBy];?></td>
<?php if($this->cookie->windowWidth > $this->config->wideSize):?>
<td><?php echo substr($task->finishedDate, 5, 6);?></th>
<?php endif;?>
<td><?php echo $task->estimate;?></td>
<td><?php echo $task->consumed;?></td>
<td><?php echo $task->left;?></td>
<?php
if($project->type == 'sprint')
{
echo '<td class="a-left" title="' . $task->storyTitle . '"';
if($task->storyID)
{
if(!common::printLink('story', 'view', "storyid=$task->storyID", $task->storyTitle)) print $task->storyTitle;
}
echo '</td>';
}
?>
<td class='a-right'>
<?php
common::printIcon('task', 'assignTo', "projectID=$task->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', '', '', '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", '', 'list');
?>
</td>
</tr>
<?php endforeach;?>
</tbody>
<tfoot>
<tr>
<?php $columns = ($this->cookie->windowWidth > $this->config->wideSize ? 14 : 12) - ($project->type == 'sprint' ? 0 : 1);?>
<td colspan='<?php echo $columns;?>'>
<div class='f-left'>
<?php
if(count($tasks))
{
if($canBatchEdit or $canBatchClose) echo html::selectAll() . html::selectReverse();
if($canBatchEdit)
{
$actionLink = $this->createLink('task', 'batchEdit', "projectID=$projectID");
echo html::commonButton($lang->edit, "onclick=\"changeAction('projectTaskForm', 'batchEdit', '$actionLink')\"");
}
if($canBatchClose)
{
$actionLink = $this->createLink('task', 'batchClose');
echo html::commonButton($lang->close, "onclick=\"changeAction('projectTaskForm', 'batchClose', '$actionLink')\"");
}
}
echo $summary;
?>
</div>
<?php $pager->show();?>
</td>
</tr>
</tfoot>
</table>
</td>
</tr>
</table>
</form>
<?php js::set('replaceID', 'taskList')?>
<script language='javascript'>
$('#project<?php echo $projectID;?>').addClass('active')
$('#<?php echo $browseType;?>Tab').addClass('active')
-130
View File
@@ -1,130 +0,0 @@
<table class='table-1 fixed colored tablesorter datatable' id='taskList'>
<?php $vars = "projectID=$project->id&status=$status&parma=$param&orderBy=%s&recTotal=$recTotal&recPerPage=$recPerPage"; ?>
<thead>
<tr class='colhead'>
<th class='w-id'> <?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?></th>
<th class='w-pri'> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
<th class='w-p30'> <?php common::printOrderLink('name', $orderBy, $vars, $lang->task->name);?></th>
<th class='w-status'><?php common::printOrderLink('status', $orderBy, $vars, $lang->statusAB);?></th>
<th class='w-70px'> <?php common::printOrderLink('deadline', $orderBy, $vars, $lang->task->deadlineAB);?></th>
<?php if($this->cookie->windowWidth > $this->config->wideSize):?>
<th class='w-id'> <?php common::printOrderLink('openedDate', $orderBy, $vars, $lang->task->openedDateAB);?></th>
<?php endif;?>
<th class='w-user'> <?php common::printOrderLink('assignedTo', $orderBy, $vars, $lang->task->assignedToAB);?></th>
<th class='w-user'> <?php common::printOrderLink('finishedBy', $orderBy, $vars, $lang->task->finishedByAB);?></th>
<?php if($this->cookie->windowWidth > $this->config->wideSize):?>
<th class='w-40px'> <?php common::printOrderLink('finishedDate', $orderBy, $vars, $lang->task->finishedDateAB);?></th>
<?php endif;?>
<th class='w-35px'> <?php common::printOrderLink('estimate', $orderBy, $vars, $lang->task->estimateAB);?></th>
<th class='w-40px'> <?php common::printOrderLink('consumed', $orderBy, $vars, $lang->task->consumedAB);?></th>
<th class='w-40px'> <?php common::printOrderLink('left', $orderBy, $vars, $lang->task->leftAB);?></th>
<?php if($project->type == 'sprint') print '<th>' and common::printOrderLink('story', $orderBy, $vars, $lang->task->story) and print '</th>';?>
<th class='w-140px {sorter:false}'><?php echo $lang->actions;?></th>
</tr>
</thead>
<tbody>
<?php
$canBatchEdit = common::hasPriv('task', 'batchEdit');
$canBatchClose = common::hasPriv('task', 'batchClose') and strtolower($browseType) != 'closedBy';
?>
<?php foreach($tasks as $task):?>
<?php $class = $task->assignedTo == $app->user->account ? 'style=color:red' : ''; ?>
<tr class='a-center'>
<td>
<?php if($canBatchEdit or $canBatchClose):?>
<input type='checkbox' name='taskIDList[]' value='<?php echo $task->id;?>'/>
<?php endif;?>
<?php if(!common::printLink('task', 'view', "task=$task->id", sprintf('%03d', $task->id))) printf('%03d', $task->id);?>
</td>
<td><span class='<?php echo 'pri'. $lang->task->priList[$task->pri]?>'><?php echo $lang->task->priList[$task->pri];?></span></td>
<td class='a-left' title="<?php echo $task->name?>">
<?php
if(!common::printLink('task', 'view', "task=$task->id", $task->name)) echo $task->name;
if($task->fromBug) echo html::a($this->createLink('bug', 'view', "id=$task->fromBug"), "[BUG#$task->fromBug]", '_blank', "class='bug'");
?>
</td>
<td class=<?php echo $task->status;?> >
<?php
$storyChanged = ($task->storyStatus == 'active' and $task->latestStoryVersion > $task->storyVersion);
$storyChanged ? print("<span class='warning'>{$lang->story->changed}</span> ") : print($lang->task->statusList[$task->status]);
?>
</td>
<td class=<?php if(isset($task->delay)) echo 'delayed';?>><?php if(substr($task->deadline, 0, 4) > 0) echo substr($task->deadline, 5, 6);?></td>
<?php if($this->cookie->windowWidth > $this->config->wideSize):?>
<td><?php echo substr($task->openedDate, 5, 6);?></th>
<?php endif;?>
<td <?php echo $class;?>><?php echo $task->assignedTo == 'closed' ? 'Closed' : $task->assignedToRealName;?></td>
<td><?php echo $users[$task->finishedBy];?></td>
<?php if($this->cookie->windowWidth > $this->config->wideSize):?>
<td><?php echo substr($task->finishedDate, 5, 6);?></th>
<?php endif;?>
<td><?php echo $task->estimate;?></td>
<td><?php echo $task->consumed;?></td>
<td><?php echo $task->left;?></td>
<?php
if($project->type == 'sprint')
{
echo '<td class="a-left" title="' . $task->storyTitle . '"';
if($task->storyID)
{
if(!common::printLink('story', 'view', "storyid=$task->storyID", $task->storyTitle)) print $task->storyTitle;
}
echo '</td>';
}
?>
<td class='a-right'>
<?php
common::printIcon('task', 'assignTo', "projectID=$task->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', '', '', '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", '', 'list');
?>
</td>
</tr>
<?php endforeach;?>
</tbody>
<tfoot>
<tr>
<?php $columns = ($this->cookie->windowWidth > $this->config->wideSize ? 14 : 12) - ($project->type == 'sprint' ? 0 : 1);?>
<td colspan='<?php echo $columns;?>'>
<div class='f-left'>
<?php
if(count($tasks))
{
if($canBatchEdit or $canBatchClose) echo html::selectAll() . html::selectReverse();
if($canBatchEdit)
{
$actionLink = $this->createLink('task', 'batchEdit', "projectID=$projectID");
echo html::commonButton($lang->edit, "onclick=\"changeAction('projectTaskForm', 'batchEdit', '$actionLink')\"");
}
if($canBatchClose)
{
$actionLink = $this->createLink('task', 'batchClose');
echo html::commonButton($lang->close, "onclick=\"changeAction('projectTaskForm', 'batchClose', '$actionLink')\"");
}
}
echo $summary;
?>
</div>
<?php $pager->show();?>
</td>
</tr>
</tfoot>
</table>
+8 -2
View File
@@ -12,7 +12,9 @@
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/tablesorter.html.php';?>
<table align='center' class='table-5 tablesorter'>
<?php js::set('confirmUnlinkMember', $lang->project->confirmUnlinkMember)?>
<?php js::set('projectID', $project->id)?>
<table align='center' class='table-5 tablesorter' id='memberlist'>
<thead>
<tr class='colhead'>
<th><?php echo $lang->team->account;?></th>
@@ -40,7 +42,11 @@
<td><?php echo $member->days;?></td>
<td><?php echo $member->hours;?></td>
<td><?php echo $memberHours;?></td>
<td><?php common::printIcon('project', 'unlinkMember', "projectID=$project->id&account=$member->account", '', 'list', '', 'hiddenwin');?></td>
<td>
<?php
echo html::a("javascript:unlinkMember($project->id, \"$member->account\")", '&nbsp;', '', "class='icon-green-project-unlinkMember' title='{$lang->project->unlinkMember}'");
?>
</td>
</tr>
<?php endforeach;?>
</tbody>
+9 -1
View File
@@ -177,8 +177,16 @@ class release extends control
}
else
{
$response['result'] = 'success';
$response['message'] = '';
$this->release->delete(TABLE_RELEASE, $releaseID);
die(js::locate($this->session->releaseList, 'parent'));
if(dao::isError())
{
$response['result'] = 'fail';
$response['message'] = dao::getError();
}
$this->send($response);
}
}
+28
View File
@@ -0,0 +1,28 @@
/**
* Delete release.
*
* @param int releaseID
* @access public
* @return void
*/
function deleteRelease(releaseID)
{
if(confirm(confirmDelete))
{
url = createLink('release', 'delete','releaseID=' + releaseID + '&confrim=yes');
$.ajax(
{
type: 'GET',
url: url,
dataType: 'json',
success: function(data)
{
if(data.result == 'success')
{
url = createLink('release', 'browse', 'productID=' + productID);
$('.outer').load(url + ' #releaselist', function(){sortTable();});
}
}
});
}
}
+4 -2
View File
@@ -12,7 +12,9 @@
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/tablesorter.html.php';?>
<table align='center' class='table-6 tablesorter'>
<?php js::set('productID', $product->id)?>
<?php js::set('confirmDelete', $lang->release->confirmDelete)?>
<table align='center' class='table-6 tablesorter' id='releaselist'>
<caption class='caption-tl'>
<div class='f-left'><?php echo $lang->release->browse;?></div>
<div class='f-right'><?php common::printIcon('release', 'create', "product=$product->id");?></div>
@@ -36,7 +38,7 @@
<td class='a-center'>
<?php
common::printIcon('release', 'edit', "release=$release->id", '', 'list');
common::printIcon('release', 'delete', "release=$release->id", '', 'list', '', 'hiddenwin');
echo html::a("javascript:deleteRelease($release->id)", '&nbsp;', '', "class='icon-green-common-delete' title='{$lang->release->delete}'");
?>
</td>
</tr>
+1 -1
View File
@@ -91,7 +91,7 @@ class story extends control
break;
}
}
$users = $this->user->getPairs('nodeleted|pdfirst');
$users = $this->user->getPairs('nodeleted|pdfirst|noclosed');
$moduleOptionMenu = $this->tree->getOptionMenu($productID, $viewType = 'story');
/* Set menu. */
+6
View File
@@ -62,6 +62,7 @@ $lang->testcase->batchEdit = "Batch edit";
$lang->testcase->delete = "Delete";
$lang->testcase->browse = "Browse";
$lang->testcase->import = "Import";
$lang->testcase->importID = "Linenum";
$lang->testcase->showImport = "Show import";
$lang->testcase->exportTemplet = "Export templet";
$lang->testcase->export = "Export";
@@ -69,6 +70,11 @@ $lang->testcase->export = "Export";
$lang->testcase->confirmChange = 'Confirm case change';
$lang->testcase->confirmStoryChange = 'Confirm story change';
$lang->testcase->editHaved = 'Modify existing case';
$lang->testcase->addNew = 'Add new case';
$lang->testcase->num = 'The number of cases';
$lang->testcase->deleteStep = 'Delete';
$lang->testcase->insertBefore = 'Insert before';
$lang->testcase->insertAfter = 'Insert after';
+7 -1
View File
@@ -61,13 +61,19 @@ $lang->testcase->edit = "编辑";
$lang->testcase->batchEdit = "批量编辑 ";
$lang->testcase->delete = "删除";
$lang->testcase->browse = "用例列表";
$lang->testcase->import = "导入用例";
$lang->testcase->import = "导入";
$lang->testcase->importID = "行号";
$lang->testcase->showImport = "显示导入内容";
$lang->testcase->exportTemplet = "导出模板";
$lang->testcase->export = "导出";
$lang->testcase->confirmChange = '确认用例变动';
$lang->testcase->confirmStoryChange = '确认需求变动';
$lang->testcase->editHaved = '修改已有用例';
$lang->testcase->addNew = '添加新用例';
$lang->testcase->num = '导入用例个数:';
$lang->testcase->deleteStep = '删除';
$lang->testcase->insertBefore = '之前添加';
$lang->testcase->insertAfter = '之后添加';
+77 -2
View File
@@ -10,7 +10,6 @@
* @link http://www.zentao.net
*/
?>
<?php if(isset($_GET['ajax']) and $_GET['ajax'] == 'yes') die(include './caselist.html.php');?>
<?php
include '../../common/view/header.html.php';
include '../../common/view/datepicker.html.php';
@@ -54,7 +53,83 @@ js::set('moduleID' , $moduleID);
</td>
<td class='divider <?php echo $treeClass;?>'></td>
<td>
<?php include 'caselist.html.php';?>
<table class='table-1 colored tablesorter datatable fixed' id='caseList'>
<?php $vars = "productID=$productID&browseType=$browseType&param=$param&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}"; ?>
<thead>
<tr class='colhead'>
<th class='w-id'> <?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?></th>
<th class='w-pri'> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
<th> <?php common::printOrderLink('title', $orderBy, $vars, $lang->testcase->title);?></th>
<?php if($browseType == 'needconfirm'):?>
<th> <?php common::printOrderLink('story', $orderBy, $vars, $lang->testcase->story);?></th>
<th class='w-50px'><?php echo $lang->actions;?></th>
<?php else:?>
<th class='w-type'> <?php common::printOrderLink('type', $orderBy, $vars, $lang->typeAB);?></th>
<th class='w-user'> <?php common::printOrderLink('openedBy', $orderBy, $vars, $lang->openedByAB);?></th>
<th class='w-80px'> <?php common::printOrderLink('lastRunner', $orderBy, $vars, $lang->testtask->lastRunAccount);?></th>
<th class='w-120px'> <?php common::printOrderLink('lastRunDate', $orderBy, $vars, $lang->testtask->lastRunTime);?></th>
<th class='w-80px'> <?php common::printOrderLink('lastRunResult', $orderBy, $vars, $lang->testtask->lastRunResult);?></th>
<th class='w-status'><?php common::printOrderLink('status', $orderBy, $vars, $lang->statusAB);?></th>
<th class='w-150px {sorter:false}'><?php echo $lang->actions;?></th>
<?php endif;?>
</tr>
<?php
$canBatchEdit = common::hasPriv('testcase', 'batchEdit');
$canBatchRun = common::hasPriv('testtask', 'batchRun');
?>
<?php foreach($cases as $case):?>
<tr class='a-center'>
<?php $viewLink = inlink('view', "caseID=$case->id");?>
<td>
<?php if($canBatchEdit or $canBatchRun):?>
<input type='checkbox' name='caseIDList[]' value='<?php echo $case->id;?>'/>
<?php endif;?>
<?php echo html::a($viewLink, sprintf('%03d', $case->id));?>
</td>
<td><span class='<?php echo 'pri' . $case->pri?>'><?php echo $case->pri?></span></td>
<td class='a-left' title="<?php echo $case->title?>"><?php echo html::a($viewLink, $case->title);?></td>
<?php if($browseType == 'needconfirm'):?>
<td class='a-left'><?php echo html::a($this->createLink('story', 'view', "storyID=$case->story"), $case->storyTitle, '_blank');?></td>
<td><?php $lang->testcase->confirmStoryChange = $lang->confirm; common::printIcon('testcase', 'confirmStoryChange', "caseID=$case->id", '', 'list', '', 'hiddenwin');?></td>
<?php else:?>
<td><?php echo $lang->testcase->typeList[$case->type];?></td>
<td><?php echo $users[$case->openedBy];?></td>
<td><?php echo $users[$case->lastRunner];?></td>
<td><?php if(!helper::isZeroDate($case->lastRunDate)) echo date(DT_MONTHTIME1, strtotime($case->lastRunDate));?></td>
<td class='<?php echo $case->lastRunResult;?>'><?php if($case->lastRunResult) echo $lang->testcase->resultList[$case->lastRunResult];?></td>
<td class='<?php if(isset($run)) echo $run->status;?>'><?php echo $lang->testcase->statusList[$case->status];?></td>
<td class='a-right'>
<?php
common::printIcon('testtask', 'runCase', "runID=0&caseID=$case->id&version=$case->version", '', 'list', '', '', 'runCase');
common::printIcon('testtask', 'results', "runID=0&caseID=$case->id", '', 'list', '', '', 'results');
common::printIcon('testcase', 'edit', "caseID=$case->id", $case, 'list');
common::printIcon('testcase', 'create', "productID=$case->product&moduleID=$case->module&from=testcase&param=$case->id", $case, 'list', 'copy');
common::printIcon('testcase', 'delete', "caseID=$case->id", '', 'list', '', 'hiddenwin');
common::printIcon('testcase', 'createBug', "product=$case->product&extra=caseID=$case->id,version=$case->version,runID=", $case, 'list', 'createBug');
?>
</td>
<?php endif;?>
</tr>
<?php endforeach;?>
</thead>
<tfoot>
<tr>
<?php $mergeColums = $browseType == 'needconfirm' ? 5 : 10;?>
<td colspan='<?php echo $mergeColums?>'>
<?php if($cases):?>
<div class='f-left'>
<?php
if($canBatchEdit or $canBatchRun) echo html::selectAll() . html::selectReverse();
if($canBatchEdit) echo html::submitButton($lang->edit, "onclick='changeAction(\"" . inLink('batchEdit', "productID=$productID") . "\")'");
if($canBatchRun) echo html::submitButton($lang->testtask->runCase, "onclick='changeAction(\"" . $this->createLink('testtask', 'batchRun', "productID=$productID&orderBy=$orderBy") . "\")'");
?>
</div>
<?php endif?>
<?php $pager->show();?>
</td>
</tr>
</tfoot>
</table>
</td>
</tr>
</table>
-77
View File
@@ -1,77 +0,0 @@
<table class='table-1 colored tablesorter datatable fixed' id='caseList'>
<?php $vars = "productID=$productID&browseType=$browseType&param=$param&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}"; ?>
<thead>
<tr class='colhead'>
<th class='w-id'> <?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?></th>
<th class='w-pri'> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
<th> <?php common::printOrderLink('title', $orderBy, $vars, $lang->testcase->title);?></th>
<?php if($browseType == 'needconfirm'):?>
<th> <?php common::printOrderLink('story', $orderBy, $vars, $lang->testcase->story);?></th>
<th class='w-50px'><?php echo $lang->actions;?></th>
<?php else:?>
<th class='w-type'> <?php common::printOrderLink('type', $orderBy, $vars, $lang->typeAB);?></th>
<th class='w-user'> <?php common::printOrderLink('openedBy', $orderBy, $vars, $lang->openedByAB);?></th>
<th class='w-80px'> <?php common::printOrderLink('lastRunner', $orderBy, $vars, $lang->testtask->lastRunAccount);?></th>
<th class='w-120px'> <?php common::printOrderLink('lastRunDate', $orderBy, $vars, $lang->testtask->lastRunTime);?></th>
<th class='w-80px'> <?php common::printOrderLink('lastRunResult', $orderBy, $vars, $lang->testtask->lastRunResult);?></th>
<th class='w-status'><?php common::printOrderLink('status', $orderBy, $vars, $lang->statusAB);?></th>
<th class='w-150px {sorter:false}'><?php echo $lang->actions;?></th>
<?php endif;?>
</tr>
<?php
$canBatchEdit = common::hasPriv('testcase', 'batchEdit');
$canBatchRun = common::hasPriv('testtask', 'batchRun');
?>
<?php foreach($cases as $case):?>
<tr class='a-center'>
<?php $viewLink = inlink('view', "caseID=$case->id");?>
<td>
<?php if($canBatchEdit or $canBatchRun):?>
<input type='checkbox' name='caseIDList[]' value='<?php echo $case->id;?>'/>
<?php endif;?>
<?php echo html::a($viewLink, sprintf('%03d', $case->id));?>
</td>
<td><span class='<?php echo 'pri' . $case->pri?>'><?php echo $case->pri?></span></td>
<td class='a-left' title="<?php echo $case->title?>"><?php echo html::a($viewLink, $case->title);?></td>
<?php if($browseType == 'needconfirm'):?>
<td class='a-left'><?php echo html::a($this->createLink('story', 'view', "storyID=$case->story"), $case->storyTitle, '_blank');?></td>
<td><?php $lang->testcase->confirmStoryChange = $lang->confirm; common::printIcon('testcase', 'confirmStoryChange', "caseID=$case->id", '', 'list', '', 'hiddenwin');?></td>
<?php else:?>
<td><?php echo $lang->testcase->typeList[$case->type];?></td>
<td><?php echo $users[$case->openedBy];?></td>
<td><?php echo $users[$case->lastRunner];?></td>
<td><?php if(!helper::isZeroDate($case->lastRunDate)) echo date(DT_MONTHTIME1, strtotime($case->lastRunDate));?></td>
<td class='<?php echo $case->lastRunResult;?>'><?php if($case->lastRunResult) echo $lang->testcase->resultList[$case->lastRunResult];?></td>
<td class='<?php if(isset($run)) echo $run->status;?>'><?php echo $lang->testcase->statusList[$case->status];?></td>
<td class='a-right'>
<?php
common::printIcon('testtask', 'runCase', "runID=0&caseID=$case->id&version=$case->version", '', 'list', '', '', 'runCase');
common::printIcon('testtask', 'results', "runID=0&caseID=$case->id", '', 'list', '', '', 'results');
common::printIcon('testcase', 'edit', "caseID=$case->id", $case, 'list');
common::printIcon('testcase', 'create', "productID=$case->product&moduleID=$case->module&from=testcase&param=$case->id", $case, 'list', 'copy');
common::printIcon('testcase', 'delete', "caseID=$case->id", '', 'list', '', 'hiddenwin');
common::printIcon('testcase', 'createBug', "product=$case->product&extra=caseID=$case->id,version=$case->version,runID=", $case, 'list', 'createBug');
?>
</td>
<?php endif;?>
</tr>
<?php endforeach;?>
</thead>
<tfoot>
<tr>
<?php $mergeColums = $browseType == 'needconfirm' ? 5 : 10;?>
<td colspan='<?php echo $mergeColums?>'>
<?php if($cases):?>
<div class='f-left'>
<?php
if($canBatchEdit or $canBatchRun) echo html::selectAll() . html::selectReverse();
if($canBatchEdit) echo html::submitButton($lang->edit, "onclick='changeAction(\"" . inLink('batchEdit', "productID=$productID") . "\")'");
if($canBatchRun) echo html::submitButton($lang->testtask->runCase, "onclick='changeAction(\"" . $this->createLink('testtask', 'batchRun', "productID=$productID&orderBy=$orderBy") . "\")'");
?>
</div>
<?php endif?>
<?php $pager->show();?>
</td>
</tr>
</tfoot>
</table>
+2
View File
@@ -57,6 +57,7 @@
<table class='table-1'>
<caption class='caption-tl'><?php echo $lang->testcase->addNew?></caption>
<tr class='colhead'>
<th><?php echo $lang->testcase->importID?></th>
<th><?php echo $lang->testcase->title?></th>
<th><?php echo $lang->testcase->module?></th>
<th><?php echo $lang->testcase->story?></th>
@@ -77,6 +78,7 @@
</tr>
<?php foreach($caseData as $key => $case):?>
<tr valign='top' align='center'>
<td><?php echo $key + 1?></td>
<td><?php echo html::input("title[$key]", $case->title, "class='text-1' style='margin-top:2px'")?></td>
<td><?php echo html::select("module[$key]", $modules, isset($case->module) ? $case->module : '', "class='select-2'") . html::hidden("product[$key]", $productID)?></td>
<td><?php echo html::select("story[$key]", $stories, isset($case->story) ? $case->story : '', "class='select-2'")?></td>
+10 -1
View File
@@ -278,9 +278,18 @@ class todo extends control
}
else
{
$response['result'] = 'success';
$response['message'] = '';
$this->dao->delete()->from(TABLE_TODO)->where('id')->eq($todoID)->exec();
if(dao::isError())
{
$response['result'] = 'fail';
$response['message'] = dao::getError();
}
$this->loadModel('action')->create('todo', $todoID, 'erased');
die(js::locate($this->session->todoList, 'parent'));
$this->send($response);
}
}
+1 -1
View File
@@ -156,7 +156,7 @@ class webapp extends control
die(js::reload('parent'));
}
echo js::alert($this->lang->webapp->successInstall);
die(js::reload('parent.parent'));
die(js::closeColorbox('parent.parent'));
}
$this->view->title = $this->lang->webapp->common . $this->lang->colon . $this->lang->webapp->install;
+10 -1
View File
@@ -1,4 +1,13 @@
if($('a.iframe').size()) $("a.iframe").colorbox({width:450, height:190, iframe:true, transition:'none', scrolling:true});
if($('a.iframe').size())
{
$("a.iframe").colorbox({width:450, height:190, iframe:true, transition:'none', scrolling:true, onCleanup:function()
{
var selfClose = $.cookie('selfClose');
if(selfClose != 1) return;
$(this).replaceWith("<input type='button' value='" + installed + "' disabled='disabled' style='color:gray' class='button-c'>");
$.cookie('selfClose', 0);
}});
}
if($('a.webapp').size()) $("a.webapp").colorbox({width:700, height:400, iframe:true, transition:'none', scrolling:true});
if($('a.apiapp').size()) $("a.apiapp").colorbox({width:700, height:330, iframe:true, transition:'none', scrolling:true});
if($('a.popup').size()) $("a.popup").colorbox({width:900, height:600, iframe:true, transition:'none', scrolling:true});
+1
View File
@@ -84,6 +84,7 @@
</td>
</tr>
</table>
<?php js::set('installed', $lang->webapp->installed)?>
<script>
$('#<?php echo $type;?>').addClass('active')
$('#module<?php echo $moduleID;?>').addClass('active')
+3 -2
View File
@@ -794,9 +794,10 @@ function setModal4List(colorboxClass, replaceID, callback)
saveWindowSize();
var link = self.location.href;
$.get(link, {ajax:"yes"}, function(data)
$('#' + replaceID).wrap("<div id='tmpDiv'></div>");
$('#tmpDiv').load(link + ' #' + replaceID, function()
{
$('#' + replaceID).replaceWith(data);
$('#tmpDiv').replaceWith($('#tmpDiv').html());
setModal4List(colorboxClass, replaceID, callback);
$('.colored').colorize();