* Modify the file name when export requirement.
This commit is contained in:
@@ -105,7 +105,7 @@ $lang->story->createCommon = $storyType == 'story' ? $lang->story->createStory :
|
||||
$openModule = $this->app->rawModule == 'projectstory' ? 'project' : 'product';
|
||||
$class = common::hasPriv('story', 'export') ? '' : "class=disabled";
|
||||
$misc = common::hasPriv('story', 'export') ? "class='export' data-group='$openModule'" : "class=disabled";
|
||||
$link = common::hasPriv('story', 'export') ? $this->createLink('story', 'export', "productID=$productID&orderBy=$orderBy&projectID=0&browseType=$browseType") : '#';
|
||||
$link = common::hasPriv('story', 'export') ? $this->createLink('story', 'export', "productID=$productID&orderBy=$orderBy&projectID=0&browseType=$browseType&type=$storyType") : '#';
|
||||
echo "<li $class>" . html::a($link, $lang->story->export, '', $misc) . "</li>";
|
||||
?>
|
||||
</ul>
|
||||
|
||||
@@ -1761,10 +1761,11 @@ class story extends control
|
||||
* @param string $orderBy
|
||||
* @param int $projectID
|
||||
* @param string $browseType
|
||||
* @param string $type requirement|story
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function export($productID, $orderBy, $projectID = 0, $browseType = '')
|
||||
public function export($productID, $orderBy, $projectID = 0, $browseType = '', $type = 'story')
|
||||
{
|
||||
/* format the fields of every story in order to export data. */
|
||||
if($_POST)
|
||||
@@ -2003,7 +2004,7 @@ class story extends control
|
||||
$this->fetch('file', 'export2' . $this->post->fileType, $_POST);
|
||||
}
|
||||
|
||||
$fileName = $this->lang->story->common;
|
||||
$fileName = $type == 'requirement' ? $this->lang->URCommon : $this->lang->SRCommon;
|
||||
if($projectID)
|
||||
{
|
||||
$projectName = $this->dao->findById($projectID)->from(TABLE_PROJECT)->fetch('name');
|
||||
|
||||
Reference in New Issue
Block a user