添加模板国际化过滤器标签

This commit is contained in:
yangjian 2020-12-02 21:25:59 +08:00
parent a5d6ad8d89
commit e23e7e58ac
63 changed files with 237 additions and 130 deletions

View File

@ -1,9 +1,10 @@
{% load static %}
{% load i18n %}
<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta charset="UTF-8">
<title>拒绝访问 - {% if site_name != None %}{{site_name}} {% else %}觅道文档MrDoc{% endif %}</title>
<title>{% trans "拒绝访问" %} - {% if site_name != None %}{{site_name}} {% else %}{% trans "觅道文档MrDoc" %}{% endif %}</title>
<link href="{% static 'layui/css/layui.css' %}" rel="stylesheet">
<link href="{% static 'mrdoc/mrdoc.css' %}" rel="stylesheet">
<link rel="icon" href="{% static 'search/mrdoc_logo_300.png' %}" sizes="192x192" />
@ -16,10 +17,9 @@
<div class="layui-main">
<div style="text-align: center;margin-top: 40px;">
<h1>
<strong>你无权访问当前页面……</strong>
<strong>{% trans "你无权访问当前页面……" %}</strong>
</h1>
<!--<img src="{% static '404.png' %}">-->
<p><a href="{% url 'pro_list' %}" >返回首页</a></p>
<p><a href="{% url 'pro_list' %}" >{% trans "返回首页" %}</a></p>
</div>
</div>

View File

@ -1,9 +1,10 @@
{% load static %}
{% load i18n %}
<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta charset="UTF-8">
<title>404 页面未找到 - {% if site_name != None %}{{site_name}} {% else %}觅道文档MrDoc{% endif %}</title>
<title>{% trans "页面未找到" %} - {% if site_name != None %}{{site_name}} {% else %}{% trans "觅道文档MrDoc" %}{% endif %}</title>
<link href="{% static 'layui/css/layui.css' %}" rel="stylesheet">
<link href="{% static 'mrdoc/mrdoc.css' %}" rel="stylesheet">
<link rel="icon" href="{% static 'search/mrdoc_logo_300.png' %}" sizes="192x192" />
@ -15,7 +16,7 @@
<div class="layui-main">
<div style="text-align: center;">
<img src="{% static '404.png' %}">
<p><a href="{% url 'pro_list' %}" >返回首页</a></p>
<p><a href="{% url 'pro_list' %}" >{% trans "返回首页" %}</a></p>
</div>
</div>

View File

@ -1,4 +1,5 @@
{% load static %}
{% load i18n %}
<!DOCTYPE html>
<html>
<head>

View File

@ -1,4 +1,5 @@
{% load static %}
{% load i18n %}
<!DOCTYPE html>
<html>
<head>

View File

@ -1,5 +1,6 @@
{% extends 'app_admin/admin_base.html' %}
{% load static %}
{% load i18n %}
{% block title %}文档管理{% endblock %}
{% block content %}
<div class="layui-card">

View File

@ -1,5 +1,6 @@
{% extends 'app_admin/admin_base.html' %}
{% load static %}
{% load i18n %}
{% block title %}文档模板管理{% endblock %}
{% block content %}
<div class="layui-card">

View File

@ -1,5 +1,6 @@
{% extends 'app_admin/admin_base.html' %}
{% load static %}
{% load i18n %}
{% block title %}仪表盘{% endblock %}
{% block custom_element %}

View File

@ -1,5 +1,6 @@
{% extends 'app_admin/admin_base.html' %}
{% load static %}
{% load i18n %}
{% block title %}文集管理{% endblock %}
{% block content %}
<div class="layui-card">

View File

@ -1,5 +1,6 @@
{% extends 'app_admin/admin_base.html' %}
{% load static %}
{% load i18n %}
{% block title %}文集权限管理{% endblock %}
{% block custom_element %}
<link href="{% static 'tagsInput/tagsinput.css' %}" rel="stylesheet" type="text/css"/>

View File

@ -1,5 +1,6 @@
{% extends 'app_admin/admin_base.html' %}
{% load static %}
{% load i18n %}
{% block title %}注册码管理{% endblock %}
{% block content %}
<div class="layui-card">

View File

@ -1,5 +1,6 @@
{% extends 'app_admin/admin_base.html' %}
{% load static %}
{% load i18n %}
{% block title %}站点设置{% endblock %}
{% block custom_element %}
<link href="{% static 'tagsInput/tagsinput.css' %}" rel="stylesheet" type="text/css"/>

View File

@ -1,5 +1,6 @@
{% extends 'app_admin/admin_base.html' %}
{% load static %}
{% load i18n %}
{% block title %}用户管理{% endblock %}
{% block content %}
<div class="layui-card">

View File

@ -1,5 +1,6 @@
{% extends 'app_doc/user/user_base.html' %}
{% load static %}
{% load i18n %}
{% block title %}用户Token管理{% endblock %}
{% block content %}
<div class="layui-card">

View File

@ -1,4 +1,5 @@
{% load static %}
{% load i18n %}
<!DOCTYPE html>
<html lang="zh-cn">
<head>

View File

@ -1,4 +1,5 @@
{% load static %}
{% load i18n %}
<!DOCTYPE html>
<html lang='zh-CN'>
<head>

View File

@ -1,4 +1,5 @@
{% load static %}
{% load i18n %}
<!DOCTYPE html>
<html lang="zh-cn">
<head>

View File

@ -2,6 +2,7 @@
{% extends 'app_doc/docs_base.html' %}
<!-- 引入静态文件 -->
{% load static %}
{% load i18n %}
{% block keyword %}{{ doc.name }},{{ project.name }},{% endblock %}
{% block description %}{{doc.pre_content | slice:"0:100"}}{% endblock %}

View File

@ -1,4 +1,5 @@
{% load static %}
{% load i18n %}
<!DOCTYPE html>
<html lang="zh-cn" style="font-size: 14px;">
<head>

View File

@ -1,4 +1,5 @@
{% load static %}
{% load i18n %}
<!DOCTYPE html>
<html lang="zh-cn">
<head>

View File

@ -1,4 +1,5 @@
{% load static %}
{% load i18n %}
<!DOCTYPE html>
<html lang="zh-cn">
<head>
@ -30,7 +31,7 @@
<div class="doc layui-fluid" style="padding-left:0px;">
<!-- 左侧工具栏 -->
<div class="doc-summary">
<div class="project-title"><i class="fa fa-edit"></i> MrDoc文档编辑器<br>
<div class="project-title"><i class="fa fa-edit"></i> {% trans "MrDoc文档编辑器" %}<br>
<span style="font-size: 14px;">你正在:{% block editor_type %}{% endblock %}</span>
</div>
<hr>
@ -672,4 +673,22 @@
return false
});
</script>
<!-- 文档本地缓存div模板 -->
<div class="layui-form" id="doc-cache-div" style="display: none;">
<div style="margin: 5px;">
<textarea name="desc" id="doc-cache-content" class="layui-textarea" style="height: 350px;" disabled></textarea>
</div>
</div>
<script>
// 文档浏览器缓存
function autoCacheDoc(){
setInterval(() => {
var editor_value = editor.getValue()
window.localStorage.setItem('mrdoc_doc_cache',editor_value)
}, 10000);
};
autoCacheDoc();
</script>
</html>

