Skip to content

Commit

Permalink
新增:博客发布时间和定时发布时间做区分显示
Browse files Browse the repository at this point in the history
  • Loading branch information
modstart committed Dec 9, 2024
1 parent 4c8c8fa commit 7262597
Show file tree
Hide file tree
Showing 48 changed files with 1,198 additions and 1,024 deletions.
12 changes: 8 additions & 4 deletions module/Blog/Admin/Controller/BlogController.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,13 @@ protected function crud(AdminCRUDBuilder $builder)
$builder->switch('isTop', '置顶')->gridEditable(true);
$builder->switch('isHot', '热门')->gridEditable(true);
$builder->switch('isRecommend', '推荐')->gridEditable(true);
$builder->switch('isPublished', '发布')
->optionsYesNo()->defaultValue(true)
$builder->switch('isPublished', '立即发布')
->optionsYesNo()
->defaultValue(true)
->when('=', false, function ($builder) {
/** @var HasFields $builder */
$builder->datetime('postTime', '发布时间')->defaultValue(date('Y-m-d H:i:s'));
$builder->datetime('postTime', '定时发布')
->defaultValue(date('Y-m-d H:i:s'));
});
$builder->radio('visitMode', '访问模式')
->optionType(BlogVisitMode::class)
Expand All @@ -74,7 +76,9 @@ protected function crud(AdminCRUDBuilder $builder)
/** @var HasFields $builder */
$builder->text('visitPassword', '访问密码');
});
$builder->display('created_at', L('Created At'))->listable(false);
$builder->datetime('created_at', '发布时间')
->listable(false)
->defaultValue(date('Y-m-d H:i:s'));
$builder->display('updated_at', L('Updated At'))->listable(false);
})
->hookResponse(function (Form $form) {
Expand Down
1 change: 1 addition & 0 deletions module/Blog/Docs/release.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## 3.6.0

- 新增:适配支持标签云 TagManager 模块
- 新增:博客发布时间和定时发布时间做区分显示
- 修复:博客上一篇下一篇链接错误问题

---
Expand Down
158 changes: 0 additions & 158 deletions module/Vendor/Atomic/AtomicUtil.php

This file was deleted.

60 changes: 0 additions & 60 deletions module/Vendor/Biz/BizTrait.php

This file was deleted.

51 changes: 0 additions & 51 deletions module/Vendor/Cache/CacheUtil.php

This file was deleted.

17 changes: 0 additions & 17 deletions module/Vendor/Captcha/AbstractCaptchaProvider.php

This file was deleted.

29 changes: 0 additions & 29 deletions module/Vendor/Captcha/CaptchaUtil.php

This file was deleted.

33 changes: 0 additions & 33 deletions module/Vendor/Captcha/DefaultCaptchaProvider.php

This file was deleted.

Loading

0 comments on commit 7262597

Please sign in to comment.