feat: 项目配置新增是否开启打印功能

This commit is contained in:
zhanzhenping 2024-07-05 16:07:40 +08:00
parent 6792c825ea
commit f3846cc431
4 changed files with 13 additions and 0 deletions

View File

@ -318,6 +318,7 @@ next = next
no = no
edit_title = Edit Blog
private_blog_tips = Private blog, please enter password to access
print_text = Enable Printing
[doc]
modify_doc = Modify Document

View File

@ -318,6 +318,7 @@ next = 下一篇
no =
edit_title = 编辑文章
private_blog_tips = 加密文章,请输入密码访问
print_text = 开启打印
[doc]
modify_doc = 修改文档

View File

@ -128,6 +128,15 @@
</div>
{{end}}
<div class="form-group">
<label for="autoRelease">{{i18n $.Lang "blog.print_text"}}</label>
<div class="controls">
<div class="switch switch-small" data-on="primary" data-off="info">
<input type="checkbox" id="autoSave" name="print_state"{{if .Model.PrintState }} checked{{end}} data-size="small" placeholder="{{i18n $.Lang "blog.print_text"}}">
</div>
</div>
</div>
<div class="form-group">
<label for="autoRelease">{{i18n $.Lang "blog.auto_publish"}}</label>
<div class="controls">

View File

@ -88,7 +88,9 @@
</div>
{{end}}
{{end}}
{{if .Model.PrintState}}
<a href="javascript:window.print();" id="printSinglePage" class="btn btn-default" style="margin-right: 10px;"><i class="fa fa-print"></i> {{i18n .Lang "doc.print"}}</a>
{{end}}
<div class="dropdown pull-right" style="margin-right: 10px;">
{{if eq .Model.PrivatelyOwned 0}}
{{if .Model.IsEnableShare}}