2020-11-26 20:58:33 +08:00
|
|
|
{% load static %}
|
2020-12-02 21:25:59 +08:00
|
|
|
{% load i18n %}
|
2019-12-15 15:45:05 +08:00
|
|
|
<div class="layui-header layui-fluid">
|
|
|
|
<div class="" style="display:flex;flex-direction:row;justify-content:space-between;">
|
|
|
|
<!-- LOGO -->
|
|
|
|
<div class="">
|
|
|
|
<a class="logo" href="{% url 'pro_list' %}">
|
2021-04-15 22:24:47 +08:00
|
|
|
<img src="{% static 'logo.svg' %}" style="height: 32px;width: auto;">
|
2019-12-15 15:45:05 +08:00
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
<!-- 搜索框 -->
|
2020-04-06 17:36:04 +08:00
|
|
|
<div style="margin:12px;" class="layui-hide-xs">
|
2020-11-26 20:58:33 +08:00
|
|
|
<form method="get" action="{% url 'doc_search' %}" target="_blank">
|
2020-04-06 17:36:04 +08:00
|
|
|
<div class="layui-input-inline">
|
2020-12-06 01:33:59 +08:00
|
|
|
<input class="layui-input mrdoc-search-input" placeholder="{% trans '搜索文档' %}" name="q"/>
|
2020-04-06 17:36:04 +08:00
|
|
|
<button type="submit" style="position: absolute;top:12px;right: 8px;border: none;background-color: white;">
|
|
|
|
<i class="layui-icon layui-icon-search" ></i>
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
2020-07-31 20:23:23 +08:00
|
|
|
<div class="layui-hide-lg layui-hide-md layui-hide-sm" style="margin:20px;">
|
|
|
|
<a href="{% url 'search' %}">
|
|
|
|
<i class="layui-icon layui-icon-search" style="font-size: 24px;"></i>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
|
2019-12-15 15:45:05 +08:00
|
|
|
<!-- 新建文档按钮 -->
|
2020-12-06 01:33:59 +08:00
|
|
|
<div class="layui-hide-xs">
|
|
|
|
<ul class="layui-nav">
|
2019-12-15 15:45:05 +08:00
|
|
|
<li class="layui-nav-item">
|
2020-08-30 13:51:26 +08:00
|
|
|
<a>
|
2020-12-06 01:33:59 +08:00
|
|
|
<i class="layui-icon layui-icon-add-circle" style="color:black;"></i> <span>{% trans "新建" %}</span>
|
2019-12-15 15:45:05 +08:00
|
|
|
</a>
|
2020-08-30 13:51:26 +08:00
|
|
|
<dl class="layui-nav-child">
|
2020-11-26 21:59:52 +08:00
|
|
|
<dd>
|
2021-03-02 20:31:10 +08:00
|
|
|
<a href="{% url 'create_doc' %}">
|
2020-11-26 21:59:52 +08:00
|
|
|
<img src="{% static 'icon_img/create-doc-icon.svg' %}" height="14px" width="14px"></img>
|
2020-12-06 01:33:59 +08:00
|
|
|
<span class="layui-hide-xs">{% trans "新建文档" %}</span>
|
2020-11-26 21:59:52 +08:00
|
|
|
</a>
|
|
|
|
</dd>
|
2021-04-11 19:13:00 +08:00
|
|
|
<dd>
|
|
|
|
<a href="{% url 'create_doc' %}?eid=4">
|
|
|
|
<img src="{% static 'icon_img/create-table-icon.svg' %}" height="14px" width="14px"></img>
|
|
|
|
<span class="layui-hide-xs">{% trans "新建表格" %}</span>
|
|
|
|
</a>
|
|
|
|
</dd>
|
2020-08-30 13:51:26 +08:00
|
|
|
{% if request.user.is_authenticated %}
|
|
|
|
<dd>
|
|
|
|
<a href="javascript:void(0);" onclick="createPro();">
|
|
|
|
<img src="{% static 'icon_img/create-pro-icon.svg' %}" height="14px" width="14px"></img>
|
2020-12-06 01:33:59 +08:00
|
|
|
<span class="layui-hide-xs">{% trans "新建文集" %}</span>
|
2020-08-30 13:51:26 +08:00
|
|
|
</a>
|
|
|
|
</dd>
|
|
|
|
{% endif %}
|
|
|
|
</dl>
|
2019-12-15 15:45:05 +08:00
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
<!-- 用户菜单 -->
|
|
|
|
<div class="">
|
2020-07-31 20:23:23 +08:00
|
|
|
<ul class="layui-nav layui-layout-right">
|
|
|
|
{% if request.user.is_authenticated %}
|
2019-12-01 20:44:16 +08:00
|
|
|
<li class="layui-nav-item">
|
2020-07-31 20:23:23 +08:00
|
|
|
<a href="javascript:void(0);">
|
2020-10-18 08:05:41 +08:00
|
|
|
<i class="layui-icon layui-icon-friends"></i>
|
|
|
|
<span class="layui-hide-xs">{% if request.user.first_name != '' %} {{request.user.first_name}} {% else %} {{request.user.username}}{% endif %}</span>
|
2020-07-31 20:23:23 +08:00
|
|
|
</a>
|
|
|
|
<dl class="layui-nav-child">
|
|
|
|
{% if request.user.is_superuser %}
|
|
|
|
<dd>
|
2021-01-10 22:21:08 +08:00
|
|
|
<a href="{% url 'admin_center' %}" title="进入站点后台管理">
|
2020-07-31 20:23:23 +08:00
|
|
|
<i class="layui-icon layui-icon-console layui-hide-md"></i>
|
2020-12-06 01:33:59 +08:00
|
|
|
<span class="layui-hide-xs">{% trans "进入后台" %}</span>
|
2020-07-31 20:23:23 +08:00
|
|
|
</a>
|
|
|
|
</dd>
|
|
|
|
{% endif %}
|
2021-01-10 22:21:08 +08:00
|
|
|
<dd class="layui-hide-md layui-hide-sm layui-hide-lg">
|
|
|
|
<a href="{% url 'create_doc' %}" title="新建文档">
|
2020-07-31 20:23:23 +08:00
|
|
|
<i class="layui-icon layui-icon-add-1 layui-hide-md"></i>
|
2021-01-10 22:21:08 +08:00
|
|
|
<span class="layui-hide-xs">{% trans "新建文档" %}</span>
|
2020-07-31 20:23:23 +08:00
|
|
|
</a>
|
|
|
|
</dd>
|
|
|
|
<dd>
|
2021-01-10 22:21:08 +08:00
|
|
|
<a href="{% url 'user_center' %}" title="个人中心">
|
2020-07-31 20:23:23 +08:00
|
|
|
<i class="layui-icon layui-icon-app layui-hide-md"></i>
|
2020-12-06 01:33:59 +08:00
|
|
|
<span class="layui-hide-xs">{% trans "个人中心" %}</span>
|
2020-07-31 20:23:23 +08:00
|
|
|
</a>
|
|
|
|
</dd>
|
|
|
|
<dd>
|
2021-01-10 22:21:08 +08:00
|
|
|
<a href="javascript:void(0);" onclick="changePwd('{{ request.user.id }}','{{ request.user.username }}' )" title="修改登录密码">
|
2020-07-31 20:23:23 +08:00
|
|
|
<i class="layui-icon layui-icon-password layui-hide-md"></i>
|
2020-12-06 01:33:59 +08:00
|
|
|
<span class="layui-hide-xs">{% trans "修改密码" %}</span>
|
2020-07-31 20:23:23 +08:00
|
|
|
</a>
|
|
|
|
</dd>
|
|
|
|
<dd>
|
2021-01-10 22:21:08 +08:00
|
|
|
<a href="{% url 'logout' %}" title="退出登录">
|
|
|
|
<i class="layui-icon layui-icon-logout layui-hide-md"></i>
|
2020-12-06 01:33:59 +08:00
|
|
|
<span class="layui-hide-xs">{% trans "退出登录" %}</span>
|
2020-07-31 20:23:23 +08:00
|
|
|
</a>
|
|
|
|
</dd>
|
|
|
|
</dl>
|
|
|
|
</li>
|
2019-12-01 20:44:16 +08:00
|
|
|
{% else %}
|
2020-07-31 20:23:23 +08:00
|
|
|
<li class="layui-nav-item">
|
|
|
|
<a href="javascript:void(0);">
|
2020-12-06 01:33:59 +08:00
|
|
|
<i class="layui-icon layui-icon-username"></i> {% trans "游客" %}
|
2020-07-31 20:23:23 +08:00
|
|
|
</a>
|
|
|
|
<dl class="layui-nav-child">
|
|
|
|
{% if close_register == 'on' %}
|
2021-04-15 22:24:47 +08:00
|
|
|
<dd>
|
|
|
|
<a href="{% url 'login' %}">
|
|
|
|
<i class="iconfont mrdoc-icon-denglu"></i>
|
|
|
|
{% trans "登录" %}
|
|
|
|
</a>
|
|
|
|
</dd>
|
2020-07-31 20:23:23 +08:00
|
|
|
{% else %}
|
2021-04-15 22:24:47 +08:00
|
|
|
<dd>
|
|
|
|
<a href="{% url 'register' %}">
|
|
|
|
<i class="iconfont mrdoc-icon-zhuce"></i>
|
|
|
|
{% trans "注册" %}
|
|
|
|
</a>
|
|
|
|
</dd>
|
|
|
|
<dd>
|
|
|
|
<a href="{% url 'login' %}">
|
|
|
|
<i class="iconfont mrdoc-icon-denglu"></i>
|
|
|
|
{% trans "登录" %}
|
|
|
|
</a>
|
|
|
|
</dd>
|
2020-07-31 20:23:23 +08:00
|
|
|
{% endif %}
|
|
|
|
</dl>
|
|
|
|
</li>
|
2019-12-01 20:44:16 +08:00
|
|
|
{% endif %}
|
2020-07-31 20:23:23 +08:00
|
|
|
</ul>
|
2019-12-15 15:45:05 +08:00
|
|
|
</div>
|
2019-12-01 20:44:16 +08:00
|
|
|
</div>
|
|
|
|
</div>
|