* finish task #3009.
This commit is contained in:
@@ -24,6 +24,15 @@ class testreportModel extends model
|
||||
{
|
||||
$this->loadModel('product')->setMenu($products, $productID, $branch);
|
||||
$selectHtml = $this->product->select($products, $productID, 'testreport', 'browse', '', $branch);
|
||||
|
||||
/* Remove branch. */
|
||||
if(strpos($selectHtml, 'currentBranch') !== false)
|
||||
{
|
||||
$selectHtml = substr($selectHtml, 0, strpos($selectHtml, 'currentBranch'));
|
||||
$selectHtml = substr($selectHtml, 0, strrpos($selectHtml, '<'));
|
||||
if(strpos($selectHtml, '</li>') !== false) $selectHtml = substr($selectHtml, 0, strrpos($selectHtml, '</li>'));
|
||||
}
|
||||
|
||||
foreach($this->lang->testtask->menu as $key => $value)
|
||||
{
|
||||
$replace = ($key == 'product') ? $selectHtml : $productID;
|
||||
|
||||
@@ -11,53 +11,51 @@
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div class='container mw-1400px'>
|
||||
<div id='titlebar'>
|
||||
<div class='heading'>
|
||||
<strong><?php echo $lang->testreport->browse;?></strong>
|
||||
</div>
|
||||
<div id='titlebar'>
|
||||
<div class='heading'>
|
||||
<strong><?php echo $lang->testreport->browse;?></strong>
|
||||
</div>
|
||||
<table class='table table-condensed table-hover table-striped tablesorter table-fixed table-selectable' id='reportList'>
|
||||
<?php $vars = "objectID=$objectID&objectType=$objectType&extra=$extra&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}";?>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='w-id'> <?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?></th>
|
||||
<th> <?php common::printOrderLink('title', $orderBy, $vars, $lang->testreport->title);?></th>
|
||||
<th class='w-user'> <?php common::printOrderLink('createdBy', $orderBy, $vars, $lang->openedByAB);?></th>
|
||||
<th class='w-120px'><?php common::printOrderLink('createdDate', $orderBy, $vars, $lang->testreport->createdDate);?></th>
|
||||
<th class='w-250px'><?php common::printOrderLink('project', $orderBy, $vars, $lang->testreport->project);?></th>
|
||||
<th class='w-250px'><?php echo $lang->testreport->testtask;?></th>
|
||||
<th class='w-50px'> <?php echo $lang->actions;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<?php if($reports):?>
|
||||
<tbody class='text-center'>
|
||||
<?php foreach($reports as $report):?>
|
||||
<tr>
|
||||
<td><?php echo $report->id?></td>
|
||||
<td class='text-left' title='<?php $report->title?>'><?php echo html::a(inlink('view', "reportID=$report->id&from=$objectType"), $report->title)?></td>
|
||||
<td><?php echo zget($users, $report->createdBy);?></td>
|
||||
<td><?php echo substr($report->createdDate, 2);?></td>
|
||||
<?php $projectName = '#' . $report->project . $projects[$report->project];?>
|
||||
<td class='text-left' title='<?php echo $projectName?>'><?php echo $projectName;?></td>
|
||||
<?php
|
||||
$taskName = '';
|
||||
foreach(explode(',', $report->tasks) as $taskID) $taskName .= '#' . $taskID . $tasks[$taskID] . ' ';
|
||||
?>
|
||||
<td class='text-left' title='<?php echo $taskName?>'><?php echo $taskName;?></td>
|
||||
<td>
|
||||
<?php
|
||||
common::printIcon('testreport', 'edit', "id=$report->id", '', 'list');
|
||||
common::printIcon('testreport', 'delete', "id=$report->id", '', 'list', 'remove', 'hiddenwin');
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
<tfoot><tr><td colspan='7'><?php $pager->show();?></td></tr></tfoot>
|
||||
<?php else:?>
|
||||
<tbody><tr><td colspan='7'><?php echo $lang->testreport->noReport;?></td></tr></tbody>
|
||||
<?php endif;?>
|
||||
</table>
|
||||
</div>
|
||||
<table class='table table-condensed table-hover table-striped tablesorter table-fixed table-selectable' id='reportList'>
|
||||
<?php $vars = "objectID=$objectID&objectType=$objectType&extra=$extra&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}";?>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='w-id'> <?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?></th>
|
||||
<th> <?php common::printOrderLink('title', $orderBy, $vars, $lang->testreport->title);?></th>
|
||||
<th class='w-user'> <?php common::printOrderLink('createdBy', $orderBy, $vars, $lang->openedByAB);?></th>
|
||||
<th class='w-120px'><?php common::printOrderLink('createdDate', $orderBy, $vars, $lang->testreport->createdDate);?></th>
|
||||
<th class='w-250px'><?php common::printOrderLink('project', $orderBy, $vars, $lang->testreport->project);?></th>
|
||||
<th class='w-250px'><?php echo $lang->testreport->testtask;?></th>
|
||||
<th class='w-50px'> <?php echo $lang->actions;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<?php if($reports):?>
|
||||
<tbody class='text-center'>
|
||||
<?php foreach($reports as $report):?>
|
||||
<tr>
|
||||
<td><?php echo $report->id?></td>
|
||||
<td class='text-left' title='<?php $report->title?>'><?php echo html::a(inlink('view', "reportID=$report->id&from=$objectType"), $report->title)?></td>
|
||||
<td><?php echo zget($users, $report->createdBy);?></td>
|
||||
<td><?php echo substr($report->createdDate, 2);?></td>
|
||||
<?php $projectName = '#' . $report->project . $projects[$report->project];?>
|
||||
<td class='text-left' title='<?php echo $projectName?>'><?php echo $projectName;?></td>
|
||||
<?php
|
||||
$taskName = '';
|
||||
foreach(explode(',', $report->tasks) as $taskID) $taskName .= '#' . $taskID . $tasks[$taskID] . ' ';
|
||||
?>
|
||||
<td class='text-left' title='<?php echo $taskName?>'><?php echo $taskName;?></td>
|
||||
<td>
|
||||
<?php
|
||||
common::printIcon('testreport', 'edit', "id=$report->id", '', 'list');
|
||||
common::printIcon('testreport', 'delete', "id=$report->id", '', 'list', 'remove', 'hiddenwin');
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
<tfoot><tr><td colspan='7'><?php $pager->show();?></td></tr></tfoot>
|
||||
<?php else:?>
|
||||
<tbody><tr><td colspan='7'><?php echo $lang->testreport->noReport;?></td></tr></tbody>
|
||||
<?php endif;?>
|
||||
</table>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
Reference in New Issue
Block a user