View File

@ -1,5 +1,6 @@
{% extends 'app_doc/editor/create_base_2.html' %}
{% load static %}
{% load i18n %}
{% block title %}新建文档 - Editormd编辑模式{% endblock %}
{% block editor_type %}新建文档{% endblock %}

View File

@ -1,5 +1,6 @@
{% extends 'app_doc/editor/create_base_vditor.html' %}
{% load static %}
{% load i18n %}
{% block title %}新建文档 - Vditor编辑模式{% endblock %}
{% block editor_type %}新建文档{% endblock %}
@ -24,6 +25,10 @@
<i class="fa fa-clipboard"></i> 导入模板
</button>
<button class="layui-btn layui-btn-primary layui-btn-sm mrdoc-btn-default" id="doc-cache-btn" title="查看浏览器缓存">
本地缓存
</button>
<!-- <input type="file" id="insert-local-file" onchange="insertLocalFile(this)" style="display:none;">
<button class="layui-btn layui-btn-primary layui-btn-sm mrdoc-btn-default" id="sel-local" onclick="selectLocalFile()" title="插入本地文本文件内容">
<i class="fa fa-upload"></i> 导入文本
@ -381,6 +386,39 @@
function selectLocalFile(){
$("#insert-local-file").trigger("click");
};
// 查看本地文档缓存
$("#doc-cache-btn").click(function(){
var editor_cache = window.localStorage.getItem('mrdoc_doc_cache') // 获取文档缓存内容
var editor_cache_cnt = editor_cache.replace(/\s+|[\r\n]/g,"").length
if(editor_cache_cnt > 5){ // 文档缓存去除空格换行后长度大于5
console.log("存在文档缓存")
$("#doc-cache-content").val(editor_cache)
layer.open({
title:"浏览器文档缓存",
type:1,
id:'doc-cache',
area:['500px','500px'],
content:$('#doc-cache-div'),
btn:['使用缓存',"删除缓存"],
success : function(index, layero) { // 成功弹出后回调
form.render();
},
yes:function(index, layero){
editor.setValue(editor_cache)
window.localStorage.removeItem('mrdoc_doc_cache')
layer.closeAll()
autoCacheDoc();
},
btn2:function(index,layero){
window.localStorage.removeItem('mrdoc_doc_cache')
layer.closeAll()
}
})
}else{
layer.msg("暂无本地缓存")
}
})
</script>
{% endblock %}

View File

@ -1,5 +1,6 @@
{% extends 'app_doc/editor/create_base_2.html' %}
{% load static %}
{% load i18n %}
{% block title %}新建文档模板{% endblock %}
{% block editor_type %}新建模板{% endblock %}

View File

@ -1,5 +1,6 @@
{% extends 'app_doc/editor/create_base_vditor.html' %}
{% load static %}
{% load i18n %}
{% block title %}新建文档模板{% endblock %}
{% block editor_type %}新建模板{% endblock %}

View File

@ -1,5 +1,6 @@
{% extends 'app_doc/editor/create_base_2.html' %}
{% load static %}
{% load i18n %}
{% block title %}修改文档{% endblock %}
{% block editor_type %}修改文档{% endblock %}

View File

@ -1,5 +1,6 @@
{% extends 'app_doc/editor/create_base_vditor.html' %}
{% load static %}
{% load i18n %}
{% block title %}修改文档{% endblock %}
{% block editor_type %}修改文档{% endblock %}

View File

@ -1,5 +1,6 @@
{% extends 'app_doc/editor/create_base_2.html' %}
{% load static %}
{% load i18n %}
{% block title %}修改文档模板{% endblock %}
{% block editor_type %}修改文档模板{% endblock %}

View File

@ -1,5 +1,6 @@
{% extends 'app_doc/editor/create_base_vditor.html' %}
{% load static %}
{% load i18n %}
{% block title %}修改文档模板 - {{doctemp.name}}{% endblock %}
{% block editor_type %}修改文档模板{% endblock %}

View File

@ -1,4 +1,5 @@
{% load static %}
{% load i18n %}
<div class="layui-header layui-fluid">
<div class="" style="display:flex;flex-direction:row;justify-content:space-between;">
<!-- LOGO -->

View File

@ -1,5 +1,6 @@
{% extends 'app_doc/user/user_base.html' %}
{% load static %}
{% load i18n %}
{% block title %}附件管理{% endblock %}
{% block content %}
<div class="layui-card">

View File

@ -1,5 +1,6 @@
{% extends 'app_doc/user/user_base.html' %}
{% load static %}
{% load i18n %}
{% block title %}文档管理{% endblock %}
{% block content %}
<div class="layui-card">

View File

@ -1,5 +1,6 @@
{% extends 'app_doc/user/user_base.html' %}
{% load static %}
{% load i18n %}
{% block title %}文档历史版本管理{% endblock %}
{% block content %}
<div class="layui-card">

View File

@ -1,5 +1,6 @@
{% extends 'app_doc/user/user_base.html' %}
{% load static %}
{% load i18n %}
{% block title %}文档回收站管理{% endblock %}
{% block content %}
<div class="layui-card">

View File

@ -1,5 +1,6 @@
{% extends 'app_doc/user/user_base.html' %}
{% load static %}
{% load i18n %}
{% block title %}文档分享管理{% endblock %}
{% block content %}

View File

@ -1,5 +1,6 @@
{% extends 'app_doc/user/user_base.html' %}
{% load static %}
{% load i18n %}
{% block title %}文档标签管理{% endblock %}
{% block content %}
<div class="layui-card">

View File

@ -1,5 +1,6 @@
{% extends 'app_doc/user/user_base.html' %}
{% load static %}
{% load i18n %}
{% block title %}文档模板管理{% endblock %}
{% block content %}
<div class="layui-card">

View File

@ -1,5 +1,6 @@
{% extends 'app_doc/user/user_base.html' %}
{% load static %}
{% load i18n %}
{% block title %}图片素材管理{% endblock %}
{% block custom_element %}

View File

@ -1,5 +1,6 @@
{% extends 'app_doc/user/user_base.html' %}
{% load static %}
{% load i18n %}
{% block title %}图片分组管理{% endblock %}
{% block content %}
<div class="layui-card">

View File

