+ Added $().toggle() into project/view/task.html.php, bug/view/browse.html.php, testcase/view/browse.html.php, and product/view/browse.html.php for task #453. * Modified function story() in project/control.php, and function getProjectStories() in module/story/model.php. Changed the file project/view/story.html.php.
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
var browseType = '<?php echo $browseType;?>';
|
||||
var moduleID = '<?php echo $moduleID;?>';
|
||||
var customed = <?php echo (int)$customed;?>;
|
||||
|
||||
</script>
|
||||
|
||||
<div id='featurebar'>
|
||||
@@ -36,6 +37,12 @@ var customed = <?php echo (int)$customed;?>;
|
||||
echo "<span id='bysearchTab' onclick=\"browseBySearch('$browseType')\"><a href='#'>{$lang->bug->byQuery}</a></span> ";
|
||||
?>
|
||||
</div>
|
||||
<script language='Javascript'>
|
||||
$("#bysearchTab").toggle(
|
||||
function(){$("#querybox").show(); $("#sidetable").hide(); },
|
||||
function(){$("#querybox").hide(); $("#sidetable").show(); }
|
||||
);
|
||||
</script>
|
||||
<div class='f-right'>
|
||||
<?php common::printLink('bug', 'customFields', '', $lang->bug->customFields, '', "class='iframe'"); ?>
|
||||
<?php echo html::export2csv($lang->exportCSV, $lang->setFileName);?>
|
||||
@@ -49,7 +56,7 @@ var customed = <?php echo (int)$customed;?>;
|
||||
|
||||
<table class='cont-lt1'>
|
||||
<tr valign='top'>
|
||||
<td class='side <?php echo $treeClass;?>' id='treebox'>
|
||||
<td id='sidetable' class='side <?php echo $treeClass;?>' id='treebox'>
|
||||
<div class='box-title'><?php echo $productName;?></div>
|
||||
<div class='box-content'>
|
||||
<?php echo $moduleTree;?>
|
||||
|
||||
@@ -20,6 +20,11 @@
|
||||
<span id='allTab'><?php echo html::a($this->createLink('product', 'browse', "productID=$productID&browseType=all¶m=0&orderBy=$orderBy&recTotal=0&recPerPage=200"), $lang->product->allStory);?></span>
|
||||
<span id='bysearchTab' onclick='search("<?php echo $browseType;?>")'><a href='#'><?php echo $lang->product->searchStory;?></a></span>
|
||||
</div>
|
||||
<script language='Javascript'>
|
||||
$("#bysearchTab").toggle(
|
||||
function(){ $("#querybox").show(); $("#sidetable").hide();},
|
||||
function(){ $("#querybox").hide(); $("#sidetable").show();} );
|
||||
</script>
|
||||
<div class='f-right'>
|
||||
<?php echo html::export2csv($lang->exportCSV, $lang->setFileName);?>
|
||||
<?php common::printLink('story', 'report', "productID=$productID&browseType=$browseType&moduleID=$moduleID", $lang->story->report->common); ?>
|
||||
@@ -30,7 +35,7 @@
|
||||
|
||||
<table class='cont-lt1'>
|
||||
<tr valign='top'>
|
||||
<td class='side <?php echo $treeClass;?>' id='treebox'>
|
||||
<td id='sidetable'class='side <?php echo $treeClass;?>' id='treebox'>
|
||||
<div class='box-title'><?php echo $productName;?></div>
|
||||
<div class='box-content'>
|
||||
<?php echo $moduleTree;?>
|
||||
|
||||
@@ -295,7 +295,7 @@ class project extends control
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function story($projectID = 0)
|
||||
public function story($projectID = 0, $orderBy = 'status_asc,id_desc')
|
||||
{
|
||||
/* Load these models. */
|
||||
$this->loadModel('story');
|
||||
@@ -313,7 +313,7 @@ class project extends control
|
||||
$position[] = $this->lang->project->story;
|
||||
|
||||
/* The pager. */
|
||||
$stories = $this->story->getProjectStories($projectID);
|
||||
$stories = $this->story->getProjectStories($projectID,$orderBy);
|
||||
$storyTasks = $this->task->getStoryTaskCounts(array_keys($stories), $projectID);
|
||||
$users = $this->user->getPairs('noletter');
|
||||
|
||||
@@ -321,6 +321,7 @@ class project extends control
|
||||
$this->view->header = $header;
|
||||
$this->view->position = $position;
|
||||
$this->view->stories = $stories;
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->storyTasks = $storyTasks;
|
||||
$this->view->tabID = 'story';
|
||||
$this->view->users = $users;
|
||||
|
||||
@@ -20,13 +20,13 @@
|
||||
<thead>
|
||||
<tr class='colhead'>
|
||||
<?php $vars = "projectID={$project->id}&orderBy=%s&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-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-100px {sorter:false}'><?php echo $lang->actions;?></th>
|
||||
</tr>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
*/
|
||||
?>
|
||||
<?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 tablesorter fixed'>
|
||||
<caption class='caption-tl'>
|
||||
<div class='f-left'><?php echo $lang->project->story;?></div>
|
||||
@@ -21,16 +21,17 @@
|
||||
</caption>
|
||||
<thead>
|
||||
<tr class='colhead'>
|
||||
<th class='w-id'><?php echo $lang->idAB;?></th>
|
||||
<th class='w-pri'><?php echo $lang->priAB;?></th>
|
||||
<th><?php echo $lang->story->title;?></th>
|
||||
<th class='w-user'><?php echo $lang->openedByAB;?></th>
|
||||
<th class='w-user'><?php echo $lang->assignedToAB;?></th>
|
||||
<th class='w-hour'><?php echo $lang->story->estimateAB;?></th>
|
||||
<th class='w-status'><?php echo $lang->statusAB;?></th>
|
||||
<th class='w-status'><?php echo $lang->story->stageAB;?></th>
|
||||
<th class='w-50px'><?php echo $lang->story->taskCount;?></th>
|
||||
<th class='w-100px'><?php echo $lang->actions;?></th>
|
||||
<?php $vars = "projectID={$project->id}&orderBy=%s"; ?>
|
||||
<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->story->title);?></th>
|
||||
<th class='w-user'> <?php common::printOrderLink('openedBy', $orderBy, $vars, $lang->openedByAB);?></th>
|
||||
<th class='w-hour'> <?php common::printOrderLink('assignedTo', $orderBy, $vars, $lang->assignedToAB);?></th>
|
||||
<th class='w-hour'> <?php common::printOrderLink('estimate', $orderBy, $vars, $lang->story->estimateAB);?></th>
|
||||
<th class='w-hour'> <?php common::printOrderLink('status', $orderBy, $vars, $lang->statusAB);?></th>
|
||||
<th class='w-status'> <?php common::printOrderLink('stage', $orderBy, $vars, $lang->story->stageAB);?></th>
|
||||
<th class='w-50px'> <?php common::printOrderLink('status', $orderBy, $vars, $lang->story->taskCount);?></th>
|
||||
<th class='w-100px'> <?php common::printOrderLink('stage', $orderBy, $vars, $lang->actions);?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
@@ -16,6 +16,9 @@
|
||||
<?php include './taskheader.html.php';?>
|
||||
<script language='Javascript'>
|
||||
var browseType = '<?php echo $browseType;?>';
|
||||
$("#bysearchTab").toggle(
|
||||
function(){$("#querybox").show();},
|
||||
function(){$("#querybox").hide();} );
|
||||
</script>
|
||||
<div id='querybox' class='<?php if($browseType !='bysearch') echo 'hidden';?>'><?php echo $searchForm;?></div>
|
||||
<table class='table-1 fixed colored tablesorter datatable'>
|
||||
|
||||
@@ -510,13 +510,13 @@ class storyModel extends model
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getProjectStories($projectID = 0)
|
||||
public function getProjectStories($projectID = 0, $orderBy = 'status_asc,id_desc')
|
||||
{
|
||||
return $this->dao->select('t1.*, t2.*')->from(TABLE_PROJECTSTORY)->alias('t1')
|
||||
->leftJoin(TABLE_STORY)->alias('t2')->on('t1.story = t2.id')
|
||||
->where('t1.project')->eq((int)$projectID)
|
||||
->andWhere('t2.deleted')->eq(0)
|
||||
->orderBy('t2.pri')
|
||||
->orderBy($orderBy)
|
||||
->fetchAll('id');
|
||||
}
|
||||
|
||||
|
||||
@@ -28,6 +28,13 @@ var moduleID = '<?php echo $moduleID;?>';
|
||||
echo "<span id='bysearchTab' onclick=\"browseBySearch('$browseType')\"><a href='#'>{$lang->testcase->bySearch}</a></span> ";
|
||||
?>
|
||||
</div>
|
||||
<script language='Javascript'>
|
||||
$("#bysearchTab").
|
||||
toggle(
|
||||
function(){$("#querybox").show(); $("#sidetable").hide(); },
|
||||
function(){$("#querybox").hide(); $("#sidetable").show(); }
|
||||
);
|
||||
</script>
|
||||
<div class='f-right'>
|
||||
<?php echo html::export2csv($lang->exportCSV, $lang->setFileName);?>
|
||||
<?php common::printLink('testcase', 'create', "productID=$productID&moduleID=$moduleID", $lang->testcase->create); ?>
|
||||
@@ -37,7 +44,7 @@ var moduleID = '<?php echo $moduleID;?>';
|
||||
|
||||
<table class='cont-lt1'>
|
||||
<tr valign='top'>
|
||||
<td class='side <?php echo $treeClass;?>'>
|
||||
<td id='sidetable' class='side <?php echo $treeClass;?>'>
|
||||
<div class='box-title'><?php echo $productName;?></div>
|
||||
<div class='box-content'>
|
||||
<?php echo $moduleTree;?>
|
||||
|
||||
Reference in New Issue
Block a user