2019-12-01 20:44:16 +08:00
|
|
|
|
{% extends 'app_admin/admin_base.html' %}
|
|
|
|
|
{% load staticfiles %}
|
|
|
|
|
{% block title %}应用设置{% endblock %}
|
|
|
|
|
{% block content %}
|
|
|
|
|
<div class="layui-card-header" style="margin-bottom: 10px;">
|
|
|
|
|
<div class="layui-row">
|
|
|
|
|
<span style="font-size:18px;">应用设置
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="layui-row">
|
|
|
|
|
<div class="layui-tab">
|
|
|
|
|
<ul class="layui-tab-title">
|
|
|
|
|
<li class="layui-this">基础设置</li>
|
|
|
|
|
<li>邮箱设置</li>
|
|
|
|
|
<!--<li>广告设置</li>-->
|
|
|
|
|
</ul>
|
|
|
|
|
<div class="layui-tab-content">
|
|
|
|
|
<!-- 网站设置 -->
|
|
|
|
|
<div class="layui-tab-item layui-show">
|
|
|
|
|
<form class="layui-form" action="{% url 'sys_setting' %}" method="post">
|
|
|
|
|
{% csrf_token %}
|
|
|
|
|
<input type="text" name="type" hidden value="basic">
|
|
|
|
|
<div class="layui-form-item">
|
|
|
|
|
<label class="layui-form-label">禁止注册</label>
|
2019-12-15 15:45:05 +08:00
|
|
|
|
<div class="layui-input-inline">
|
2019-12-01 20:44:16 +08:00
|
|
|
|
<input type="checkbox" name="close_register" lay-skin="switch" lay-text="开启|关闭" {% if close_register %}checked{% endif %}>
|
|
|
|
|
</div>
|
2020-02-22 14:22:44 +08:00
|
|
|
|
<div class="layui-form-mid layui-word-aux">开启此选项将禁止新用户注册</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="layui-form-item">
|
2020-05-08 21:09:53 +08:00
|
|
|
|
<label class="layui-form-label">全站登录</label>
|
2020-02-22 14:22:44 +08:00
|
|
|
|
<div class="layui-input-inline">
|
2020-05-08 21:09:53 +08:00
|
|
|
|
<input type="checkbox" name="require_login" lay-skin="switch" lay-text="开启|关闭" {% if require_login %}checked{% endif %}>
|
2020-02-22 14:22:44 +08:00
|
|
|
|
</div>
|
2020-05-08 21:09:53 +08:00
|
|
|
|
<div class="layui-form-mid layui-word-aux">开启此选项,除注册、登录页面外的所有页面的访问都需要登录</div>
|
2019-12-01 20:44:16 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
2020-03-07 09:30:11 +08:00
|
|
|
|
<div class="layui-form-item">
|
2020-05-02 18:16:57 +08:00
|
|
|
|
<label class="layui-form-label">文集下载</label>
|
2020-03-07 09:30:11 +08:00
|
|
|
|
<div class="layui-input-inline">
|
|
|
|
|
<input type="checkbox" name="enable_project_report" lay-skin="switch" lay-text="开启|关闭" {% if enable_project_report %}checked{% endif %}>
|
|
|
|
|
</div>
|
2020-05-02 18:16:57 +08:00
|
|
|
|
<div class="layui-form-mid layui-word-aux">开启此选项,文集允许导出为EPUB和DOCX等格式文件以供下载,文集拥有者可进行进一步控制特定文集是否开放导出</div>
|
2020-03-07 09:30:11 +08:00
|
|
|
|
</div>
|
2020-02-27 20:58:37 +08:00
|
|
|
|
|
2019-12-01 20:44:16 +08:00
|
|
|
|
<div class="layui-form-item">
|
|
|
|
|
<label class="layui-form-label">启用邮箱</label>
|
2019-12-15 15:45:05 +08:00
|
|
|
|
<div class="layui-input-inline">
|
2019-12-01 20:44:16 +08:00
|
|
|
|
<input type="checkbox" name="enable_email" lay-skin="switch" lay-text="开启|关闭" {% if enable_email %}checked{% endif %}>
|
|
|
|
|
</div>
|
2019-12-15 15:45:05 +08:00
|
|
|
|
<div class="layui-form-mid layui-word-aux">开启此选项后还需进行邮箱信息配置</div>
|
2019-12-01 20:44:16 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="layui-form-item layui-form-text">
|
|
|
|
|
<label class="layui-form-label">统计代码</label>
|
|
|
|
|
<div class="layui-input-block">
|
2020-01-15 21:03:44 +08:00
|
|
|
|
<textarea name="static_code" placeholder="如果需要调用第三方的统计功能,请将第三方统计工具代码输入至此,可以包含<script>标签" class="layui-textarea">{{static_code}}</textarea>
|
2019-12-01 20:44:16 +08:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="layui-form-item layui-form-text">
|
2020-05-02 18:16:57 +08:00
|
|
|
|
<label class="layui-form-label">广告位1</label>
|
2019-12-01 20:44:16 +08:00
|
|
|
|
<div class="layui-input-block">
|
|
|
|
|
<textarea name="ad_code" placeholder="如果需要在文档正文上方添加广告,请将广告相关代码输入至此,可以包含<script>标签" class="layui-textarea">{{ad_code}}</textarea>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2020-05-02 18:16:57 +08:00
|
|
|
|
<div class="layui-form-item layui-form-text">
|
|
|
|
|
<label class="layui-form-label">广告位2</label>
|
|
|
|
|
<div class="layui-input-block">
|
|
|
|
|
<textarea name="ad_code_2" placeholder="此广告位位于文档下方、分享按钮上方,可以包含<script>标签" class="layui-textarea">{{ad_code_2}}</textarea>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2019-12-01 20:44:16 +08:00
|
|
|
|
|
|
|
|
|
<div class="layui-form-item">
|
|
|
|
|
<div class="layui-input-block">
|
2020-04-06 17:36:04 +08:00
|
|
|
|
<button class="layui-btn layui-btn-normal layui-btn-sm" lay-submit lay-filter="formDemo">保存</button>
|
2019-12-01 20:44:16 +08:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</form>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- 网站设置结束 -->
|
2019-12-08 18:59:49 +08:00
|
|
|
|
|
2019-12-01 20:44:16 +08:00
|
|
|
|
<!-- 邮箱设置 -->
|
|
|
|
|
<div class="layui-tab-item">
|
|
|
|
|
<form class="layui-form" action="" method="post">
|
|
|
|
|
{% csrf_token %}
|
|
|
|
|
<input type="text" name="type" hidden value="email">
|
|
|
|
|
<div class="layui-form-item">
|
|
|
|
|
<label class="layui-form-label">发件邮箱</label>
|
|
|
|
|
<div class="layui-input-block">
|
|
|
|
|
<input type="email" name="send_emailer" class="layui-input" required value="{{emailer.value}}">
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="layui-form-item layui-form-text">
|
|
|
|
|
<label class="layui-form-label">SMTP 主机</label>
|
|
|
|
|
<div class="layui-input-block">
|
|
|
|
|
<input type="text" name="smtp_host" class="layui-input" required value="{{email_host.value}}">
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="layui-form-item layui-form-text">
|
|
|
|
|
<label class="layui-form-label">SMTP 端口</label>
|
|
|
|
|
<div class="layui-input-block">
|
|
|
|
|
<input type="number" name="smtp_port" class="layui-input" required value="{{email_port.value}}">
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="layui-form-item layui-form-text">
|
|
|
|
|
<label class="layui-form-label">SMTP 用户名</label>
|
|
|
|
|
<div class="layui-input-block">
|
|
|
|
|
<input type="text" name="smtp_username" class="layui-input" required value="{{email_username.value}}">
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="layui-form-item layui-form-text">
|
|
|
|
|
<label class="layui-form-label">SMTP 密码</label>
|
|
|
|
|
<div class="layui-input-block">
|
|
|
|
|
<input type="password" name="smtp_pwd" class="layui-input" required value="{{email_pwd.value}}">
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="layui-form-item">
|
|
|
|
|
<label class="layui-form-label">使用SSL</label>
|
|
|
|
|
<div class="layui-input-block">
|
|
|
|
|
<input type="checkbox" name="smtp_ssl" lay-skin="switch" lay-text="开启|关闭" {% if email_ssl %}checked{% endif %}>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="layui-form-item">
|
|
|
|
|
<div class="layui-input-block">
|
2020-04-06 17:36:04 +08:00
|
|
|
|
<button class="layui-btn layui-btn-normal layui-btn-sm" lay-submit lay-filter="formDemo">保存邮箱设置</button>
|
2019-12-01 20:44:16 +08:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</form>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- 邮箱设置结束 -->
|
|
|
|
|
<!-- 广告设置 -->
|
|
|
|
|
<div class="layui-tab-item">内容3</div>
|
|
|
|
|
<!-- 广告设置结束 -->
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
{% endblock %}
|