@ -1,5 +1,6 @@
{% extends 'app_doc/user/user_base.html' %}
{% load static %}
{% load i18n %}
{% block title %}仪表盘{% endblock %}
{% block custom_element %}
@ -89,7 +90,7 @@
src="{% static 'PearAdminLayui/avatar.svg' %}"></a></div>
<div>
{% if doc.status == 1 %}
<p>{{doc.create_user.first_name}} 发布了文档 <a href="{% url 'doc' doc.top_doc doc.id %}" target="_blank">{{doc.name}}</a></p>
<p>{{doc.create_user.first_name}} 修改了文档 <a href="{% url 'doc' doc.top_doc doc.id %}" target="_blank">{{doc.name}}</a></p>
{% elif doc.status == 0 %}
<p>{{doc.create_user.first_name}} 保存了文档 <a href="{% url 'modify_doc' doc.id %}" target="_blank">{{doc.name}}</a></p>
{% else %}

View File

@ -1,5 +1,6 @@
{% extends 'app_doc/user/user_base.html' %}
{% load static %}
{% load i18n %}
{% block title %}文集管理{% endblock %}
{% block content %}
<div class="layui-card">

View File

@ -1,5 +1,6 @@
{% extends 'app_doc/user/user_base.html' %}
{% load static %}
{% load i18n %}
{% block title %}文集协作管理{% endblock %}
{% block content %}
<div class="layui-card">

View File

@ -1,5 +1,6 @@
{% extends 'app_doc/user/user_base.html' %}
{% load static %}
{% load i18n %}
{% block title %}文集文档排序{% endblock %}
{% block custom_element %}
<link href="{% static 'tagsInput/tagsinput.css' %}" rel="stylesheet" type="text/css"/>

View File

@ -1,5 +1,6 @@
{% extends 'app_doc/user/user_base.html' %}
{% load static %}
{% load i18n %}
{% block title %}导入文集{% endblock %}
{% block content %}
<div class="layui-card">

View File

@ -1,5 +1,6 @@
{% extends 'app_doc/user/user_base.html' %}
{% load static %}
{% load i18n %}
{% block title %}文集设置{% endblock %}
{% block custom_element %}
<link href="{% static 'tagsInput/tagsinput.css' %}" rel="stylesheet" type="text/css"/>

View File

@ -1,5 +1,6 @@
{% extends 'app_doc/user/user_base.html' %}
{% load static %}
{% load i18n %}
{% block title %}我协作的文集{% endblock %}
{% block content %}
<div class="layui-card">

View File

@ -1,5 +1,6 @@
{% extends 'app_doc/user/user_base.html' %}
{% load static %}
{% load i18n %}
{% block title %}文集设置{% endblock %}
{% block content %}
<div class="layui-card">

View File

@ -1,5 +1,6 @@
{% extends 'app_doc/user/user_base.html' %}
{% load static %}
{% load i18n %}
{% block title %}个人设置{% endblock %}
{% block content %}
<div class="layui-card">

View File

@ -1,4 +1,5 @@
{% load static %}
{% load i18n %}
<!DOCTYPE html>
<html lang="zh-cn">
<head>

View File

@ -2,6 +2,7 @@
{% extends 'app_doc/docs_base.html' %}
<!-- 引入静态文件 -->
{% load static %}
{% load i18n %}
{% block title %}{{ project.name }}{% endblock %}
@ -9,12 +10,12 @@
{% if request.user == project.create_user or colla_user > 0 %}
<span class="btn pull-left">|</span>
<a class="btn pull-left" href="{% url 'create_doc' %}?pid={{project.id}}" target="_blank">
<i class="fa fa-plus-square"></i> <span class="layui-hide-xs">添加</span>
<i class="fa fa-plus-square"></i> <span class="layui-hide-xs">{% trans "添加" %}</span>
</a>
{% endif %}
{% if request.user == project.create_user %}
<a class="btn pull-left" href="{% url 'manage_project' %}" target="_blank">
<i class="fa fa-cubes"></i> <span class="layui-hide-xs">管理</span>
<i class="fa fa-cubes"></i> <span class="layui-hide-xs">{% trans "管理" %}</span>
</a>
{% endif %}
{% endblock %}
@ -22,8 +23,8 @@
{% block content_head %}
<h1>{{ project.name }}</h1><hr>
<p style="" class="project-doc-content-head">
<i class="fa fa-user"></i> 创建人:{% if project.create_user.first_name != '' %} {{project.create_user.first_name}} {% else %} {{project.create_user}}{% endif %}
&nbsp;&nbsp;&nbsp;&nbsp;<i class="fa fa-timer"></i> 创建于:{{ project.create_time }}
<i class="fa fa-user"></i> {% trans "创建人:" %}{% if project.create_user.first_name != '' %} {{project.create_user.first_name}} {% else %} {{project.create_user}}{% endif %}
&nbsp;&nbsp;&nbsp;&nbsp;<i class="fa fa-timer"></i> {% trans "创建于:" %}{{ project.create_time }}
</p>
{% endblock %}
@ -32,11 +33,11 @@
{% load doc_filter %}
<div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
<ul class="layui-tab-title">
<li class="layui-this">简介</li>
<li>目录大纲</li>
<li>最新文档</li>
<li class="layui-this">{% trans "简介" %}</li>
<li>{% trans "目录大纲" %}</li>
<li>{% trans "最新文档" %}</li>
{% if enable_project_report %}
<li>文集下载</li>
<li>{% trans "文集下载" %}</li>
{% endif %}
</ul>
<div class="layui-tab-content" style="padding: 0;">
@ -78,10 +79,10 @@
<a href="javascript:void(0);" onclick="reportFile('{{project.id}}','pdf')"><i class="fa fa-download"></i> <u>PDF电子书</u></a>
{% endif %}
{% if allow_download.allow_pdf == 0 and allow_download.allow_epub == 0 %}
<a>文集作者未开放此文集的任何格式下载!</a>
<a>{% trans "文集作者未开放此文集的任何格式下载!" %}</a>
{% endif %}
{% else %}
<a>文集作者未开放此文集的任何格式下载!</a>
<a>{% trans "文集作者未开放此文集的任何格式下载!" %}</a>
{% endif %}
</span>
</p>
@ -130,7 +131,7 @@
{% block doc_bottom_block %}
<button id="share" class="doc-bottom-btn" tooltip="分享本文档" style="padding-left: 20px;">
<i class="fa fa-share-alt" ></i> 分享
<i class="fa fa-share-alt" ></i> {% trans "分享" %}
</button>
{% endblock %}

View File

@ -2,19 +2,20 @@
{% extends 'app_doc/docs_base.html' %}
<!-- 引入静态文件 -->
{% load static %}
{% load i18n %}
{% block title %}搜索“{{kw}}”的结果 - {{ project.name }}{% endblock %}
{% block title %}{% trans "搜索" %} {{kw}} {% trans "的结果" %} - {{ project.name }}{% endblock %}
{% block head_toolbar %}
{% if request.user == project.create_user %}
<a class="btn pull-left" aria-label="" href="{% url 'create_doc' %}?pid={{project.id}}" target="_blank">
<i class="fa fa-edit"></i> 添加文档
<i class="fa fa-edit"></i> {% trans "添加文档" %}
</a>
{% endif %}
{% endblock %}
{% block content_head %}
<h1>搜索“{{kw}}”共有{{ search_result.count }}个结果 - {{project.name}}</h1><hr>
<h1>{% trans "搜索" %} {{kw}} {% trans "共有" %}{{ search_result.count }}{% trans "个结果" %} - {{project.name}}</h1><hr>
{% endblock %}
{% block page_content %}

