WIP ref display logic
TODO remove hacky banners logic, use this cleaner one instead
This commit is contained in:
parent
04388d5a09
commit
2c55f54d58
@ -109,7 +109,7 @@ if toctree:
|
|||||||
# than functions on the BuildEnv & al
|
# than functions on the BuildEnv & al
|
||||||
@monkey(toctree.TocTree)
|
@monkey(toctree.TocTree)
|
||||||
def resolve(old_resolve, tree, docname, *args, **kwargs):
|
def resolve(old_resolve, tree, docname, *args, **kwargs):
|
||||||
if docname == tree.env.config.master_doc or docname in tree.env.config.banners_doc:
|
if docname in tree.env.config.banners_doc:
|
||||||
return resolve_content_toctree(tree.env, docname, *args, **kwargs)
|
return resolve_content_toctree(tree.env, docname, *args, **kwargs)
|
||||||
toc = old_resolve(tree, docname, *args, **kwargs)
|
toc = old_resolve(tree, docname, *args, **kwargs)
|
||||||
if toc is None:
|
if toc is None:
|
||||||
|
@ -227,16 +227,27 @@
|
|||||||
{% set container = 'container' %}
|
{% set container = 'container' %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<main class="container {{ ' '.join(classes) }}">
|
<main class="container {{ ' '.join(classes) }}">
|
||||||
{% if pagename != master_doc and pagename != banners_doc %}
|
{% if pagename == master_doc %}
|
||||||
|
<div class="o_content row">
|
||||||
|
<article class="doc-body {% if 'has-toc' in meta %}doc-toc{% endif %}{% if pagename in toc%}index-category{% endif %}">
|
||||||
|
HOHOHOHO
|
||||||
|
<!-- {{ toc }} -->
|
||||||
|
{{ body }}
|
||||||
|
</article>
|
||||||
|
</div>
|
||||||
|
{% else %}
|
||||||
|
{% if 'banners-display' not in meta %}
|
||||||
<div class="o_content row">
|
<div class="o_content row">
|
||||||
{% if 'has-toc' not in meta and not (pagename in toc) %}
|
{% if 'has-toc' not in meta and not (pagename in toc) %}
|
||||||
<aside>
|
<aside>
|
||||||
<div class="navbar-aside text-center">
|
<div class="navbar-aside text-center">
|
||||||
{{ toc }}
|
{{ toc }}
|
||||||
{% if github_link %}
|
{% if github_link %}
|
||||||
<p class="gith-container"><a href="{{ github_link(mode='edit') }}" class="gith-link">
|
<p class="gith-container">
|
||||||
|
<a href="{{ github_link(mode='edit') }}" class="gith-link">
|
||||||
Edit on GitHub
|
Edit on GitHub
|
||||||
</a></p>
|
</a>
|
||||||
|
</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</aside>
|
</aside>
|
||||||
@ -244,10 +255,11 @@
|
|||||||
<article class="doc-body {% if 'has-toc' in meta %}doc-toc{% endif %}{% if pagename in toc%}index-category{% endif %}">
|
<article class="doc-body {% if 'has-toc' in meta %}doc-toc{% endif %}{% if pagename in toc%}index-category{% endif %}">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% block body %} {% endblock %}
|
{% block body %} {% endblock %}
|
||||||
{% if pagename != master_doc and pagename != banners_doc %}
|
{% if 'banners-display' not in meta %}
|
||||||
</article>
|
</article>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
<div id="mask"></div>
|
<div id="mask"></div>
|
||||||
</main>
|
</main>
|
||||||
</div>
|
</div>
|
||||||
|
@ -6,6 +6,7 @@ Odoo User Documentation
|
|||||||
|
|
||||||
.. toctree::
|
.. toctree::
|
||||||
:titlesonly:
|
:titlesonly:
|
||||||
|
:maxdepth: 1
|
||||||
|
|
||||||
user/index
|
user/index
|
||||||
developer/index
|
developer/index
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
:banners-display:
|
||||||
|
|
||||||
=======================
|
=======================
|
||||||
Odoo User Documentation
|
Odoo User Documentation
|
||||||
=======================
|
=======================
|
||||||
|
Loading…
Reference in New Issue
Block a user