[IMP] documentation: legal page design

Prior to this commit, the terms and conditions were displayed in a table
with all the languages and it was not practical for the futur, with many
more languages.

task-3073198

closes odoo/documentation#3139

X-original-commit: a52a9eef2d
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
This commit is contained in:
Morgane (morm)
2022-11-28 13:49:53 +00:00
committed by Antoine Vandevenne (anv)
parent 882123671b
commit 10bf041900
18 changed files with 183 additions and 115 deletions
+2
View File
@@ -108,6 +108,8 @@
{%- if pagename == master_doc %}
{# Custom landing page on the root of the documentation #}
{%- include "layout_templates/homepage.html" %}
{%- elif pagename == 'legal' %}
{%- include "layout_templates/legal.html" %}
{%- else %}
<article id="o_content" class="doc-body">
<div role="main"> {# Beacon used by the Sphinx search to know where to look for a string #}
@@ -15,7 +15,7 @@
{%- endif %}
<ul class="dropdown-menu" aria-labelledby="languages">
{%- for alternate_language, language_code, url in alternate_languages %}
<li><a class="dropdown-item" href="{{ url }}">{{ alternate_language }}</a></li>
<li><a class="o_switcher_item dropdown-item" href="{{ url }}">{{ alternate_language }}</a></li>
{%- endfor %}
</ul>
</div>
@@ -0,0 +1,139 @@
<article id="o_content" class="doc-body o_legal">
<section id="legal">
<h1>
{{ _("Legal") }}
<a class="headerlink" href="#legal" title="Permalink to this headline"></a>
</h1>
</section>
<section id="licenses">
<h2>
{{ _("Licenses") }}
<a class="headerlink" href="#licenses" title="Permalink to this headline"></a>
</h2>
<ul class="simple">
<li>
<p>
<a class="reference internal" href="legal/licenses.html#licenses">
<span class="std std-ref">{{ _("Licenses") }}</span>
</a>
</p>
</li>
</ul>
</section>
<section id="terms-and-conditions">
<h2>
{{ _("Terms and Conditions") }}
<a class="headerlink" href="#terms-and-conditions" title="Permalink to this headline"></a>
</h2>
<div class="row flex-wrap g-3 mb-3">
<div class="col-sm-4">
<div class="card h-100">
<div class="card-body d-flex flex-column justify-content-between">
<div class="d-flex align-items-center mb-2">
<i class="i-article"></i>
<h5 class="card-title mb-0 d-flex flex-wrap gap-2">{{ _("Odoo Enterprise Agreement") }}</h5>
</div>
<p>{{ _("Applies to self-hosting, Odoo.SH and Odoo Cloud.") }}</p>
<div>
{%- set enterprise_agreement_path_en = 'legal/terms/enterprise.html' %}
{%- if language_code == 'en' %}
<a class="btn btn-primary" href="{{ enterprise_agreement_path_en }}" role="button">{{ _("Read") }}</a>
{%- else %}
<a class="btn btn-primary" href="{{ 'legal/terms/i18n/enterprise_%s.html' % language_code }}" role="button">{{ _("Read") }}</a>
<a class="btn btn-light text-primary" href="{{ enterprise_agreement_path_en }}">{{ _("English") }}</a>
{%- endif %}
</div>
</div>
</div>
</div>
<div class="col-sm-4">
<div class="card h-100">
<div class="card-body d-flex flex-column justify-content-between">
<div class="d-flex align-items-center mb-3">
<i class="i-article"></i>
<h5 class="card-title mb-0">{{ _("Odoo Partnership Agreement") }}</h5>
</div>
<div>
{%- set partnership_agreement_path_en = 'legal/terms/partnership.html' %}
{%- if language_code == 'en' %}
<a class="btn btn-primary" href="{{ partnership_agreement_path_en }}" role="button">{{ _("Read") }}</a>
{%- else %}
<a class="btn btn-primary" href="{{ 'legal/terms/i18n/partnership_%s.html' % language_code }}" role="button">{{ _("Read") }}</a>
<a class="btn btn-light text-primary" href="{{ partnership_agreement_path_en }}">{{ _("English") }}</a>
{%- endif %}
</div>
</div>
</div>
</div>
<div class="col-sm-4">
<div class="card h-100">
<div class="card-body d-flex flex-column justify-content-between">
<div class="d-flex align-items-center mb-3">
<i class="i-article"></i>
<h5 class="card-title mb-0">{{ _("Terms Of Sale") }}</h5>
</div>
<div>
{%- set terms_of_sale_agreement_path_en = 'legal/terms/terms_of_sale.html' %}
{%- if language_code == 'en' %}
<a class="btn btn-primary" href="{{ terms_of_sale_agreement_path_en }}" role="button">{{ _("Read") }}</a>
{%- else %}
<a class="btn btn-primary" href="{{ 'legal/terms/i18n/terms_of_sale_%s.html' % language_code }}" role="button">{{ _("Read") }}</a>
<a class="btn btn-light text-primary" href="{{ terms_of_sale_agreement_path_en }}">{{ _("English") }}</a>
{%- endif %}
</div>
</div>
</div>
</div>
</div>
<div class="alert alert-go_to">
<p class="alert-title">
{{ _("See also") }}
</p>
<p>
<a class="reference external" href="https://drive.google.com/open?id=1skSTsdAPOBlaIWi_hUkL3tfaoi8Qdspu" target="_blank">{{ _("Archive of older agreements") }}</a>
</p>
</div>
</section>
<section id="other-legal-references">
<h2>
{{ _("Other legal references") }}
<a class="headerlink" href="#other-legal-references" title="Permalink to this headline"></a>
</h2>
<ul class="simple">
<li>
<p>
<a class="reference external" href="https://www.odoo.com/cloud-sla" target="_blank">{{ _("Odoo Cloud Service Level Agreement (SLA)") }}</a>
</p>
</li>
<li>
<p>
<a class="reference external" href="https://www.odoo.com/acceptable-use" target="_blank">{{ _("Odoo Cloud Acceptable Use Policy") }}</a>
</p>
</li>
<li>
<p>
<a class="reference external" href="https://www.odoo.com/privacy" target="_blank">{{ _("Odoo SAs Privacy Policy") }}</a>
</p>
</li>
<li>
<p>
<a class="reference external" href="https://www.odoo.com/gdpr" target="_blank">{{ _("Odoo SAs GDPR Compliance Guide") }}</a>
</p>
</li>
<li>
<p>
<a class="reference internal" href="legal/cla.html#cla">
<span class="std std-ref">{{ _("Contributor License Agreement") }}</span>
</a>
</p>
</li>
<li>
<p>
<a class="reference internal" href="applications/finance/accounting/fiscal_localizations/localizations/germany.html#germany-gobd">
<span class="std std-ref">{{ _("German Tax Accounting Standards: Odoos guide to GoBD Compliance") }}</span>
</a>
</p>
</li>
</ul>
</section>
</article>
@@ -15,7 +15,7 @@
{%- endif %}
<ul class="dropdown-menu dropdown-menu-end" aria-labelledby="versions">
{%- for alternate_version, url in alternate_versions %}
<li><a class="dropdown-item" href="{{ url }}">{{ alternate_version }}</a></li>
<li><a class="o_switcher_item dropdown-item" href="{{ url }}">{{ alternate_version }}</a></li>
{%- endfor %}
</ul>
</div>
+1 -1
View File
@@ -12,7 +12,7 @@
* original target URL) that is available.
*/
const _prepareSwitchersFallbacks = () => {
document.querySelectorAll('a[class="dropdown-item"]').forEach(element => {
document.querySelectorAll('a[class="o_switcher_item"]').forEach(element => {
element.addEventListener('click', async event => {
if (element.hasAttribute('href')) {
const targetUrl = element.getAttribute('href');