View File

@ -1,7 +1,7 @@
{% load static %}
{% load i18n %}
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
@ -22,7 +22,7 @@
<!--QQ强制全屏-->
<meta name="x5-page-mode" content="app">
<!--QQ应用模式-->
<title>觅道搜索{% if site_name != None and site_name != '' %} - {{site_name}}{% endif %}</title>
<title>{% trans "觅道搜索" %}{% if site_name != None and site_name != '' %} - {{site_name}}{% endif %}</title>
<style>
</style>
</head>
@ -39,7 +39,7 @@
<button type="submit" style="background-image: url(/static/search/search_btn.svg);"></button>
</form>
<ul>
<li><a href="/"><i style="background-image: url(/static/search/home_btn.svg);"></i>返回首页</a></li>
<li><a href="/"><i style="background-image: url(/static/search/home_btn.svg);"></i>{% trans "返回首页" %}</a></li>
</ul>
</div>
</div>

View File

@ -1,4 +1,5 @@
{% load static %}
{% load i18n %}
<!DOCTYPE html>
<html lang="zh-cn">
<head>
@ -10,7 +11,7 @@
<meta name="keywords" content="{% if site_keywords != None %}{{site_keywords}}{% endif %}"/>
<meta name="description" content="{% if site_desc != None %}{{site_desc}}{% endif %}" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title>{{ kw }} - 觅道搜索 - {% if site_name != None and site_name != '' %}{{ site_name }}{% endif %}</title>
<title>{{ kw }} - {% trans "觅道搜索" %} - {% if site_name != None and site_name != '' %}{{ site_name }}{% endif %}</title>
<link href="{% static 'layui/css/layui.css' %}" rel="stylesheet">
<link href="{% static 'mrdoc/mrdoc.css' %}?version={{mrdoc_version}}" rel="stylesheet">
<link href="{% static 'mrdoc/mrdoc-search-result.css' %}?version={{mrdoc_version}}" rel="stylesheet">
@ -57,7 +58,7 @@
<dd>
<a href="{% url 'pro_list' %}">
<i class="layui-icon layui-icon-console layui-hide-md"></i>
<span class="layui-hide-xs">返回首页</span>
<span class="layui-hide-xs">{% trans "返回首页" %}</span>
</a>
</dd>
{% endif %}
@ -69,19 +70,19 @@
<dd>
<a href="{% url 'manage_doc' %}">
<i class="layui-icon layui-icon-app layui-hide-md"></i>
<span class="layui-hide-xs">个人中心</span>
<span class="layui-hide-xs">{% trans "个人中心" %}</span>
</a>
</dd>
<dd>
<a href="javascript:void(0);" onclick="changePwd('{{ request.user.id }}','{{ request.user.username }}' )">
<i class="layui-icon layui-icon-password layui-hide-md"></i>
<span class="layui-hide-xs">修改密码</span>
<span class="layui-hide-xs">{% trans "修改密码" %}</span>
</a>
</dd>
<dd>
<a href="{% url 'logout' %}">
<i class="layui-icon layui-icon-release layui-hide-md"></i>
<span class="layui-hide-xs">退出登录</span>
<span class="layui-hide-xs">{% trans "退出登录" %}</span>
</a>
</dd>
</dl>
@ -89,15 +90,15 @@
{% else %}
<li class="layui-nav-item">
<a href="javascript:void(0);">
<i class="layui-icon layui-icon-username"></i> 游客
<i class="layui-icon layui-icon-username"></i> {% trans "游客" %}
</a>
<dl class="layui-nav-child">
<!-- <dd><a href="">基本资料</a></dd> -->
{% if close_register == 'on' %}
<dd><a href="{% url 'login' %}">登录</a></dd>
<dd><a href="{% url 'login' %}">{% trans "登录" %}</a></dd>
{% else %}
<dd><a href="{% url 'register' %}">注册</a></dd>
<dd><a href="{% url 'login' %}">登录</a></dd>
<dd><a href="{% url 'register' %}">{% trans "注册" %}</a></dd>
<dd><a href="{% url 'login' %}">{% trans "登录" %}</a></dd>
{% endif %}
</dl>
</li>
@ -139,20 +140,20 @@
<div class="layui-inline">
<!-- 文档搜索 -->
<div class="layui-input-inline" style="width: inherit;">
<a href="{% url 'doc_search' %}?q={{kw}}&d_range={{d_range}}" class="search_type" id="search_doc"><i class="layui-icon layui-icon-search"></i>文档</a>
<a href="{% url 'search' %}?kw={{kw}}&type=pro&d_range={{d_range}}" class="search_type" id="search_project"><i class="layui-icon layui-icon-list"></i>文集</a>
<a href="{% url 'search' %}?kw={{kw}}&type=tag&d_range={{d_range}}" class="search_type" id="search_tag"><i class="layui-icon layui-icon-note"></i>标签</a>
<a href="{% url 'doc_search' %}?q={{kw}}&d_range={{d_range}}" class="search_type" id="search_doc"><i class="layui-icon layui-icon-search"></i>{% trans "文档" %}</a>
<a href="{% url 'search' %}?kw={{kw}}&type=pro&d_range={{d_range}}" class="search_type" id="search_project"><i class="layui-icon layui-icon-list"></i>{% trans "文集" %}</a>
<a href="{% url 'search' %}?kw={{kw}}&type=tag&d_range={{d_range}}" class="search_type" id="search_tag"><i class="layui-icon layui-icon-note"></i>{% trans "标签" %}</a>
</div>
</div>
<!-- 筛选结束 -->
<div class="layui-input-inline" style="float: right;">
<select name="d_range" lay-verify="sel_recent" id="sel_recent">
<option value="">时间筛选</option>
<option value="all">全部时间</option>
<option value="recent1">近1天</option>
<option value="recent7">近7天</option>
<option value="recent30">近30天</option>
<option value="recent365">近1年</option>
<option value="">{% trans "时间筛选" %}</option>
<option value="all">{% trans "全部时间" %}</option>
<option value="recent1">{% trans "近1天" %}</option>
<option value="recent7">{% trans "近7天" %}</option>
<option value="recent30">{% trans "近30天" %}</option>
<option value="recent365">{% trans "近1年" %}</option>
</select>
</div>
</div>
@ -164,19 +165,19 @@
<!-- 搜索结果提示 -->
{% if kw != '' %}
<div style="padding: 0 15px;margin-top: 10px;margin-bottom: 10px;color: #999;">
觅道文档在
{% trans "觅道文档在" %}
{% if date_range == 'recent1' %}
近1天内
{% trans "近1天内" %}
{% elif date_range == 'recent7' %}
近7天内
{% trans "近7天内" %}
{% elif date_range == 'recent30' %}
近30天内
{% trans "近30天内" %}
{% elif date_range == 'recent365' %}
近一年内
{% trans "近一年内" %}
{% else %}
全部时间内
{% trans "全部时间内" %}
{% endif %}
搜索到 {{ data_list.count }} 条结果
{% trans "搜索到" %} {{ data_list.count }} {% trans "条结果" %}
</div>
{% endif %}
@ -242,9 +243,9 @@
<div class="layui-box layui-laypage layui-laypage-default">
<!-- 上一页 -->
{% if datas.has_previous %}
<a href="?page={{ datas.previous_page_number }}&kw={{kw}}&type={{search_type}}&d_range={{date_range}}" class="layui-btn layui-btn-xs layui-btn-normal">上一页</a>
<a href="?page={{ datas.previous_page_number }}&kw={{kw}}&type={{search_type}}&d_range={{date_range}}" class="layui-btn layui-btn-xs layui-btn-normal">{% trans "上一页" %}</a>
{% else %}
<a href="javascript:;" class="layui-btn layui-btn-xs layui-btn-disabled">上一页</a>
<a href="javascript:;" class="layui-btn layui-btn-xs layui-btn-disabled">{% trans "上一页" %}</a>
{% endif %}
<!-- 当前页 -->
<span class="layui-laypage-curr">
@ -253,9 +254,9 @@
</span>
<!-- 下一页 -->
{% if datas.has_next %}
<a href="?page={{ datas.next_page_number }}&kw={{kw}}&type={{search_type}}&d_range={{date_range}}" class="layui-btn layui-btn-xs layui-btn-normal">下一页</a>
<a href="?page={{ datas.next_page_number }}&kw={{kw}}&type={{search_type}}&d_range={{date_range}}" class="layui-btn layui-btn-xs layui-btn-normal">{% trans "下一页" %}</a>
{% else %}
<a class="layui-btn layui-btn-xs layui-btn-disabled">下一页</a>
<a class="layui-btn layui-btn-xs layui-btn-disabled">{% trans "下一页" %}</a>
{% endif %}
</div>
</div>

