* add link when export to html.
This commit is contained in:
@@ -991,6 +991,7 @@ class bug extends control
|
||||
|
||||
$this->post->set('fields', $fields);
|
||||
$this->post->set('rows', $bugs);
|
||||
$this->post->set('kind', 'bug');
|
||||
$this->fetch('file', 'export2' . $this->post->fileType, $_POST);
|
||||
}
|
||||
|
||||
|
||||
@@ -158,6 +158,33 @@ class file extends control
|
||||
{
|
||||
$this->view->fields = $this->post->fields;
|
||||
$this->view->rows = $this->post->rows;
|
||||
switch($this->post->kind)
|
||||
{
|
||||
case 'task':
|
||||
foreach($this->view->rows as $row)
|
||||
{
|
||||
$row->name = html::a('http://' . $_SERVER['HTTP_HOST'] . $this->createLink('task', 'view', "taskID=$row->id"), $row->name);
|
||||
}
|
||||
break;
|
||||
case 'story':
|
||||
foreach($this->view->rows as $row)
|
||||
{
|
||||
$row->title= html::a('http://' . $_SERVER['HTTP_HOST'] . $this->createLink('story', 'view', "storyID=$row->id"), $row->title);
|
||||
}
|
||||
break;
|
||||
case 'bug':
|
||||
foreach($this->view->rows as $row)
|
||||
{
|
||||
$row->title= html::a('http://' . $_SERVER['HTTP_HOST'] . $this->createLink('bug', 'view', "bugID=$row->id"), $row->title);
|
||||
}
|
||||
break;
|
||||
case 'testcase':
|
||||
foreach($this->view->rows as $row)
|
||||
{
|
||||
$row->title= html::a('http://' . $_SERVER['HTTP_HOST'] . $this->createLink('testcase', 'view', "caseID=$row->id"), $row->title);
|
||||
}
|
||||
break;
|
||||
}
|
||||
$this->view->fileName = $this->post->fileName;
|
||||
$output = $this->parse('file', 'export2Html');
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ table, th, td{font-size:12px; border:1px solid gray; border-collapse:collapse;}
|
||||
<tr>
|
||||
<?php
|
||||
foreach($fields as $fieldLabel)
|
||||
{
|
||||
{
|
||||
echo "<th><nobr>$fieldLabel</nobr></th>\n";
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -903,6 +903,7 @@ class story extends control
|
||||
|
||||
$this->post->set('fields', $fields);
|
||||
$this->post->set('rows', $stories);
|
||||
$this->post->set('kind', 'story');
|
||||
$this->fetch('file', 'export2' . $this->post->fileType, $_POST);
|
||||
}
|
||||
|
||||
|
||||
@@ -813,6 +813,7 @@ class task extends control
|
||||
|
||||
$this->post->set('fields', $fields);
|
||||
$this->post->set('rows', $tasks);
|
||||
$this->post->set('kind', 'task');
|
||||
$this->fetch('file', 'export2' . $this->post->fileType, $_POST);
|
||||
}
|
||||
|
||||
|
||||
@@ -549,6 +549,7 @@ class testcase extends control
|
||||
|
||||
$this->post->set('fields', $fields);
|
||||
$this->post->set('rows', $cases);
|
||||
$this->post->set('kind', 'testcase');
|
||||
$this->fetch('file', 'export2' . $this->post->fileType, $_POST);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user