mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-04 12:30:11 +03:00
Merge 64f737a588
into 4e08abb605
This commit is contained in:
commit
5c6fc4fcb3
|
@ -13,7 +13,7 @@
|
||||||
{% if 'javascript' in langs %}{% include "rest_framework/docs/langs/javascript-intro.html" %}{% endif %}
|
{% if 'javascript' in langs %}{% include "rest_framework/docs/langs/javascript-intro.html" %}{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% if document.data %}
|
|
||||||
{% for section_key, section in document.data|items %}
|
{% for section_key, section in document.data|items %}
|
||||||
{% if section_key %}
|
{% if section_key %}
|
||||||
<h2 id="{{ section_key }}" class="coredocs-section-title">{{ section_key }} <a href="#{{ section_key }}"><i class="fa fa-link" aria-hidden="true"></i>
|
<h2 id="{{ section_key }}" class="coredocs-section-title">{{ section_key }} <a href="#{{ section_key }}"><i class="fa fa-link" aria-hidden="true"></i>
|
||||||
|
@ -23,9 +23,15 @@
|
||||||
{% for link_key, link in section.links|items %}
|
{% for link_key, link in section.links|items %}
|
||||||
{% include "rest_framework/docs/link.html" %}
|
{% include "rest_framework/docs/link.html" %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
{% if not section.links %}
|
||||||
|
{%for sub_section_key,sub_section in section.data|items%}
|
||||||
|
{% for link_key, link in sub_section.links|items %}
|
||||||
|
{% include "rest_framework/docs/link.html" %}
|
||||||
|
{% endfor %}
|
||||||
|
{%endfor%}
|
||||||
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
{% for link_key, link in document.links|items %}
|
{% for link_key, link in document.links|items %}
|
||||||
{% include "rest_framework/docs/link.html" %}
|
{% include "rest_framework/docs/link.html" %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{% load rest_framework %}
|
{% load rest_framework %}
|
||||||
|
|
||||||
<!-- Modal -->
|
<!-- Modal -->
|
||||||
<div class="modal fade api-modal" id="{{ section_key }}_{{ link_key }}_modal" tabindex="-1" role="dialog" aria-labelledby="api explorer modal">
|
<div class="modal fade api-modal" id="{{ section_key }}_{%if sub_section_key%}{{sub_section_key}}_{%endif%}{{ link_key }}_modal" tabindex="-1" role="dialog" aria-labelledby="api explorer modal">
|
||||||
<div class="modal-dialog modal-lg" role="document">
|
<div class="modal-dialog modal-lg" role="document">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<form data-key='["{{ section_key }}", "{{ link_key }}"]' class="api-interaction">
|
<form data-key='["{{ section_key }}", {%if sub_section_key%}"{{sub_section_key}}", {%endif%}"{{ link_key }}"]' class="api-interaction">
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-lg-6 request">
|
<div class="col-lg-6 request">
|
||||||
|
|
|
@ -6,11 +6,11 @@
|
||||||
class="btn btn-sm btn-success"
|
class="btn btn-sm btn-success"
|
||||||
style="float: right; margin-top: 20px"
|
style="float: right; margin-top: 20px"
|
||||||
data-toggle="modal"
|
data-toggle="modal"
|
||||||
data-target="#{{ section_key }}_{{ link_key }}_modal">
|
data-target="#{{ section_key }}_{%if sub_section_key%}{{sub_section_key}}_{%endif%}{{ link_key }}_modal">
|
||||||
<i class="fa fa-exchange"></i> Interact
|
<i class="fa fa-exchange"></i> Interact
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<h3 id="{{ section_key }}-{{ link_key }}" class="coredocs-link-title">{{ link.title|default:link_key }} <a href="#{{ section_key }}-{{ link_key }}"><i class="fa fa-link" aria-hidden="true"></i>
|
<h3 id="{{ section_key }}-{%if sub_section_key%}{{sub_section_key}}-{%endif%}{{ link_key }}" class="coredocs-link-title">{{ link.title|default:link_key }} <a href="#{{ section_key }}-{%if sub_section_key%}{{sub_section_key}}-{%endif%}{{ link_key }}"><i class="fa fa-link" aria-hidden="true"></i>
|
||||||
</a></h3>
|
</a></h3>
|
||||||
|
|
||||||
<div class="meta">
|
<div class="meta">
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
<i class="fa fa-bars fa-2x toggle-btn" data-toggle="collapse" data-target="#menu-content"></i>
|
<i class="fa fa-bars fa-2x toggle-btn" data-toggle="collapse" data-target="#menu-content"></i>
|
||||||
<div class="menu-list">
|
<div class="menu-list">
|
||||||
<ul id="menu-content" class="menu-content collapse out">
|
<ul id="menu-content" class="menu-content collapse out">
|
||||||
{% if document.data %}
|
|
||||||
{% for section_key, section in document.data|items %}
|
{% for section_key, section in document.data|items %}
|
||||||
<li data-toggle="collapse" data-target="#{{ section_key }}-dropdown" class="collapsed">
|
<li data-toggle="collapse" data-target="#{{ section_key }}-dropdown" class="collapsed">
|
||||||
<a><i class="fa fa-dot-circle-o fa-lg"></i> {% if section_key %}{{ section_key }}{% else %}API Endpoints{% endif %} <span class="arrow"></span></a>
|
<a><i class="fa fa-dot-circle-o fa-lg"></i> {% if section_key %}{{ section_key }}{% else %}API Endpoints{% endif %} <span class="arrow"></span></a>
|
||||||
|
@ -13,10 +12,16 @@
|
||||||
{% for link_key, link in section.links|items %}
|
{% for link_key, link in section.links|items %}
|
||||||
<li><a href="#{{ section_key }}-{{ link_key }}">{{ link.title|default:link_key }}</a></li>
|
<li><a href="#{{ section_key }}-{{ link_key }}">{{ link.title|default:link_key }}</a></li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
{% if not section.links %}
|
||||||
</li>
|
{% for sub_section_key, sub_section in section.data|items %}
|
||||||
|
{% for link_key, link in sub_section.links|items %}
|
||||||
|
<li><a href="#{{section_key}}-{{sub_section_key}}-{{ link_key }}">{{sub_section_key}} >> {{ link.title|default:link_key }}</a></li>
|
||||||
|
{% endfor %}
|
||||||
|
{% endfor %}
|
||||||
|
{%endif%}
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<ul class="menu-list menu-list-bottom">
|
<ul class="menu-list menu-list-bottom">
|
||||||
|
|
Loading…
Reference in New Issue
Block a user