Merge branch 'master' of github.com:easysoft/zentaopms
This commit is contained in:
+14
-1
@@ -1421,10 +1421,11 @@ class bug extends control
|
||||
*
|
||||
* @param string $productID
|
||||
* @param string $orderBy
|
||||
* @param string $browseType
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function export($productID, $orderBy)
|
||||
public function export($productID, $orderBy, $browseType = '')
|
||||
{
|
||||
if($_POST)
|
||||
{
|
||||
@@ -1603,6 +1604,18 @@ class bug extends control
|
||||
$this->fetch('file', 'export2' . $this->post->fileType, $_POST);
|
||||
}
|
||||
|
||||
$fileName = $this->lang->bug->common;
|
||||
$productName = $this->dao->findById($productID)->from(TABLE_PRODUCT)->fetch('name');
|
||||
if(isset($this->lang->bug->featureBar['browse'][$browseType]))
|
||||
{
|
||||
$browseType = $this->lang->bug->featureBar['browse'][$browseType];
|
||||
}
|
||||
else
|
||||
{
|
||||
$browseType = $this->lang->bug->moreSelects[$browseType];
|
||||
}
|
||||
|
||||
$this->view->fileName = $productName . $this->lang->dash . $browseType . $fileName;
|
||||
$this->view->allExportFields = $this->config->bug->list->exportFields;
|
||||
$this->view->customExport = true;
|
||||
$this->display();
|
||||
|
||||
@@ -129,7 +129,7 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow
|
||||
</button>
|
||||
<ul class='dropdown-menu' id='exportActionMenu'>
|
||||
<?php
|
||||
$link = $this->createLink('bug', 'export', "productID=$productID&orderBy=$orderBy");
|
||||
$link = $this->createLink('bug', 'export', "productID=$productID&orderBy=$orderBy&browseType=$browseType");
|
||||
echo "<li>" . html::a($link, $lang->bug->export, '', "class='export'") . "</li>";
|
||||
?>
|
||||
</ul>
|
||||
|
||||
@@ -18,6 +18,7 @@ $lang->downArrow = '↓';
|
||||
$lang->null = 'null';
|
||||
$lang->ellipsis = '…';
|
||||
$lang->percent = '%';
|
||||
$lang->dash = '-';
|
||||
|
||||
$lang->zentaoPMS = 'ZenTao';
|
||||
$lang->welcome = "%s PMS";
|
||||
|
||||
@@ -18,6 +18,7 @@ $lang->downArrow = '↓';
|
||||
$lang->null = '空';
|
||||
$lang->ellipsis = '…';
|
||||
$lang->percent = '%';
|
||||
$lang->dash = '-';
|
||||
|
||||
$lang->zentaoPMS = '禅道';
|
||||
$lang->welcome = "%s项目管理系统";
|
||||
|
||||
@@ -156,7 +156,7 @@ if($isCustomExport)
|
||||
<tbody>
|
||||
<tr>
|
||||
<th><?php echo $lang->file->fileName;?></th>
|
||||
<td class="w-300px"><?php echo html::input('fileName', '', "class='form-control' autofocus autocomplete='off' placeholder='{$lang->file->untitled}'");?></td>
|
||||
<td class="w-300px"><?php echo html::input('fileName', isset($fileName) ? $fileName : '', "class='form-control' autofocus autocomplete='off' placeholder='{$lang->file->untitled}'");?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@@ -97,7 +97,7 @@
|
||||
<ul class="dropdown-menu" id='exportActionMenu'>
|
||||
<?php
|
||||
$misc = common::hasPriv('story', 'export') ? "class='export'" : "class=disabled";
|
||||
$link = common::hasPriv('story', 'export') ? $this->createLink('story', 'export', "productID=$productID&orderBy=$orderBy") : '#';
|
||||
$link = common::hasPriv('story', 'export') ? $this->createLink('story', 'export', "productID=$productID&orderBy=$orderBy&projectID=0&browseType=$browseType") : '#';
|
||||
echo "<li>" . html::a($link, $lang->story->export, '', $misc) . "</li>";
|
||||
?>
|
||||
</ul>
|
||||
|
||||
@@ -1370,10 +1370,11 @@ class story extends control
|
||||
* @param int $productID
|
||||
* @param string $orderBy
|
||||
* @param int $projectID
|
||||
* @param string $browseType
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function export($productID, $orderBy, $projectID = 0)
|
||||
public function export($productID, $orderBy, $projectID = 0, $browseType = '')
|
||||
{
|
||||
/* format the fields of every story in order to export data. */
|
||||
if($_POST)
|
||||
@@ -1582,6 +1583,28 @@ class story extends control
|
||||
$this->fetch('file', 'export2' . $this->post->fileType, $_POST);
|
||||
}
|
||||
|
||||
$fileName = $this->lang->story->common;
|
||||
if($projectID)
|
||||
{
|
||||
$projectName = $this->dao->findById($projectID)->from(TABLE_PROJECT)->fetch('name');
|
||||
$fileName = $projectName . $this->lang->dash . $fileName;
|
||||
}
|
||||
else
|
||||
{
|
||||
$productName = $this->dao->findById($productID)->from(TABLE_PRODUCT)->fetch('name');
|
||||
if(isset($this->lang->product->featureBar['browse'][$browseType]))
|
||||
{
|
||||
$browseType = $this->lang->product->featureBar['browse'][$browseType];
|
||||
}
|
||||
else
|
||||
{
|
||||
$browseType = isset($this->lang->product->moreSelects[$browseType]) ? $this->lang->product->moreSelects[$browseType] : '';
|
||||
}
|
||||
|
||||
$fileName = $productName . $this->lang->dash . $browseType . $fileName;
|
||||
}
|
||||
|
||||
$this->view->fileName = $fileName;
|
||||
$this->view->allExportFields = $this->config->story->list->exportFields;
|
||||
$this->view->customExport = true;
|
||||
$this->display();
|
||||
|
||||
@@ -1431,6 +1431,19 @@ class task extends control
|
||||
$this->fetch('file', 'export2' . $this->post->fileType, $_POST);
|
||||
}
|
||||
|
||||
$this->app->loadLang('project');
|
||||
$fileName = $this->lang->task->common;
|
||||
$projectName = $this->dao->findById($projectID)->from(TABLE_PROJECT)->fetch('name');
|
||||
if(isset($this->lang->project->featureBar['task'][$type]))
|
||||
{
|
||||
$browseType = $this->lang->project->featureBar['task'][$type];
|
||||
}
|
||||
else
|
||||
{
|
||||
$browseType = isset($this->lang->project->statusSelects[$type]) ? $this->lang->project->statusSelects[$type] : '';
|
||||
}
|
||||
|
||||
$this->view->fileName = $projectName . $this->lang->dash . $browseType . $fileName;
|
||||
$this->view->allExportFields = $allExportFields;
|
||||
$this->view->customExport = true;
|
||||
$this->view->orderBy = $orderBy;
|
||||
|
||||
@@ -1009,10 +1009,11 @@ class testcase extends control
|
||||
* @param int $productID
|
||||
* @param string $orderBy
|
||||
* @param int $taskID
|
||||
* @param string $browseType
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function export($productID, $orderBy, $taskID = 0)
|
||||
public function export($productID, $orderBy, $taskID = 0, $browseType = '')
|
||||
{
|
||||
$product = $this->loadModel('product')->getById($productID);
|
||||
if($product->type != 'normal') $this->lang->testcase->branch = $this->lang->product->branchName[$product->type];
|
||||
@@ -1192,6 +1193,11 @@ class testcase extends control
|
||||
$this->fetch('file', 'export2' . $this->post->fileType, $_POST);
|
||||
}
|
||||
|
||||
$fileName = $this->lang->testcase->common;
|
||||
$productName = $this->dao->findById($productID)->from(TABLE_PRODUCT)->fetch('name');
|
||||
$browseType = isset($this->lang->testcase->featureBar['browse'][$browseType]) ? $this->lang->testcase->featureBar['browse'][$browseType] : '';
|
||||
|
||||
$this->view->fileName = $productName . $this->lang->dash . $browseType . $fileName;
|
||||
$this->view->allExportFields = $this->config->testcase->exportFields;
|
||||
$this->view->customExport = true;
|
||||
$this->display();
|
||||
|
||||
@@ -125,7 +125,7 @@
|
||||
<ul class='dropdown-menu' id='exportActionMenu'>
|
||||
<?php
|
||||
$misc = common::hasPriv('testcase', 'export') ? "class='export'" : "class=disabled";
|
||||
$link = common::hasPriv('testcase', 'export') ? $this->createLink('testcase', 'export', "productID=$productID&orderBy=$orderBy") : '#';
|
||||
$link = common::hasPriv('testcase', 'export') ? $this->createLink('testcase', 'export', "productID=$productID&orderBy=$orderBy&taskID=0&browseType=$browseType") : '#';
|
||||
echo "<li>" . html::a($link, $lang->testcase->export, '', $misc) . "</li>";
|
||||
|
||||
$misc = common::hasPriv('testcase', 'exportTemplet') ? "class='export'" : "class=disabled";
|
||||
|
||||
Reference in New Issue
Block a user