diff --git a/module/pivot/control.php b/module/pivot/control.php index 4dae1bab5d..5469c3e4a2 100644 --- a/module/pivot/control.php +++ b/module/pivot/control.php @@ -71,16 +71,20 @@ class pivot extends control * 透视表版本列表。 * Show versions of a pivot. * + * @param int $groupID * @param int $pivotID * @param string $version * @access public * @return void */ - public function versions(int $pivotID, string $version = 'newest') + public function versions(int $groupID, int $pivotID, string $version = 'newest') { + $pivot = $this->pivot->getByID($pivotID); + $this->pivotZen->show($groupID, $pivotID, '', $version); + $this->view->versionSpecs = $this->pivot->getPivotVersions($pivotID); $this->view->version = $version == 'newest' ? $this->pivot->getMaxVersion($pivotID) : $version; - $this->view->pivot = $this->pivot->getByID($pivotID); + $this->view->pivot = $pivot; $this->display(); } diff --git a/module/pivot/ui/versions.html.php b/module/pivot/ui/versions.html.php index e6ce4eb174..7eff4cda23 100644 --- a/module/pivot/ui/versions.html.php +++ b/module/pivot/ui/versions.html.php @@ -9,6 +9,7 @@ declare(strict_types = 1); * @link https://www.zentao.net */ namespace zin; +include_once 'show.html.php'; $versionsTableBody = array(); foreach($versionSpecs as $versionSpec) @@ -45,5 +46,11 @@ panel h::th($lang->pivot->desc) ), $versionsTableBody + ), + div + ( + setID('pivotContent'), + setClass('flex col gap-4 w-full'), + $generateData() ) );