From 99b36a1342a62fc9be992d8ef60c8e48cc2ebfcb Mon Sep 17 00:00:00 2001 From: liumengyi Date: Fri, 30 Jun 2023 18:56:57 +0800 Subject: [PATCH] * Refactor ui of entry::log. --- module/entry/config/table.php | 17 +++++++++++ module/entry/css/log.ui.css | 1 + module/entry/ui/log.html.php | 55 +++++++++++++++++++++++++++++++++++ 3 files changed, 73 insertions(+) create mode 100644 module/entry/css/log.ui.css create mode 100644 module/entry/ui/log.html.php diff --git a/module/entry/config/table.php b/module/entry/config/table.php index 501e153e47..5727cdb4e2 100644 --- a/module/entry/config/table.php +++ b/module/entry/config/table.php @@ -56,3 +56,20 @@ $config->entry->dtable->fieldList['actions']['title'] = $lang->actions; $config->entry->dtable->fieldList['actions']['type'] = 'actions'; $config->entry->dtable->fieldList['actions']['list'] = $config->entry->actionList; $config->entry->dtable->fieldList['actions']['menu'] = array_keys($config->entry->actionList); + +$config->entry->log = new stdclass(); +$config->entry->log->dtable = new stdclass(); +$config->entry->log->dtable->fieldList['id']['name'] = 'id'; +$config->entry->log->dtable->fieldList['id']['title'] = $lang->idAB; +$config->entry->log->dtable->fieldList['id']['type'] = 'id'; +$config->entry->log->dtable->fieldList['id']['sortType'] = true; + +$config->entry->log->dtable->fieldList['date']['name'] = 'date'; +$config->entry->log->dtable->fieldList['date']['title'] = $lang->entry->date; +$config->entry->log->dtable->fieldList['date']['type'] = 'text'; +$config->entry->log->dtable->fieldList['date']['sortType'] = true; + +$config->entry->log->dtable->fieldList['url']['name'] = 'url'; +$config->entry->log->dtable->fieldList['url']['title'] = $lang->entry->url; +$config->entry->log->dtable->fieldList['url']['type'] = 'text'; +$config->entry->log->dtable->fieldList['url']['sortType'] = true; diff --git a/module/entry/css/log.ui.css b/module/entry/css/log.ui.css new file mode 100644 index 0000000000..10778ee728 --- /dev/null +++ b/module/entry/css/log.ui.css @@ -0,0 +1 @@ +#featureBar .nav {column-gap: 0.5rem;} diff --git a/module/entry/ui/log.html.php b/module/entry/ui/log.html.php new file mode 100644 index 0000000000..93eb916f81 --- /dev/null +++ b/module/entry/ui/log.html.php @@ -0,0 +1,55 @@ + + * @package entry + * @link https://www.zentao.net + */ +namespace zin; +featureBar +( + entityLabel + ( + set::text($entry->name), + set::level(1), + ), + label + ( + setClass('secondary size-sm mr-2'), + $lang->entry->log, + ), +); + +toolbar +( + btn + ( + setClass('btn primary'), + set::icon('cog'), + set::url(helper::createLink('admin', 'log')), + $lang->entry->setting + ), + backBtn + ( + set::back('GLOBAL'), + $lang->goback, + ), +); + +panel +( + setClass('p-0 plan-block'), + set::bodyClass('p-0 no-shadow'), + dtable + ( + set::cols($this->config->entry->log->dtable->fieldList), + set::data($logs), + set::footPager(usePager()), + ), +); + +render(); +