Skip to content
Snippets Groups Projects
Commit 6bd24f61 authored by David Larlet's avatar David Larlet
Browse files

Deal with the new code attribute of a Language

parent f73c4c53
No related branches found
No related tags found
No related merge requests found
......@@ -20,14 +20,14 @@
{% for alignment in text.meleager_alignment_text_1.all %}
<li {% if forloop.first %}class="selected"{% endif %}>
<a role="tab"
id="alignment-tab-{{ forloop.counter }}-{{ alignment.text_2.language }}"
id="alignment-tab-{{ forloop.counter }}-{{ alignment.text_2.language.code }}"
aria-selected="{% if forloop.first %}true{% else %}false{% endif %}"
aria-controls="alignment-content-{{ forloop.counter }}-{{ alignment.text_2.language }}"
aria-controls="alignment-content-{{ forloop.counter }}-{{ alignment.text_2.language.code }}"
data-target="tabs.link"
data-action="tabs#switch"
href="#alignment-content-{{ forloop.counter }}-{{ alignment.text_2.language }}"
href="#alignment-content-{{ forloop.counter }}-{{ alignment.text_2.language.code }}"
tabindex="{% if forloop.first %}0{% else %}-1{% endif %}"
>{{ alignment.text_2.language }}</a>
>{{ alignment.text_2.language.code }}</a>
</li>
{% endfor %}
{% endfor %}
......@@ -37,8 +37,8 @@
{% for text in texts %}
{% for alignment in text.meleager_alignment_text_1.all %}
<div role="tabpanel"
id="alignment-content-{{ forloop.counter }}-{{ alignment.text_2.language }}"
aria-labelledby="alignment-tab-{{ forloop.counter }}-{{ alignment.text_2.language }}"
id="alignment-content-{{ forloop.counter }}-{{ alignment.text_2.language.code }}"
aria-labelledby="alignment-tab-{{ forloop.counter }}-{{ alignment.text_2.language.code }}"
data-controller="alignments"
data-target="alignments.alignment tabs.content"
tabindex="0"
......
......@@ -16,7 +16,7 @@
{{ comment.comment_title }} :
{% for description in comment.descriptions.all %}
<blockquote class="pb-10">
[{{ description.language }}] {{ description.description }}
[{{ description.language.code }}] {{ description.description }}
<div class="mt-6 u-pull-right">
<a class="btn btn-dark outline" href="#comment-update-{{ comment.pk }}-{{ description.pk }}">
{% translate "✍️ Edit this comment" %}
......
......@@ -18,7 +18,7 @@
</div><div class="tag tag--info">
{{ description.name }}
</div><div class="tag tag--dark">
{{ description.language }}
{{ description.language.code }}
</div>
</div>
{% endfor %}
......
......@@ -11,14 +11,14 @@
{% for text in texts reversed %}
<li {% if forloop.first %}class="selected"{% endif %}>
<a role="tab"
id="text-tab-first-{{ forloop.counter }}-{{ text.language }}"
id="text-tab-first-{{ forloop.counter }}-{{ text.language.code }}"
aria-selected="{% if forloop.first %}true{% else %}false{% endif %}"
aria-controls="text-content-first-{{ forloop.counter }}-{{ text.language }}"
aria-controls="text-content-first-{{ forloop.counter }}-{{ text.language.code }}"
data-target="tabs.link"
data-action="tabs#switch"
href="#text-content-first-{{ forloop.counter }}-{{ text.language }}"
href="#text-content-first-{{ forloop.counter }}-{{ text.language.code }}"
tabindex="{% if forloop.first %}0{% else %}-1{% endif %}"
>{{ text.language }}</a>
>{{ text.language.code }}</a>
</li>
{% endfor %}
</ul>
......@@ -26,8 +26,8 @@
{% for text in texts reversed %}
<div role="tabpanel"
id="text-content-first-{{ forloop.counter }}-{{ text.language }}"
aria-labelledby="text-tab-first-{{ forloop.counter }}-{{ text.language }}"
id="text-content-first-{{ forloop.counter }}-{{ text.language.code }}"
aria-labelledby="text-tab-first-{{ forloop.counter }}-{{ text.language.code }}"
data-target="tabs.content"
tabindex="0"
{% if not forloop.first %}hidden{% endif %}
......@@ -36,7 +36,7 @@
{{ text.text|linebreaks }}
{% for author in authors %}
{% for name in author.names.all %}
{% if name.language == text.language %}
{% if name.language.code == text.language.code %}
<a href="{% url 'web:author-detail' author.pk %}">
{{ name.name }}
</a>
......@@ -57,14 +57,14 @@
{% for text in texts %}
<li {% if forloop.first %}class="selected"{% endif %}>
<a role="tab"
id="text-tab-last-{{ forloop.counter }}-{{ text.language }}"
id="text-tab-last-{{ forloop.counter }}-{{ text.language.code }}"
aria-selected="{% if forloop.first %}true{% else %}false{% endif %}"
aria-controls="text-content-last-{{ forloop.counter }}-{{ text.language }}"
aria-controls="text-content-last-{{ forloop.counter }}-{{ text.language.code }}"
data-target="tabs.link"
data-action="tabs#switch"
href="#text-content-last-{{ forloop.counter }}-{{ text.language }}"
href="#text-content-last-{{ forloop.counter }}-{{ text.language.code }}"
tabindex="{% if forloop.first %}0{% else %}-1{% endif %}"
>{{ text.language }}</a>
>{{ text.language.code }}</a>
</li>
{% endfor %}
</ul>
......@@ -72,8 +72,8 @@
{% for text in texts %}
<div role="tabpanel"
id="text-content-last-{{ forloop.counter }}-{{ text.language }}"
aria-labelledby="text-tab-last-{{ forloop.counter }}-{{ text.language }}"
id="text-content-last-{{ forloop.counter }}-{{ text.language.code }}"
aria-labelledby="text-tab-last-{{ forloop.counter }}-{{ text.language.code }}"
data-target="tabs.content"
tabindex="0"
{% if not forloop.first %}hidden{% endif %}
......@@ -82,7 +82,7 @@
{{ text.text|linebreaks }}
{% for author in authors %}
{% for name in author.names.all %}
{% if name.language == text.language %}
{% if name.language.code == text.language.code %}
<a href="{% url 'web:author-detail' author.pk %}">
{{ name.name }}
</a>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment