forked from mirror/MrDoc
优化调整文档URL形式为/doc/xxx/
This commit is contained in:
parent
f9a19ee0a8
commit
1fa537bc7f
@ -124,7 +124,7 @@
|
||||
<li>
|
||||
{% if docs.children %}
|
||||
<div style="display:flex;justify-content:space-between;">
|
||||
<a href="{% url 'doc' pro_id=pro_id doc_id=docs.id %}" title="{{docs.name}}">{% if docs.editor_mode == 4 %}<i class="layui-icon layui-icon-table"></i>{% else %}<i class="iconfont mrdoc-icon-wendang"></i>{% endif %} {{ docs.name }}</a>
|
||||
<a href="{% url 'doc_id' doc_id=docs.id %}" title="{{docs.name}}">{% if docs.editor_mode == 4 %}<i class="layui-icon layui-icon-table"></i>{% else %}<i class="iconfont mrdoc-icon-wendang"></i>{% endif %} {{ docs.name }}</a>
|
||||
{% if docs.open_children %}
|
||||
<i class="layui-icon layui-icon-down switch-toc"></i>
|
||||
{% else %}
|
||||
@ -142,7 +142,7 @@
|
||||
<li>
|
||||
{% if node.id|get_next_doc %}
|
||||
<div style="display:flex;justify-content:space-between;">
|
||||
<a href="{% url 'doc' pro_id=pro_id doc_id=node.id %}" title="{{node.name}}"><i class="{% if node.editor_mode == 4 %}layui-icon layui-icon-table {% else %}iconfont mrdoc-icon-wendang{% endif %}"></i> {{ node.name }}</a>
|
||||
<a href="{% url 'doc_id' doc_id=node.id %}" title="{{node.name}}"><i class="{% if node.editor_mode == 4 %}layui-icon layui-icon-table {% else %}iconfont mrdoc-icon-wendang{% endif %}"></i> {{ node.name }}</a>
|
||||
{% if node.open_children %}
|
||||
<i class="layui-icon layui-icon-down switch-toc"></i>
|
||||
{% else %}
|
||||
@ -157,17 +157,17 @@
|
||||
|
||||
<!-- 三级目录 -->
|
||||
{% for doc in node.children %}
|
||||
<li><a href="{% url 'doc' pro_id=pro_id doc_id=doc.id %}" title="{{doc.name}}"><i class="{% if doc.editor_mode == 4 %}layui-icon layui-icon-table {% else %}iconfont mrdoc-icon-wendang{% endif %}"></i> {{ doc.name }}</a></li>
|
||||
<li><a href="{% url 'doc_id' doc_id=doc.id %}" title="{{doc.name}}"><i class="{% if doc.editor_mode == 4 %}layui-icon layui-icon-table {% else %}iconfont mrdoc-icon-wendang{% endif %}"></i> {{ doc.name }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% else %}
|
||||
<a href="{% url 'doc' pro_id=pro_id doc_id=node.id %}" title="{{node.name}}"><i class="{% if node.editor_mode == 4 %}layui-icon layui-icon-table {% else %}iconfont mrdoc-icon-wendang{% endif %}"></i> {{ node.name }}</a>
|
||||
<a href="{% url 'doc_id' doc_id=node.id %}" title="{{node.name}}"><i class="{% if node.editor_mode == 4 %}layui-icon layui-icon-table {% else %}iconfont mrdoc-icon-wendang{% endif %}"></i> {{ node.name }}</a>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% else %}
|
||||
<a href="{% url 'doc' pro_id=pro_id doc_id=docs.id %}" title="{{docs.name}}"><i class="{% if docs.editor_mode == 4 %}layui-icon layui-icon-table {% else %}iconfont mrdoc-icon-wendang{% endif %}"></i> {{ docs.name }}</a>
|
||||
<a href="{% url 'doc_id' doc_id=docs.id %}" title="{{docs.name}}"><i class="{% if docs.editor_mode == 4 %}layui-icon layui-icon-table {% else %}iconfont mrdoc-icon-wendang{% endif %}"></i> {{ docs.name }}</a>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
|
@ -92,9 +92,9 @@
|
||||
<div class="layui-row">
|
||||
<div class="doc-form-label" style="margin-bottom: 10px;">
|
||||
{% if doc.status == 0 %}
|
||||
<strong>*当前文档状态:<span style="text-decoration:underline">草稿</span> <a href="{% url 'doc' doc.top_doc doc.id %}">查看</a></strong>
|
||||
<strong>*当前文档状态:<span style="text-decoration:underline">草稿</span> <a href="{% url 'doc_id' doc.id %}">查看</a></strong>
|
||||
{% elif doc.status == 1 %}
|
||||
<strong>*当前文档状态:<span style="text-decoration:underline">已发布</span> <a href="{% url 'doc' doc.top_doc doc.id %}">查看</a></strong>
|
||||
<strong>*当前文档状态:<span style="text-decoration:underline">已发布</span> <a href="{% url 'doc_id' doc.id %}">查看</a></strong>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
|
@ -174,7 +174,7 @@
|
||||
</p>
|
||||
{% for new_doc in p.id|get_new_doc %}
|
||||
<p class="layui-word-aux" style="line-height: 18px;">
|
||||
<a href="{% url 'doc' new_doc.top_doc new_doc.id %}" target="_blank" class="index-doc-link"><span class="layui-elip" style="display: inline-block;;width: 250px;"><i class="layui-icon layui-icon-form"></i> {{new_doc.name}}</span></a>
|
||||
<a href="{% url 'doc_id' doc_id=new_doc.id %}" target="_blank" class="index-doc-link"><span class="layui-elip" style="display: inline-block;;width: 250px;"><i class="layui-icon layui-icon-form"></i> {{new_doc.name}}</span></a>
|
||||
<span style="float: right;">{{new_doc.modify_time|date:"n-d"}}</span>
|
||||
</p>
|
||||
{% endfor %}
|
||||
|
@ -197,7 +197,7 @@
|
||||
<div style="margin-bottom: 18px;">
|
||||
<!-- 标题 -->
|
||||
<h3>
|
||||
<a href="{% url 'doc' pro_id=result.top_doc doc_id=result.id %}" target="_blank" class="search_result_title">{{ result.name }}</a>
|
||||
<a href="{% url 'doc_id' doc_id=result.id %}" target="_blank" class="search_result_title">{{ result.name }}</a>
|
||||
</h3>
|
||||
<!-- 简介 -->
|
||||
<div class="search_result_pre">{{ result.pre_content|get_key_context:kw }}</div>
|
||||
@ -229,7 +229,7 @@
|
||||
<div style="margin-bottom: 18px;">
|
||||
<!-- 标题 -->
|
||||
<h3>
|
||||
<a href="{% url 'doc' pro_id=result.top_doc doc_id=result.id %}" target="_blank" class="search_result_title">{{ result.name }}</a>
|
||||
<a href="{% url 'doc_id' doc_id=result.id %}" target="_blank" class="search_result_title">{{ result.name }}</a>
|
||||
</h3>
|
||||
<!-- 简介 -->
|
||||
<div class="search_result_pre">{{ result.pre_content|get_key_context:kw }}</div>
|
||||
|
@ -193,7 +193,7 @@
|
||||
<div style="margin-bottom: 18px;">
|
||||
<!-- 标题 -->
|
||||
<h3>
|
||||
<a href="{{ result.object.get_absolute_url }}?highlight={{query}}" target="_blank" class="search_result_title">{% highlight result.object.name with query %}</a>
|
||||
<a href="{% url 'doc_id' doc_id=result.object.id %}?highlight={{query}}" target="_blank" class="search_result_title">{% highlight result.object.name with query %}</a>
|
||||
</h3>
|
||||
<!-- 简介 -->
|
||||
{% if result.object.editor_mode == 3 %}
|
||||
|
Loading…
Reference in New Issue
Block a user