2019-12-15 15:45:05 +08:00
|
|
|
|
<!-- 继承自模板:app_doc/docs_base.html -->
|
|
|
|
|
{% extends 'app_doc/docs_base.html' %}
|
|
|
|
|
<!-- 引入静态文件 -->
|
2019-12-08 18:59:49 +08:00
|
|
|
|
{% load staticfiles %}
|
|
|
|
|
|
2019-12-15 15:45:05 +08:00
|
|
|
|
{% block title %}搜索{{kw}}结果 - {{ project.name }}{% endblock %}
|
2019-12-08 18:59:49 +08:00
|
|
|
|
|
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' %}" target="_blank">
|
|
|
|
|
<i class="fa fa-edit"></i> 添加文档
|
|
|
|
|
</a>
|
|
|
|
|
{% endif %}
|
|
|
|
|
{% endblock %}
|
2019-12-08 18:59:49 +08:00
|
|
|
|
|
2019-12-15 15:45:05 +08:00
|
|
|
|
{% block content_head %}
|
|
|
|
|
<h1>搜索{{kw}}共有{{ search_result.count }}个结果 - {{project.name}}</h1><hr>
|
|
|
|
|
{% endblock %}
|
2019-12-08 18:59:49 +08:00
|
|
|
|
|
2019-12-15 15:45:05 +08:00
|
|
|
|
{% block page_content %}
|
|
|
|
|
{% for result in search_result %}
|
|
|
|
|
<div>
|
|
|
|
|
<h3><a href="{% url 'doc' pro_id=project.id doc_id=result.id %}" target="_blank">{{ result.name }}</a></h3>
|
|
|
|
|
<p>{{ result.pre_content|truncatechars:300 }}</p>
|
2019-12-08 18:59:49 +08:00
|
|
|
|
</div>
|
2019-12-15 15:45:05 +08:00
|
|
|
|
{% endfor %}
|
|
|
|
|
{% endblock %}
|