+ Add empty tip of the doc table.
This commit is contained in:
@@ -2,4 +2,5 @@
|
||||
.doc-title .ajaxCollect {position: absolute; right: 0; padding: 4px; background: #fff; top: 6px;}
|
||||
.doc-title .ajaxCollect > img {width: 16px;}
|
||||
|
||||
.sidebar .module-menu + .module-menu {border-top-width: 1px;}
|
||||
.table-empty-tip {padding: 80px 10px; text-align: center; background: #fff;}
|
||||
.table-empty-tip .btn-group .btn {background-color: rgba(var(--color-primary-50-rgb),var(--tw-bg-opacity)); color: var(--nav-active-color); --tw-ring-color: rgba(var(--color-primary-50-rgb),var(--tw-bg-opacity))}
|
||||
|
||||
@@ -9,35 +9,51 @@ declare(strict_types=1);
|
||||
* @link https://www.zentao.net
|
||||
*/
|
||||
namespace zin;
|
||||
|
||||
jsVar('iconList', $config->doc->iconList);
|
||||
jsVar('draftText', $lang->doc->draft);
|
||||
jsVar('canViewDoc', common::hasPriv('doc', 'view'));
|
||||
jsVar('canCollect', common::hasPriv('doc', 'collect') && $libType && $libType != 'api');
|
||||
jsVar('currentAccount', $app->user->account);
|
||||
|
||||
$cols = array();
|
||||
foreach($config->doc->dtable->fieldList as $colName => $col)
|
||||
if(empty($docs))
|
||||
{
|
||||
if($canExport && $colName == 'id') $col['type'] = 'checkID';
|
||||
if(!in_array($colName, array('id', 'title', 'addedBy', 'addedDate', 'editedBy', 'editedDate', 'actions'))) continue;
|
||||
|
||||
$cols[$colName] = $col;
|
||||
}
|
||||
|
||||
$params = "objectID={$objectID}&libID={$libID}&moduleID={$moduleID}&browseType={$browseType}&orderBy={$orderBy}¶m={$param}&recTotal={recTotal}&recPerPage={recPerPage}&pageID={page}";
|
||||
$tableData = initTableData($docs, $cols);
|
||||
dtable
|
||||
(
|
||||
set::userMap($users),
|
||||
set::cols($cols),
|
||||
set::data($tableData),
|
||||
set::checkable($canExport),
|
||||
set::onRenderCell(jsRaw('window.rendDocCell')),
|
||||
set::footPager(
|
||||
usePager
|
||||
if($browseType != 'bySearch' && $libID && (common::hasPriv('doc', 'create') || (common::hasPriv('api', 'create') && !$apiLibID))) include 'createbutton.html.php';
|
||||
div
|
||||
(
|
||||
setClass('table-empty-tip flex justify-center items-center'),
|
||||
span
|
||||
(
|
||||
array('linkCreator' => helper::createLink('doc', $app->rawMethod, $params)),
|
||||
setClass('text-gray'),
|
||||
$lang->doc->noDoc
|
||||
),
|
||||
),
|
||||
);
|
||||
$browseType != 'bySearch' && $libID && (common::hasPriv('doc', 'create') || (common::hasPriv('api', 'create') && !$apiLibID)) ? $createButton : null
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
jsVar('iconList', $config->doc->iconList);
|
||||
jsVar('draftText', $lang->doc->draft);
|
||||
jsVar('canViewDoc', common::hasPriv('doc', 'view'));
|
||||
jsVar('canCollect', common::hasPriv('doc', 'collect') && $libType && $libType != 'api');
|
||||
jsVar('currentAccount', $app->user->account);
|
||||
|
||||
$cols = array();
|
||||
foreach($config->doc->dtable->fieldList as $colName => $col)
|
||||
{
|
||||
if($canExport && $colName == 'id') $col['type'] = 'checkID';
|
||||
if(!in_array($colName, array('id', 'title', 'addedBy', 'addedDate', 'editedBy', 'editedDate', 'actions'))) continue;
|
||||
|
||||
$cols[$colName] = $col;
|
||||
}
|
||||
|
||||
$params = "objectID={$objectID}&libID={$libID}&moduleID={$moduleID}&browseType={$browseType}&orderBy={$orderBy}¶m={$param}&recTotal={recTotal}&recPerPage={recPerPage}&pageID={page}";
|
||||
$tableData = initTableData($docs, $cols);
|
||||
dtable
|
||||
(
|
||||
set::userMap($users),
|
||||
set::cols($cols),
|
||||
set::data($tableData),
|
||||
set::checkable($canExport),
|
||||
set::onRenderCell(jsRaw('window.rendDocCell')),
|
||||
set::footPager(
|
||||
usePager
|
||||
(
|
||||
array('linkCreator' => helper::createLink('doc', $app->rawMethod, $params)),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -9,43 +9,60 @@ declare(strict_types=1);
|
||||
* @link https://www.zentao.net
|
||||
*/
|
||||
namespace zin;
|
||||
jsVar('iconList', $config->doc->iconList);
|
||||
jsVar('draftText', $lang->doc->draft);
|
||||
jsVar('canViewDoc', common::hasPriv('doc', 'view'));
|
||||
jsVar('canCollect', common::hasPriv('doc', 'collect') && $libType && $libType != 'api');
|
||||
jsVar('currentAccount', $app->user->account);
|
||||
jsVar('spaceMethodList', $config->doc->spaceMethod);
|
||||
jsVar('myspacePriv', common::hasPriv('doc', 'myspace'));
|
||||
jsVar('productspacePriv', common::hasPriv('doc', 'productspace'));
|
||||
jsVar('projectspacePriv', common::hasPriv('doc', 'projectspace'));
|
||||
jsVar('teamspacePriv', common::hasPriv('doc', 'teamspace'));
|
||||
jsVar('currentTab', $app->tab);
|
||||
|
||||
$cols = array();
|
||||
foreach($config->doc->dtable->fieldList as $colName => $col)
|
||||
if(empty($docs))
|
||||
{
|
||||
if($type == 'mine' && in_array($colName, array('objectName', 'module', 'editedBy'))) continue;
|
||||
if($colName == 'addedBy' && in_array($type, array('mine', 'createdby'))) continue;
|
||||
|
||||
if($canExport && $colName == 'id') $col['type'] = 'checkID';
|
||||
$cols[$colName] = $col;
|
||||
}
|
||||
|
||||
$tableData = initTableData($docs, $cols);
|
||||
|
||||
$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
|
||||
(
|
||||
set::userMap($users),
|
||||
set::cols($cols),
|
||||
set::data($tableData),
|
||||
set::checkable($canExport),
|
||||
set::onRenderCell(jsRaw('window.rendDocCell')),
|
||||
set::footPager(
|
||||
usePager
|
||||
if($browseType != 'bysearch' && $libID && common::hasPriv('doc', 'create')) include 'createbutton.html.php';
|
||||
div
|
||||
(
|
||||
setClass('table-empty-tip flex justify-center items-center'),
|
||||
span
|
||||
(
|
||||
array('linkCreator' => helper::createLink('doc', $app->rawMethod, $params)),
|
||||
setClass('text-gray'),
|
||||
$lang->doc->noDoc
|
||||
),
|
||||
),
|
||||
);
|
||||
$browseType != 'bysearch' && $libID && common::hasPriv('doc', 'create') ? $createButton : null
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
jsVar('iconList', $config->doc->iconList);
|
||||
jsVar('draftText', $lang->doc->draft);
|
||||
jsVar('canViewDoc', common::hasPriv('doc', 'view'));
|
||||
jsVar('canCollect', common::hasPriv('doc', 'collect') && $libType && $libType != 'api');
|
||||
jsVar('currentAccount', $app->user->account);
|
||||
jsVar('spaceMethodList', $config->doc->spaceMethod);
|
||||
jsVar('myspacePriv', common::hasPriv('doc', 'myspace'));
|
||||
jsVar('productspacePriv', common::hasPriv('doc', 'productspace'));
|
||||
jsVar('projectspacePriv', common::hasPriv('doc', 'projectspace'));
|
||||
jsVar('teamspacePriv', common::hasPriv('doc', 'teamspace'));
|
||||
jsVar('currentTab', $app->tab);
|
||||
|
||||
$cols = array();
|
||||
foreach($config->doc->dtable->fieldList as $colName => $col)
|
||||
{
|
||||
if($type == 'mine' && in_array($colName, array('objectName', 'module', 'editedBy'))) continue;
|
||||
if($colName == 'addedBy' && in_array($type, array('mine', 'createdby'))) continue;
|
||||
|
||||
if($canExport && $colName == 'id') $col['type'] = 'checkID';
|
||||
$cols[$colName] = $col;
|
||||
}
|
||||
|
||||
$tableData = initTableData($docs, $cols);
|
||||
|
||||
$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
|
||||
(
|
||||
set::userMap($users),
|
||||
set::cols($cols),
|
||||
set::data($tableData),
|
||||
set::checkable($canExport),
|
||||
set::onRenderCell(jsRaw('window.rendDocCell')),
|
||||
set::footPager(
|
||||
usePager
|
||||
(
|
||||
array('linkCreator' => helper::createLink('doc', $app->rawMethod, $params)),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user