From c94b6099d9ad1ea7cfe1989c4e62be41ec9fc828 Mon Sep 17 00:00:00 2001 From: guofeilong Date: Mon, 10 Apr 2023 17:02:45 +0800 Subject: [PATCH] * Adjust code for add two create btn . --- module/doc/control.php | 1 + module/doc/view/view.html.php | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/module/doc/control.php b/module/doc/control.php index a2a30f8ebd..748d88e8c6 100755 --- a/module/doc/control.php +++ b/module/doc/control.php @@ -1211,6 +1211,7 @@ class doc extends control $this->view->objectType = $objectType; $this->view->type = $type; $this->view->libID = $libID; + $this->view->moduleID = $doc->module; $this->view->lib = isset($libs[$libID]) ? $libs[$libID] : new stdclass(); $this->view->libs = $this->doc->getLibsByObject($type, $objectID); $this->view->canBeChanged = common::canModify($type, $object); // Determines whether an object is editable. diff --git a/module/doc/view/view.html.php b/module/doc/view/view.html.php index c6cdff3107..d2ce3b9320 100644 --- a/module/doc/view/view.html.php +++ b/module/doc/view/view.html.php @@ -23,6 +23,12 @@
+
+ createLink('api', 'create', "libID=$libID&moduleID=$moduleID", '', true), ' ' . $lang->api->createApi, '', 'class="btn btn-primary iframe" data-width="95%"'); + if(common::hasPriv('doc', 'create')) echo $this->doc->printCreateBtn($lib, $type, $objectID, $moduleID); + ?> +