MrDoc/template/app_doc/project_doc_search.html

35 lines
1.2 KiB
HTML
Raw Normal View History

2019-12-15 15:45:05 +08:00
<!-- 继承自模板app_doc/docs_base.html -->
{% extends 'app_doc/docs_base.html' %}
<!-- 引入静态文件 -->
2020-10-18 08:05:41 +08:00
{% load static %}
2020-12-02 21:25:59 +08:00
{% load i18n %}
2020-12-02 21:25:59 +08:00
{% block title %}{% trans "搜索" %} {{kw}} {% trans "的结果" %} - {{ project.name }}{% endblock %}
2019-12-15 15:45:05 +08:00
{% 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">
2020-12-02 21:25:59 +08:00
<i class="fa fa-edit"></i> {% trans "添加文档" %}
2019-12-15 15:45:05 +08:00
</a>
{% endif %}
{% endblock %}
2019-12-15 15:45:05 +08:00
{% block content_head %}
2021-03-22 22:54:20 +08:00
<h1>{% trans "搜索" %} {{kw}} {% trans "共有" %}{{ search_result.count }}{% trans "个结果" %}</h1><hr>
2019-12-15 15:45:05 +08:00
{% endblock %}
2019-12-15 15:45:05 +08:00
{% block page_content %}
{% for result in search_result %}
<div>
2020-06-09 09:08:13 +08:00
<p><a href="{% url 'doc' pro_id=project.id doc_id=result.id %}" target="_blank">{{ result.name }}</a> - <span style="font-size: 14px;color: #999;">{{result.modify_time}}</span></p>
2019-12-15 15:45:05 +08:00
<p>{{ result.pre_content|truncatechars:300 }}</p>
</div>
2021-03-22 22:54:20 +08:00
<hr>
2019-12-15 15:45:05 +08:00
{% endfor %}
2021-03-22 22:54:20 +08:00
{% endblock %}
{% block custom_script %}
<script>
keyLight('doc-content','{{kw}}')
</script>
2019-12-15 15:45:05 +08:00
{% endblock %}