* Fix the product stories list page to display correct data.

This commit is contained in:
chentao
2023-05-24 14:53:58 +08:00
parent 1f096dbdc1
commit 7339cb35e5
4 changed files with 7 additions and 11 deletions
+1
View File
@@ -220,6 +220,7 @@ class product extends control
$this->view->modulePairs = $modulePairs;
$this->view->project = $project;
$this->view->recTotal = $pager->recTotal;
$this->view->isProjectStory = $isProjectStory;
$this->display();
}
+3
View File
@@ -0,0 +1,3 @@
window.footerGenerator = function(summary) {
return [{children: summary, className: "text-dark"}, "flex", "pager"];
}
+2 -10
View File
@@ -70,7 +70,7 @@ foreach($stories as $story)
}
}
useData('storyBrowseType', $storyBrowseType);
data('storyBrowseType', $storyBrowseType);
featureBar
(
@@ -116,14 +116,6 @@ toolbar
)))
);
js
(<<<JS
window.footerGenerator = function() {
return [{children: '{$summary}', className: "text-dark"}, "flex", "pager"];
}
JS
);
dtable
(
set::className('shadow rounded'),
@@ -131,7 +123,7 @@ dtable
set::data($data),
set::footPager(usePager()),
set::nested(true),
set::footer(jsRaw('function(){return window.footerGenerator.call(this);}'))
set::footer(jsRaw("function(){return window.footerGenerator.call(this, '{$summary}');}"))
);
render();
+1 -1
View File
@@ -20,6 +20,7 @@ body {margin-bottom: 25px;}
.assignedTo{border-radius: 4px !important;}
</style>
<?php
$this->loadModel('story');
$lang->story->createCommon = $storyType == 'story' ? $lang->story->createStory : $lang->story->createRequirement;
$unfoldStories = isset($config->product->browse->unfoldStories) ? json_decode($config->product->browse->unfoldStories, true) : array();
$unfoldStories = zget($unfoldStories, $productID, array());
@@ -313,7 +314,6 @@ js::set('vision', $this->config->vision);
$canBatchAssignTo = ($canBeChanged and common::hasPriv($storyType, 'batchAssignTo'));
$canBatchUnlink = ($canBeChanged and $projectHasProduct and common::hasPriv('projectstory', 'batchUnlinkStory'));
$canBatchImportToLib = ($canBeChanged and $isProjectStory and isset($this->config->maxVersion) and common::hasPriv('story', 'batchImportToLib') and helper::hasFeature('storylib'));
$canBatchAction = ($canBatchEdit or $canBatchClose or $canBatchReview or $canBatchChangeStage or $canBatchChangeModule or $canBatchChangePlan or $canBatchAssignTo or $canBatchUnlink or $canBatchImportToLib or $canBatchChangeBranch);
?>
<?php if(!$useDatatable) echo '<div class="table-responsive">';?>