From a4eaf5933e306f7fa00dbc2f930b90e9a297e870 Mon Sep 17 00:00:00 2001 From: caoyanyi Date: Thu, 27 Jul 2023 15:39:00 +0800 Subject: [PATCH] * Change sidebar block style. --- module/api/ui/index.html.php | 113 ++++++------ module/api/ui/view.html.php | 260 ++++++++++++++------------- module/doc/ui/createbutton.html.php | 32 ++-- module/doc/ui/doclist.html.php | 6 +- module/doc/ui/mydoclist.html.php | 6 +- module/doc/ui/myspace.html.php | 64 +++---- module/doc/ui/tablecontents.html.php | 138 +++++++------- 7 files changed, 323 insertions(+), 296 deletions(-) diff --git a/module/api/ui/index.html.php b/module/api/ui/index.html.php index 55fabd1114..9cc4665abc 100644 --- a/module/api/ui/index.html.php +++ b/module/api/ui/index.html.php @@ -11,62 +11,65 @@ declare(strict_types=1); namespace zin; /* zin: Define the set::module('api') feature bar on main menu. */ -featureBar -( - li(searchToggle(set::module('api'))) -); +if($app->rawModule == 'api') +{ + featureBar + ( + li(searchToggle(set::module('api'))) + ); -toolbar -( - $libID && common::hasPriv('api', 'struct') ? item(set(array + toolbar ( - 'icon' => 'treemap', - 'class' => 'ghost', - 'text' => $lang->api->struct, - 'url' => createLink('api', 'struct', "libID={$libID}"), - ))) : null, - $libID && common::hasPriv('api', 'releases') ? item(set(array - ( - 'icon' => 'version', - 'class' => 'ghost', - 'text' => $lang->api->releases, - 'url' => createLink('api', 'releases', "libID={$libID}"), - 'data-toggle' => 'modal' - ))) : null, - $libID && common::hasPriv('api', 'createRelease') ? item(set(array - ( - 'icon' => 'publish', - 'class' => 'ghost', - 'text' => $lang->api->createRelease, - 'url' => createLink('api', 'createRelease', "libID={$libID}"), - 'data-toggle' => 'modal' - ))) : null, - $libID && common::hasPriv('api', 'export') && $config->edition != 'open' ? item(set(array - ( - 'icon' => 'export', - 'class' => 'ghost export', - 'text' => $lang->export, - 'url' => createLink('api', 'export', "libID={$libID}&version={$version}&release={$release}&moduleID={$moduleID}"), - 'data-toggle' => 'modal' - ))) : null, - common::hasPriv('api', 'createLib') ? item(set(array - ( - 'icon' => 'plus', - 'class' => 'btn secondary', - 'text' => $lang->api->createLib, - 'url' => createLink('api', 'createLib', "type=" . ($objectType ? $objectType : 'nolink') . "&objectID=$objectID"), - 'data-toggle' => 'modal' - ))) : null, - $libID && common::hasPriv('api', 'create') ? item(set(array - ( - 'icon' => 'plus', - 'class' => 'btn primary', - 'text' => $lang->api->createApi, - 'url' => createLink('api', 'create', "libID={$libID}&moduleID={$moduleID}"), - ))) : null, -); + $libID && common::hasPriv('api', 'struct') ? item(set(array + ( + 'icon' => 'treemap', + 'class' => 'ghost', + 'text' => $lang->api->struct, + 'url' => createLink('api', 'struct', "libID={$libID}"), + ))) : null, + $libID && common::hasPriv('api', 'releases') ? item(set(array + ( + 'icon' => 'version', + 'class' => 'ghost', + 'text' => $lang->api->releases, + 'url' => createLink('api', 'releases', "libID={$libID}"), + 'data-toggle' => 'modal' + ))) : null, + $libID && common::hasPriv('api', 'createRelease') ? item(set(array + ( + 'icon' => 'publish', + 'class' => 'ghost', + 'text' => $lang->api->createRelease, + 'url' => createLink('api', 'createRelease', "libID={$libID}"), + 'data-toggle' => 'modal' + ))) : null, + $libID && common::hasPriv('api', 'export') && $config->edition != 'open' ? item(set(array + ( + 'icon' => 'export', + 'class' => 'ghost export', + 'text' => $lang->export, + 'url' => createLink('api', 'export', "libID={$libID}&version={$version}&release={$release}&moduleID={$moduleID}"), + 'data-toggle' => 'modal' + ))) : null, + common::hasPriv('api', 'createLib') ? item(set(array + ( + 'icon' => 'plus', + 'class' => 'btn secondary', + 'text' => $lang->api->createLib, + 'url' => createLink('api', 'createLib', "type=" . ($objectType ? $objectType : 'nolink') . "&objectID=$objectID"), + 'data-toggle' => 'modal' + ))) : null, + $libID && common::hasPriv('api', 'create') ? item(set(array + ( + 'icon' => 'plus', + 'class' => 'btn primary', + 'text' => $lang->api->createApi, + 'url' => createLink('api', 'create', "libID={$libID}&moduleID={$moduleID}"), + ))) : null, + ); -if($app->rawModule == 'api') include '../../doc/ui/left.html.php'; + include '../../doc/ui/left.html.php'; +} $list = array(); foreach($apiList as $api) @@ -100,8 +103,8 @@ foreach($apiList as $api) ); } -$delimiter = strpos($app->clientLang, 'zh') === 0 ? ':' : ': '; -panel +$delimiter = strpos($app->clientLang, 'zh') === 0 ? ':' : ': '; +$docContent = panel ( div ( diff --git a/module/api/ui/view.html.php b/module/api/ui/view.html.php index 5e6d2743c4..21cf56abdd 100644 --- a/module/api/ui/view.html.php +++ b/module/api/ui/view.html.php @@ -10,61 +10,6 @@ declare(strict_types=1); */ namespace zin; -featureBar -( - li(backBtn(setClass('ghost'), set::icon('back'), $lang->goback)), -); - -toolbar -( - $libID && common::hasPriv('api', 'struct') ? item(set(array - ( - 'icon' => 'treemap', - 'class' => 'ghost', - 'text' => $lang->api->struct, - 'url' => createLink('api', 'struct', "libID={$libID}"), - ))) : null, - $libID && common::hasPriv('api', 'releases') ? item(set(array - ( - 'icon' => 'version', - 'class' => 'ghost', - 'text' => $lang->api->releases, - 'url' => createLink('api', 'releases', "libID={$libID}"), - 'data-toggle' => 'modal' - ))) : null, - $libID && common::hasPriv('api', 'createRelease') ? item(set(array - ( - 'icon' => 'publish', - 'class' => 'ghost', - 'text' => $lang->api->createRelease, - 'url' => createLink('api', 'createRelease', "libID={$libID}"), - 'data-toggle' => 'modal' - ))) : null, - $libID && common::hasPriv('api', 'export') && $config->edition != 'open' ? item(set(array - ( - 'icon' => 'export', - 'class' => 'ghost export', - 'text' => $lang->export, - 'url' => createLink('api', 'export', "libID={$libID}&version={$version}&release={$release}&moduleID={$moduleID}"), - 'data-toggle' => 'modal' - ))) : null, - common::hasPriv('api', 'createLib') ? item(set(array - ( - 'icon' => 'plus', - 'class' => 'btn secondary', - 'text' => $lang->api->createLib, - 'url' => createLink('api', 'createLib', "type=" . ($objectType ? $objectType : 'nolink') . "&objectID=$objectID"), - 'data-toggle' => 'modal' - ))) : null, - $libID && common::hasPriv('api', 'create') ? item(set(array - ( - 'icon' => 'plus', - 'class' => 'btn primary', - 'text' => $lang->api->createApi, - 'url' => createLink('api', 'create', "libID={$libID}&moduleID={$moduleID}"), - ))) : null, -); - include '../../doc/ui/left.html.php'; $versionList = array(); @@ -197,85 +142,148 @@ if($api->response) ); } -panel +div ( - div + setClass('flex flex-wrap'), + featureBar ( - setClass('panel-heading'), - div + li(backBtn(setClass('ghost'), set::icon('back'), $lang->goback)), + ), + toolbar + ( + $libID && common::hasPriv('api', 'struct') ? item(set(array ( - setClass('http-method label'), - $api->method - ), - div + 'icon' => 'treemap', + 'class' => 'ghost', + 'text' => $lang->api->struct, + 'url' => createLink('api', 'struct', "libID={$libID}"), + ))) : null, + $libID && common::hasPriv('api', 'releases') ? item(set(array ( - setClass('path'), - $api->path - ), - dropdown + 'icon' => 'version', + 'class' => 'ghost', + 'text' => $lang->api->releases, + 'url' => createLink('api', 'releases', "libID={$libID}"), + 'data-toggle' => 'modal' + ))) : null, + $libID && common::hasPriv('api', 'createRelease') ? item(set(array ( - btn - ( - setClass('ghost btn square btn-default'), - 'V' . ($version ? $version : $api->version) - ), - set::items($versionList) - ), - div + 'icon' => 'publish', + 'class' => 'ghost', + 'text' => $lang->api->createRelease, + 'url' => createLink('api', 'createRelease', "libID={$libID}"), + 'data-toggle' => 'modal' + ))) : null, + $libID && common::hasPriv('api', 'export') && $config->edition != 'open' ? item(set(array ( - setClass('panel-actions'), - div - ( - setClass('toolbar'), - btn - ( - set::url('javascript:fullScreen()'), - setClass('btn ghost'), - icon('fullscreen'), - ), - (!$isRelease && common::hasPriv('api', 'edit')) ? btn - ( - set::url(createLink('api', 'edit', "apiID=$api->id")), - setClass('btn ghost'), - icon('edit'), - ) : null, - (!$isRelease && common::hasPriv('api', 'delete')) ? btn - ( - set::url(createLink('api', 'delete', "apiID=$api->id")), - setClass('btn ghost ajax-submit'), - set('data-confirm', $lang->api->confirmDelete), - icon('trash'), - ) : null, - btn - ( - set::id('hisTrigger'), - set::url('###)'), - setClass('btn ghost'), - icon('clock'), - ), - ) - ) + 'icon' => 'export', + 'class' => 'ghost export', + 'text' => $lang->export, + 'url' => createLink('api', 'export', "libID={$libID}&version={$version}&release={$release}&moduleID={$moduleID}"), + 'data-toggle' => 'modal' + ))) : null, + common::hasPriv('api', 'createLib') ? item(set(array + ( + 'icon' => 'plus', + 'class' => 'btn secondary', + 'text' => $lang->api->createLib, + 'url' => createLink('api', 'createLib', "type=" . ($objectType ? $objectType : 'nolink') . "&objectID=$objectID"), + 'data-toggle' => 'modal' + ))) : null, + $libID && common::hasPriv('api', 'create') ? item(set(array + ( + 'icon' => 'plus', + 'class' => 'btn primary ml-2', + 'text' => $lang->api->createApi, + 'url' => createLink('api', 'create', "libID={$libID}&moduleID={$moduleID}"), + 'data-size' => 'lg', + 'data-toggle' => $spaceType != 'api' ? 'modal' : '' + ))) : null, ), div ( - set::Class('panel-body'), - set::id('content'), - h2($api->title), - div(setClass('desc'), $api->desc), - $apiHeader, - $apiQuery, - $apiParams, - $api->paramsExample ? h3($lang->api->paramsExample) : null, - $api->paramsExample ? html("
" . $api->paramsExample . "
") : null, - $apiResponse, - $api->responseExample ? h3($lang->api->responseExample) : null, - $api->responseExample ? html("
" . $api->responseExample . "
") : null, + setClass('doc-content mt-2 flex-initial w-full flex'), + panel + ( + setClass('flex-auto'), + div + ( + setClass('panel-heading'), + div + ( + setClass('http-method label'), + $api->method + ), + div + ( + setClass('path'), + $api->path + ), + dropdown + ( + btn + ( + setClass('ghost btn square btn-default'), + 'V' . ($version ? $version : $api->version) + ), + set::items($versionList) + ), + div + ( + setClass('panel-actions'), + div + ( + setClass('toolbar'), + btn + ( + set::url('javascript:fullScreen()'), + setClass('btn ghost'), + icon('fullscreen'), + ), + (!$isRelease && common::hasPriv('api', 'edit')) ? btn + ( + set::url(createLink('api', 'edit', "apiID=$api->id")), + setClass('btn ghost'), + icon('edit'), + ) : null, + (!$isRelease && common::hasPriv('api', 'delete')) ? btn + ( + set::url(createLink('api', 'delete', "apiID=$api->id")), + setClass('btn ghost ajax-submit'), + set('data-confirm', $lang->api->confirmDelete), + icon('trash'), + ) : null, + btn + ( + set::id('hisTrigger'), + set::url('###)'), + setClass('btn ghost'), + icon('clock'), + ), + ) + ) + ), + div + ( + set::Class('panel-body'), + set::id('content'), + h2($api->title), + div(setClass('desc'), $api->desc), + $apiHeader, + $apiQuery, + $apiParams, + $api->paramsExample ? h3($lang->api->paramsExample) : null, + $api->paramsExample ? html("
" . $api->paramsExample . "
") : null, + $apiResponse, + $api->responseExample ? h3($lang->api->responseExample) : null, + $api->responseExample ? html("
" . $api->responseExample . "
") : null, + ) + ), + panel + ( + set::id('history'), + setClass('hidden'), + history() + ) ) ); - -panel -( - set::id('history'), - setClass('hidden'), - history() -); diff --git a/module/doc/ui/createbutton.html.php b/module/doc/ui/createbutton.html.php index ee781584a3..7c5d3a0f24 100644 --- a/module/doc/ui/createbutton.html.php +++ b/module/doc/ui/createbutton.html.php @@ -30,20 +30,20 @@ foreach($lang->doc->createList as $typeKey => $typeName) } $createButton = btngroup +( + btn ( - btn - ( - setClass('btn primary'), - set::icon('plus'), - set::url(createLink('doc', 'create', "objectType={$type}&objectID={$objectID}&libID={$lib->id}&moduleID={$moduleID}&type=html{$templateParam}")), - set('data-app', $app->tab), - $lang->doc->create - ), - dropdown - ( - btn(setClass('btn primary dropdown-toggle'), - setStyle(array('padding' => '6px', 'border-radius' => '0 2px 2px 0'))), - set::placement('bottom-end'), - set::items($buttonItems), - ) - ); + setClass('btn primary ml-2'), + set::icon('plus'), + set::url(createLink('doc', 'create', "objectType={$type}&objectID={$objectID}&libID={$lib->id}&moduleID={$moduleID}&type=html{$templateParam}")), + set('data-app', $app->tab), + $lang->doc->create + ), + dropdown + ( + btn(setClass('btn primary dropdown-toggle'), + setStyle(array('padding' => '6px', 'border-radius' => '0 2px 2px 0'))), + set::placement('bottom-end'), + set::items($buttonItems), + ) +); diff --git a/module/doc/ui/doclist.html.php b/module/doc/ui/doclist.html.php index 561d00a648..1048cdaea1 100644 --- a/module/doc/ui/doclist.html.php +++ b/module/doc/ui/doclist.html.php @@ -9,10 +9,12 @@ declare(strict_types=1); * @link https://www.zentao.net */ namespace zin; + +$docContent = null; if(empty($docs)) { if($browseType != 'bySearch' && $libID && (common::hasPriv('doc', 'create') || (common::hasPriv('api', 'create') && !$apiLibID))) include 'createbutton.html.php'; - div + $docContent = div ( setClass('table-empty-tip flex justify-center items-center'), span @@ -42,7 +44,7 @@ else $params = "objectID={$objectID}&libID={$libID}&moduleID={$moduleID}&browseType={$browseType}&orderBy={$orderBy}¶m={$param}&recTotal={recTotal}&recPerPage={recPerPage}&pageID={page}"; $tableData = initTableData($docs, $cols); - dtable + $docContent = dtable ( set::userMap($users), set::cols($cols), diff --git a/module/doc/ui/mydoclist.html.php b/module/doc/ui/mydoclist.html.php index ffbfcde456..d10b0cad9a 100644 --- a/module/doc/ui/mydoclist.html.php +++ b/module/doc/ui/mydoclist.html.php @@ -9,10 +9,12 @@ declare(strict_types=1); * @link https://www.zentao.net */ namespace zin; + +$docContent = null; if(empty($docs)) { if($browseType != 'bysearch' && $libID && common::hasPriv('doc', 'create')) include 'createbutton.html.php'; - div + $docContent = div ( setClass('table-empty-tip flex justify-center items-center'), span @@ -51,7 +53,7 @@ else $params = "libID={$libID}&moduleID={$moduleID}&browseType={$browseType}¶m={$param}&orderBy={$orderBy}&recTotal={recTotal}&recPerPage={recPerPage}&pageID={page}"; if($app->rawMethod == 'myspace') $params = "type={$type}&" . $params; - dtable + $docContent = dtable ( set::userMap($users), set::cols($cols), diff --git a/module/doc/ui/myspace.html.php b/module/doc/ui/myspace.html.php index 95a3323b80..d2ba4cfe1b 100644 --- a/module/doc/ui/myspace.html.php +++ b/module/doc/ui/myspace.html.php @@ -9,7 +9,9 @@ declare(strict_types=1); * @link https://www.zentao.net */ namespace zin; +include 'left.html.php'; if($libID && common::hasPriv('doc', 'create')) include 'createbutton.html.php'; +include 'mydoclist.html.php'; jsVar('browseType', $browseType); jsVar('docLang', $lang->doc); @@ -17,37 +19,39 @@ jsVar('confirmDelete', $lang->doc->confirmDelete); jsVar('appTab', $app->tab); jsVar('treeData', $libTree); -/* zin: Define the set::module('doc') feature bar on main menu. */ -featureBar +div ( - set::current($browseType), - set::linkParams("type={$type}&libID={$libID}&moduleID={$moduleID}&browseType={key}"), - li(searchToggle(set::module($type . $libType . 'Doc'))) -); - -toolbar -( - $canExport ? item(set(array + setClass('flex flex-wrap'), + /* zin: Define the set::module('doc') feature bar on main menu. */ + featureBar ( - 'icon' => 'export', - 'class' => 'ghost export', - 'text' => $lang->export, - 'url' => createLink('doc', 'mine2export', "libID={$libID}&moduleID={$moduleID}"), - 'data-toggle' => 'modal' - ))) : null, - common::hasPriv('doc', 'createLib') ? item(set(array + set::current($browseType), + set::linkParams("type={$type}&libID={$libID}&moduleID={$moduleID}&browseType={key}"), + li(searchToggle(set::module($type . $libType . 'Doc'))) + ), + toolbar ( - 'icon' => 'plus', - 'class' => 'btn secondary', - 'text' => $lang->doc->createLib, - 'url' => createLink('doc', 'createLib', 'type=mine'), - 'data-toggle' => 'modal' - ))) : null, - $libID && common::hasPriv('doc', 'create') ? $createButton : null + $canExport ? item(set(array + ( + 'icon' => 'export', + 'class' => 'ghost export', + 'text' => $lang->export, + 'url' => createLink('doc', 'mine2export', "libID={$libID}&moduleID={$moduleID}"), + 'data-toggle' => 'modal' + ))) : null, + common::hasPriv('doc', 'createLib') ? item(set(array + ( + 'icon' => 'plus', + 'class' => 'btn secondary', + 'text' => $lang->doc->createLib, + 'url' => createLink('doc', 'createLib', 'type=mine'), + 'data-toggle' => 'modal' + ))) : null, + $libID && common::hasPriv('doc', 'create') ? $createButton : null + ), + div + ( + setClass('doc-content mt-2 flex-initial w-full'), + $docContent + ) ); - -include 'left.html.php'; -include 'mydoclist.html.php'; - -/* ====== Render page ====== */ -render(); diff --git a/module/doc/ui/tablecontents.html.php b/module/doc/ui/tablecontents.html.php index 484a3108ec..e26bdd4855 100644 --- a/module/doc/ui/tablecontents.html.php +++ b/module/doc/ui/tablecontents.html.php @@ -9,16 +9,9 @@ declare(strict_types=1); * @link https://www.zentao.net */ namespace zin; -if($libType != 'api' && $libID && common::hasPriv('doc', 'create')) include 'createbutton.html.php'; +include 'left.html.php'; -/* zin: Define the set::module('doc') feature bar on main menu. */ -featureBar -( - set::current($browseType), - set::method('tableContents'), - set::linkParams("objectID={$objectID}&libID={$libID}&moduleID={$moduleID}&browseType={key}"), - li(searchToggle(set::module($type . $libType . 'Doc'))) -); +if($libType != 'api' && $libID && common::hasPriv('doc', 'create')) include 'createbutton.html.php'; if($canExport) { @@ -26,60 +19,6 @@ if($canExport) if($libType == 'api') $exportLink = $this->createLink('api', $exportMethod, "libID={$libID}&version=0&release={$release}&moduleID={$moduleID}"); } -toolbar -( - $libType == 'api' && common::hasPriv('api', 'struct') ? item(set(array - ( - 'icon' => 'treemap', - 'class' => 'ghost', - 'text' => $lang->api->struct, - 'url' => createLink('api', 'struct', "libID={$libID}"), - ))) : null, - $libType == 'api' && common::hasPriv('api', 'releases') ? item(set(array - ( - 'icon' => 'version', - 'class' => 'ghost', - 'text' => $lang->api->releases, - 'url' => createLink('api', 'releases', "libID={$libID}"), - 'data-toggle' => 'modal' - ))) : null, - $libType == 'api' && common::hasPriv('api', 'createRelease') ? item(set(array - ( - 'icon' => 'publish', - 'class' => 'ghost', - 'text' => $lang->api->createRelease, - 'url' => createLink('api', 'createRelease', "libID={$libID}"), - 'data-toggle' => 'modal' - ))) : null, - $canExport ? item(set(array - ( - 'id' => $exportMethod, - 'icon' => 'export', - 'class' => 'ghost export', - 'text' => $lang->export, - 'url' => $exportLink, - 'data-toggle' => 'modal' - ))) : null, - common::hasPriv('doc', 'createLib') ? item(set(array - ( - 'icon' => 'plus', - 'class' => 'btn secondary', - 'text' => $lang->doc->createLib, - 'url' => createLink('doc', 'createLib', "type={$type}&objectID={$objectID}"), - 'data-toggle' => 'modal' - ))) : null, - $libType == 'api' && common::hasPriv('api', 'create') ? item(set(array - ( - 'icon' => 'plus', - 'class' => 'btn primary', - 'text' => $lang->api->createApi, - 'url' => createLink('api', 'create', "libID={$libID}&moduleID={$moduleID}"), - 'data-toggle' => 'modal' - ))) : null, - $libType != 'api' && $libID && common::hasPriv('doc', 'create') ? $createButton : null -); - -include 'left.html.php'; if($browseType == 'annex') { include 'showfiles.html.php'; @@ -94,5 +33,74 @@ else include 'doclist.html.php'; } -/* ====== Render page ====== */ -render(); +/* zin: Define the set::module('doc') feature bar on main menu. */ +div +( + setClass('flex flex-wrap'), + featureBar + ( + set::current($browseType), + set::method('tableContents'), + set::linkParams("objectID={$objectID}&libID={$libID}&moduleID={$moduleID}&browseType={key}"), + li(searchToggle(set::module($type . $libType . 'Doc'))) + ), + + toolbar + ( + $libType == 'api' && common::hasPriv('api', 'struct') ? item(set(array + ( + 'icon' => 'treemap', + 'class' => 'ghost', + 'text' => $lang->api->struct, + 'url' => createLink('api', 'struct', "libID={$libID}"), + ))) : null, + $libType == 'api' && common::hasPriv('api', 'releases') ? item(set(array + ( + 'icon' => 'version', + 'class' => 'ghost', + 'text' => $lang->api->releases, + 'url' => createLink('api', 'releases', "libID={$libID}"), + 'data-toggle' => 'modal' + ))) : null, + $libType == 'api' && common::hasPriv('api', 'createRelease') ? item(set(array + ( + 'icon' => 'publish', + 'class' => 'ghost', + 'text' => $lang->api->createRelease, + 'url' => createLink('api', 'createRelease', "libID={$libID}"), + 'data-toggle' => 'modal' + ))) : null, + $canExport ? item(set(array + ( + 'id' => $exportMethod, + 'icon' => 'export', + 'class' => 'ghost export', + 'text' => $lang->export, + 'url' => $exportLink, + 'data-toggle' => 'modal' + ))) : null, + common::hasPriv('doc', 'createLib') ? item(set(array + ( + 'icon' => 'plus', + 'class' => 'btn secondary', + 'text' => $lang->doc->createLib, + 'url' => createLink('doc', 'createLib', "type={$type}&objectID={$objectID}"), + 'data-toggle' => 'modal' + ))) : null, + $libType == 'api' && common::hasPriv('api', 'create') ? item(set(array + ( + 'icon' => 'plus', + 'class' => 'btn primary ml-2', + 'text' => $lang->api->createApi, + 'url' => createLink('api', 'create', "libID={$libID}&moduleID={$moduleID}"), + 'data-size' => 'lg', + 'data-toggle' => 'modal' + ))) : null, + $libType != 'api' && $libID && common::hasPriv('doc', 'create') ? $createButton : null + ), + div + ( + setClass('doc-content mt-2 flex-initial w-full'), + $docContent + ) +);