View File

@ -1,4 +1,5 @@
{% load static %}
{% load i18n %}
<!DOCTYPE html>
<html lang='zh-CN'>
<head>

View File

@ -1,4 +1,5 @@
{% load static %}
{% load i18n %}
<!DOCTYPE html>
<html lang="zh-cn" style="font-size: 14px;">
<head>

View File

@ -1,4 +1,5 @@
{% load static %}
{% load i18n %}
<!DOCTYPE html>
<html lang="zh-cn" style="font-size: 14px;">
<head>
@ -11,7 +12,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="keywords" content="{% if site_keywords != None %}{{site_keywords}}{% endif %}"/>
<meta name="description" content="{% if site_desc != None %}{{site_desc}}{% endif %}" />
<title>{% block title %}标签:{{tag.name}}{% endblock %} - {% if site_name != None and site_name != '' %}{{ site_name }}{% else %}站点标题{% endif %}</title>
<title>{% block title %}{% trans "标签:" %}{{tag.name}}{% endblock %} - {% if site_name != None and site_name != '' %}{{ site_name }}{% else %}{% trans "站点标题" %}{% endif %}</title>
<link href="{% static 'layui/css/layui.css' %}?version={{mrdoc_version}}" rel="stylesheet">
<link rel="stylesheet" href="{% static 'editor.md/css/editormd.css' %}?version={{mrdoc_version}}" />
@ -40,10 +41,6 @@
.doc-content ul ul ul li{
list-style-type: square;
}
/* 下拉目录隐藏li样式 */
.editormd-toc-menu ul.markdown-toc-list li{
/*list-style:none;*/
}
/* 弹出框文档目录样式 */
ul.markdown-toc-list{
list-style-position:inside;
@ -124,7 +121,7 @@
</form>
<!-- 文集名称 -->
<div class="project-title">
<i class="fa fa-tag"></i> 标签:<a href="{% url 'tag_docs' tag.id %}">{{ tag.name }}
<i class="fa fa-tag"></i> {% trans "标签:" %}<a href="{% url 'tag_docs' tag.id %}">{{ tag.name }}
{% if project.role == 1 %}
<i class="layui-icon layui-icon-password" title="私密文档"></i>
{% endif %}
@ -145,7 +142,7 @@
</ul>
</nav>
<div class="bq">
<a href="javascript:void(0);" class="mrdoc-link" id="dashang">本文档使用MrDoc发布</a>
<a href="javascript:void(0);" class="mrdoc-link" id="dashang">{% trans "本文档使用MrDoc发布" %}</a>
</div>
<!-- 右下角广告块 -->
<!-- 广告代码开始 -->
@ -182,7 +179,7 @@
{% endblock %}
<a class="btn pull-right" aria-label="" href="{% url 'pro_list' %}">
<i class="fa fa-home"></i> <span class="layui-hide-xs">首页</span>
<i class="fa fa-home"></i> <span class="layui-hide-xs">{% trans "首页" %}</span>
</a>
</div>
<!-- 文档主体 -->
@ -194,7 +191,7 @@
<div class="doc-info">
<!-- 页面主体头信息 -->
{% block content_head %}
<h1>标签:{{ tag.name }}</h1><hr>
<h1>{% trans "标签:" %}{{ tag.name }}</h1><hr>
{% endblock %}
<!-- 广告代码开始 -->

View File

@ -2,32 +2,33 @@
{% extends 'app_doc/tag_doc_base.html' %}
<!-- 引入静态文件 -->
{% load static %}
{% load i18n %}
{% block keyword %}{{ doc.name }},{{ project.name }},{% endblock %}
{% block description %}{{doc.pre_content | slice:"0:100"}}{% endblock %}
{% block title %}{{ doc.name }} - 标签:{{ tag.name }}{% endblock %}
{% block title %}{{ doc.name }} - {% trans "标签:" %}{{ tag.name }}{% endblock %}
{% block head_toolbar %}
{% if request.user == doc.create_user or request.user == project.create_user %}
<span class="btn pull-left">|</span>
<a class="btn pull-left" aria-label="" href="{% url 'modify_doc' doc_id=doc.id %}">
<i class="fa fa-edit"></i> <span class="layui-hide-xs">修改</span>
<i class="fa fa-edit"></i> <span class="layui-hide-xs">{% trans "修改" %}</span>
</a>
<a class="btn pull-left" aria-label="" href="{% url 'create_doc' %}?pid={{project.id}}" target="_blank">
<i class="fa fa-plus-square"></i> <span class="layui-hide-xs">添加</span>
<i class="fa fa-plus-square"></i> <span class="layui-hide-xs">{% trans "添加" %}</span>
</a>
<a class="btn pull-left" aria-label="" href="{% url 'manage_doc' %}" target="_blank">
<i class="fa fa-cubes"></i> <span class="layui-hide-xs">管理</span>
<i class="fa fa-cubes"></i> <span class="layui-hide-xs">{% trans "管理" %}</span>
</a>
{% elif colla_user > 0 %}
<span class="btn pull-left">|</span>
{% if colla_user_role == 1 %}
<a class="btn pull-left" aria-label="" href="{% url 'modify_doc' doc_id=doc.id %}">
<i class="fa fa-edit"></i> <span class="layui-hide-xs">修改</span>
<i class="fa fa-edit"></i> <span class="layui-hide-xs">{% trans "修改" %}</span>
</a>
{% endif %}
<a class="btn pull-left" aria-label="" href="{% url 'create_doc' %}?pid={{project.id}}" target="_blank">
<i class="fa fa-plus-square"></i> <span class="layui-hide-xs">添加</span>
<i class="fa fa-plus-square"></i> <span class="layui-hide-xs">{% trans "添加" %}</span>
</a>
{% endif %}
<!-- 文档目录 -->
@ -68,12 +69,12 @@
</span>
<button id="share" class="doc-bottom-btn" tooltip="分享本文档">
<i class="fa fa-share-alt" ></i> 分享
<i class="fa fa-share-alt" ></i> {% trans "分享" %}
</button>
{% if request.user == doc.create_user or request.user.is_superuser %}
<button class="doc-bottom-btn" tooltip="下载文档Markdown" id="download_doc">
<i class="fa fa-download"></i> 下载
<i class="fa fa-download"></i> {% trans "下载" %}
</button>
{% endif %}
</div>
@ -87,23 +88,23 @@
<!-- <hr> -->
<div>
{% if doc.id|get_doc_previous == None %}
<button class="layui-btn layui-btn-disabled layui-btn-sm layui-btn-radius"><i class="layui-icon layui-icon-prev "></i>上一篇</button>
<button class="layui-btn layui-btn-disabled layui-btn-sm layui-btn-radius"><i class="layui-icon layui-icon-prev "></i>{% trans "上一篇" %}</button>
{% else %}
<a href="{% url 'doc' doc.top_doc doc.id|get_doc_previous %}" class="layui-btn layui-btn-primary layui-btn-sm layui-btn-radius"><i class="layui-icon layui-icon-prev "></i>上一篇</a>
<a href="{% url 'doc' doc.top_doc doc.id|get_doc_previous %}" class="layui-btn layui-btn-primary layui-btn-sm layui-btn-radius"><i class="layui-icon layui-icon-prev "></i>{% trans "上一篇" %}</a>
{% endif %}
</div>
<div>
{% if doc.id|get_doc_next == None %}
<button class="layui-btn layui-btn-disabled layui-btn-sm layui-btn-radius">下一篇<i class="layui-icon layui-icon-next"></i></button>
<button class="layui-btn layui-btn-disabled layui-btn-sm layui-btn-radius">{% trans "下一篇" %}<i class="layui-icon layui-icon-next"></i></button>
{% else %}
<a href="{% url 'doc' doc.top_doc doc.id|get_doc_next %}" class="layui-btn layui-btn-primary layui-btn-sm layui-btn-radius">下一篇<i class="layui-icon layui-icon-next"></i></a>
<a href="{% url 'doc' doc.top_doc doc.id|get_doc_next %}" class="layui-btn layui-btn-primary layui-btn-sm layui-btn-radius">{% trans "下一篇" %}<i class="layui-icon layui-icon-next"></i></a>
{% endif %}
</div>
</div>
{% endblock %}
{% block right_widget %}
<div class="tocMenu" style="display: none;">目录</div>
<div class="tocMenu" style="display: none;">{% trans "目录" %}</div>
{% endblock %}
{% block custom_script %}
@ -111,7 +112,7 @@
<div id="download_div" style="display: none;">
<div class="layui-row" style="margin: 10px;">
<a class="" download='{{doc.name}}.md' href="{% url 'download_doc_md' doc.id %}" target="_blank">
<i class="fa fa-download"></i> 下载Markdown文件
<i class="fa fa-download"></i> {% trans "下载Markdown文件" %}
</a>
</div>
</div>

View File

@ -2,12 +2,13 @@
{% extends 'app_doc/tag_doc_base.html' %}
<!-- 引入静态文件 -->
{% load static %}
{% load i18n %}
{% block keyword %}{{ tag.name }},{% endblock %}
{% block title %}标签:{{ tag.name }}{% endblock %}
{% block title %}{% trans "标签:" %}{{ tag.name }}{% endblock %}
{% block content_head %}
<h1>标签:{{ tag.name }}</h1><hr>
<h1>{% trans "标签:" %}{{ tag.name }}</h1><hr>
{% endblock %}
{% block page_content %}
@ -21,7 +22,7 @@
</span>
<button id="share" class="doc-bottom-btn" tooltip="分享本文档">
<i class="fa fa-share-alt" ></i> 分享
<i class="fa fa-share-alt" ></i> {% trans "分享" %}
</button>
</div>

View File

@ -1,4 +1,5 @@
{% load static %}
{% load i18n %}
<!DOCTYPE html>
<html>
<head>

View File

@ -1,4 +1,5 @@
{% load static %}
{% load i18n %}
<!DOCTYPE html>
<html>
<head>

View File

@ -1,8 +1,9 @@
{% load static %}
{% load i18n %}
<!DOCTYPE html>
<html lang='zh-CN'>
<head>
<title>忘记密码 - {% if site_name != None %}{{site_name}} {% else %}觅道文档MrDoc{% endif %}</title>
<title>{% trans "忘记密码" %} - {% if site_name != None %}{{site_name}} {% else %}{% trans "觅道文档MrDoc" %}{% endif %}</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="{% static 'layui/css/layui.css' %}" crossorigin="anonymous">
@ -20,7 +21,6 @@
}
.login-form{
margin-top: 15%;
{#width: 400px;#}
padding: 20px 50px 20px 60px;
background-color: #fff;
-webkit-box-shadow: #666 0px 0px 10px;
@ -40,14 +40,14 @@
<form class="layui-form" action="{% url 'forget_pwd' %}" method='POST'>
{% csrf_token %}
<div class="layui-form-item">
<h2><strong>忘记密码 - MrDoc</strong></h2>
<h2><strong>{% trans "忘记密码" %} - {% trans "觅道文档" %}</strong></h2>
</div>
<span style='color:red;margin-bottom: 10px;'>{{ errormsg }}</span>
<div class="layui-form-item">
<div class="layui-input-inline">
<input type="text" name="email" id="email" required lay-verify="required" placeholder="请输入注册邮箱" class="layui-input">
</div>
<button class="layui-btn layui-btn-normal" type="button" id="send_email_vcode" onclick="getCode(this)">发送验证码</button>
<button class="layui-btn layui-btn-normal" type="button" id="send_email_vcode" onclick="getCode(this)">{% trans "发送验证码" %}</button>
</div>
<div class="layui-form-item">
<input type="text" name="vcode" required lay-verify="required" placeholder="请输入验证码" autocomplete="off" class="layui-input">
@ -59,9 +59,9 @@
<input type="password" name="confirm_password" required lay-verify="required" placeholder="请确认新密码" autocomplete="off" class="layui-input">
</div>
<div class="layui-form-item">
<button class="layui-btn layui-btn-fluid layui-btn-radius layui-btn-normal" lay-submit type="submit">修改密码</button>
<button class="layui-btn layui-btn-fluid layui-btn-radius layui-btn-normal" lay-submit type="submit">{% trans "修改密码" %}</button>
</div>
<a href="{% url 'login' %}" class="register-link">返回登录</a>&nbsp;
<a href="{% url 'login' %}" class="register-link">{% trans "返回登录" %}</a>&nbsp;
</form>
</div>
</div>

View File

@ -1,4 +1,5 @@
{% load static %}
{% load i18n %}
<!DOCTYPE html>
<html lang='zh-CN'>
<head>
@ -8,7 +9,7 @@
<meta http-equiv="Cache-Control" content="no-siteapp" />
<meta http-equiv="Cache-Control" content="max-age=7200" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title>用户登录 - {% if site_name != None %}{{site_name}} {% else %}觅道文档MrDoc{% endif %}</title>
<title>{% trans "用户登录" %} - {% if site_name != None %}{{site_name}} {% else %}{% trans "觅道文档MrDoc" %}{% endif %}</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="{% static 'layui/css/layui.css' %}" crossorigin="anonymous">
@ -26,7 +27,6 @@
}
.login-form{
margin-top: 15%;
{#width: 400px;#}
padding: 20px 50px 20px 60px;
background-color: #fff;
-webkit-box-shadow: #666 0px 0px 10px;
@ -59,7 +59,7 @@
<form class="layui-form" action="{% url 'login' %}" method='POST'>
{% csrf_token %}
<div class="layui-form-item">
<h2><strong>登录 - <a href="/">{% if site_name != None %}{{site_name}} {% else %}觅道文档{% endif %}</a></strong></h2>
<h2><strong>{% trans "登录" %} - <a href="/">{% if site_name != None %}{{site_name}} {% else %}{% trans "觅道文档" %}{% endif %}</a></strong></h2>
</div>
<span style='color:red;margin-bottom: 10px;'>{{ errormsg }}</span>
<div class="layui-form-item">
@ -74,20 +74,18 @@
</div>
<div class="layui-form-item">
<div class="layui-input-inline login-input">
<button class="layui-btn layui-btn-fluid layui-btn-radius layui-btn-normal" lay-submit lay-filter="formDemo" type="submit">登录</button>
<button class="layui-btn layui-btn-fluid layui-btn-radius layui-btn-normal" lay-submit lay-filter="formDemo" type="submit">{% trans "登录" %}</button>
</div>
</div>
{% if close_register == 'on' %}
本站暂不开放注册
{% trans "本站暂不开放注册" %}
{% else %}
<a href="{% url 'register' %}" class="register-link">注册账号</a>&nbsp;
<a href="{% url 'register' %}" class="register-link">{% trans "注册账号" %}</a>&nbsp;
{% endif %}
{% if enable_email == 'on' %}
<a href="{% url 'forget_pwd' %}" class="register-link">忘记密码</a>
<a href="{% url 'forget_pwd' %}" class="register-link">{% trans "忘记密码" %}</a>
{% endif %}
<a href="{% url 'pro_list' %}" class="register-link">返回首页</a>
<a href="{% url 'pro_list' %}" class="register-link">{% trans "返回首页" %}</a>
</form>
</div>
</div>

View File

@ -1,8 +1,9 @@
{% load static %}
{% load i18n %}
<!DOCTYPE html>
<html lang='zh-CN'>
<head>
<title>用户注册 - {% if site_name != None %}{{site_name}} {% else %}觅道文档MrDoc{% endif %}</title>
<title>{% trans "用户注册" %} - {% if site_name != None %}{{site_name}} {% else %}{% trans "觅道文档MrDoc" %}{% endif %}</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="{% static 'layui/css/layui.css' %}" crossorigin="anonymous">
@ -20,7 +21,6 @@
}
.login-form{
margin-top: 15%;
{#width: 400px;#}
padding: 20px 50px 20px 60px;
background-color: #fff;
-webkit-box-shadow: #666 0px 0px 10px;
@ -53,7 +53,7 @@
<form class="layui-form" action="{% url 'register' %}" method='POST'>
{% csrf_token %}
<div class="layui-form-item">
<h2><strong>注册 - {% if site_name != None %}{{site_name}} {% else %}觅道文档{% endif %}</strong></h2>
<h2><strong>{% trans "注册" %} - {% if site_name != None %}{{site_name}} {% else %}{% trans "觅道文档" %}{% endif %}</strong></h2>
</div>
<span style='color:red;margin-bottom: 10px;'>{{ errormsg }}</span>
{% if enable_register_code %}
@ -95,8 +95,8 @@
<button class="layui-btn layui-btn-fluid layui-btn-radius layui-btn-normal" lay-submit lay-filter="formDemo" type="submit">注册并登录</button>
</div>
</div>
<a href="{% url 'login' %}" class="register-link">返回登录</a>
<a href="{% url 'pro_list' %}" class="register-link">返回首页</a>
<a href="{% url 'login' %}" class="register-link">{% trans "返回登录" %}</a>
<a href="{% url 'pro_list' %}" class="register-link">{% trans "返回首页" %}</a>
</form>
</div>
</div>

View File

@ -1,4 +1,5 @@
{% load static %}
{% load i18n %}
<!DOCTYPE html>
<html lang="zh-cn">
<head>
@ -10,7 +11,7 @@
<meta name="keywords" content="{% if site_keywords != None %}{{site_keywords}}{% endif %}"/>
<meta name="description" content="{% if site_desc != None %}{{site_desc}}{% endif %}" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title>{{ query }} - 觅道搜索 - {% if site_name != None and site_name != '' %}{{ site_name }}{% endif %}</title>
<title>{{ query }} - {% trans "觅道搜索" %} - {% if site_name != None and site_name != '' %}{{ site_name }}{% endif %}</title>
<link href="{% static 'layui/css/layui.css' %}" rel="stylesheet">
<link href="{% static 'mrdoc/mrdoc.css' %}?version={{mrdoc_version}}" rel="stylesheet">
<link href="{% static 'mrdoc/mrdoc-search-result.css' %}?version={{mrdoc_version}}" rel="stylesheet">
@ -57,7 +58,7 @@
<dd>
<a href="{% url 'pro_list' %}">
<i class="layui-icon layui-icon-console layui-hide-md"></i>
<span class="layui-hide-xs">返回首页</span>
<span class="layui-hide-xs">{% trans "返回首页" %}</span>
</a>
</dd>
{% endif %}
@ -69,13 +70,13 @@
<dd>
<a href="{% url 'manage_doc' %}">
<i class="layui-icon layui-icon-app layui-hide-md"></i>
<span class="layui-hide-xs">个人中心</span>
<span class="layui-hide-xs">{% trans "个人中心" %}</span>
</a>
</dd>
<dd>
<a href="{% url 'logout' %}">
<i class="layui-icon layui-icon-release layui-hide-md"></i>
<span class="layui-hide-xs">退出登录</span>
<span class="layui-hide-xs">{% trans "退出登录" %}</span>
</a>
</dd>
</dl>
@ -83,15 +84,15 @@
{% else %}
<li class="layui-nav-item">
<a href="javascript:void(0);">
<i class="layui-icon layui-icon-username"></i> 游客
<i class="layui-icon layui-icon-username"></i> {% trans "游客" %}
</a>
<dl class="layui-nav-child">
<!-- <dd><a href="">基本资料</a></dd> -->
{% if close_register == 'on' %}
<dd><a href="{% url 'login' %}">登录</a></dd>
<dd><a href="{% url 'login' %}">{% trans "登录" %}</a></dd>
{% else %}
<dd><a href="{% url 'register' %}">注册</a></dd>
<dd><a href="{% url 'login' %}">登录</a></dd>
<dd><a href="{% url 'register' %}">{% trans "注册" %}</a></dd>
<dd><a href="{% url 'login' %}">{% trans "登录" %}</a></dd>
{% endif %}
</dl>
</li>
@ -133,20 +134,20 @@
<div class="layui-inline">
<!-- 文档搜索 -->
<div class="layui-input-inline" style="width: inherit;">
<a href="?q={{query}}&type=doc&d_range={{d_range}}" class="search_type current_search_type" id="search_doc"><i class="layui-icon layui-icon-search"></i>文档</a>
<a href="{% url 'search' %}?kw={{query}}&type=pro&d_range={{d_range}}" class="search_type" id="search_project"><i class="layui-icon layui-icon-list"></i>文集</a>
<a href="{% url 'search' %}?kw={{query}}&type=tag&d_range={{d_range}}" class="search_type" id="search_tag"><i class="layui-icon layui-icon-note"></i>标签</a>
<a href="?q={{query}}&type=doc&d_range={{d_range}}" class="search_type current_search_type" id="search_doc"><i class="layui-icon layui-icon-search"></i>{% trans "文档" %}</a>
<a href="{% url 'search' %}?kw={{query}}&type=pro&d_range={{d_range}}" class="search_type" id="search_project"><i class="layui-icon layui-icon-list"></i>{% trans "文集" %}</a>
<a href="{% url 'search' %}?kw={{query}}&type=tag&d_range={{d_range}}" class="search_type" id="search_tag"><i class="layui-icon layui-icon-note"></i>{% trans "标签" %}</a>
</div>
</div>
<!-- 筛选结束 -->
<div class="layui-input-inline" style="float: right;">
<select name="d_range" lay-verify="sel_recent" id="sel_recent">
<option value="">时间筛选</option>
<option value="all">全部时间</option>
<option value="recent1">近1天</option>
<option value="recent7">近7天</option>
<option value="recent30">近30天</option>
<option value="recent365">近1年</option>
<option value="">{% trans "时间筛选" %}</option>
<option value="all">{% trans "全部时间" %}</option>
<option value="recent1">{% trans "近1天" %}</option>
<option value="recent7">{% trans "近7天" %}</option>
<option value="recent30">{% trans "近30天" %}</option>
<option value="recent365">{% trans "近1年" %}</option>
</select>
</div>
</div>
@ -158,19 +159,19 @@
<!-- 搜索结果提示 -->
{% if query != '' %}
<div style="padding: 0 15px;margin-top: 10px;margin-bottom: 10px;color: #999;">
觅道文档在
{% trans "觅道文档在" %}
{% if date_range == 'recent1' %}
近1天内
{% trans "近1天内" %}
{% elif date_range == 'recent7' %}
近7天内
{% trans "近7天内" %}
{% elif date_range == 'recent30' %}
近30天内
{% trans "近30天内" %}
{% elif date_range == 'recent365' %}
近一年内
{% trans "近一年内" %}
{% else %}
全部时间内
{% trans "全部时间内" %}
{% endif %}
搜索到 {{ page.paginator.count }} 条结果
{% trans "搜索到" %} {{ page.paginator.count }} {% trans "条结果" %}
</div>
{% endif %}
@ -193,7 +194,7 @@
<a href="{% url 'pro_index' pro_id=result.object.top_doc %}" target="_blank">{{ result.object.top_doc | get_doc_top }}</a> - <span style="font-size: 14px;color: #999;">{{result.object.modify_time}}</span></p>
</div>
{% empty %}
<p>没有搜索结果。</p>
<p>{% trans "没有搜索结果。" %}</p>
{% endfor %}
{% else %}
{# Show some example queries to run, maybe query syntax, something else? #}
@ -207,9 +208,9 @@
<div class="layui-box layui-laypage layui-laypage-default">
<!-- 上一页 -->
{% if page.has_previous %}
<a href="?page={{ page.previous_page_number }}&q={{query}}&d_range={{date_range}}" class="layui-btn layui-btn-xs layui-btn-normal">上一页</a>
<a href="?page={{ page.previous_page_number }}&q={{query}}&d_range={{date_range}}" class="layui-btn layui-btn-xs layui-btn-normal">{% trans "上一页" %}</a>
{% else %}
<a href="javascript:;" class="layui-btn layui-btn-xs layui-btn-disabled">上一页</a>
<a href="javascript:;" class="layui-btn layui-btn-xs layui-btn-disabled">{% trans "上一页" %}</a>
{% endif %}
<!-- 当前页 -->
<span class="layui-laypage-curr">
@ -218,9 +219,9 @@
</span>
<!-- 下一页 -->
{% if page.has_next %}
<a href="?page={{ page.next_page_number }}&q={{query}}&d_range={{date_range}}" class="layui-btn layui-btn-xs layui-btn-normal">下一页</a>
<a href="?page={{ page.next_page_number }}&q={{query}}&d_range={{date_range}}" class="layui-btn layui-btn-xs layui-btn-normal">{% trans "下一页" %}</a>
{% else %}
<a class="layui-btn layui-btn-xs layui-btn-disabled">下一页</a>
<a class="layui-btn layui-btn-xs layui-btn-disabled">{% trans "下一页" %}</a>
{% endif %}
</div>
</div>