Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ajout des liens vers les contenus dans l'état indiqué #6631

Merged
merged 1 commit into from
Aug 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions templates/tutorialv2/view/history.html
Original file line number Diff line number Diff line change
Expand Up @@ -71,16 +71,18 @@ <h2 class="subtitle">
{% if content.sha_public == commit.hexsha or content.sha_validation == commit.hexsha or content.sha_beta == commit.hexsha or content.sha_draft == commit.hexsha %}
<ul class="unstyled-list">
{% if content.sha_validation == commit.hexsha %}
<li>{% trans "Validation" %}</li>
{% url "content:validation-view" pk=content.pk slug=content.slug as url_validation %}
<a href="{{ url_validation }}"><li>{% trans "Validation" %}</li></a>
Copy link
Member

@AmauryCarrade AmauryCarrade Aug 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

La QA semble avoir été faite un peu vite, des erreurs d’inattention (je suppose) s’étant glissées.

Ce code HTML, et tous ses semblables, sont invalides (les éléments li doivent être des enfants directs de ul). Il aurait fallu inverser l’imbrication des balises li et a pour l'ensemble des liens ajoutés.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Effectivement. On n'a pas de vérification automatique sur les templates, ça aiderait à attraper ces trucs, parce que je t'avoue que je ne réflechis absolument pas à la validité du HTML quand je teste ces choses-là.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

J'ai crée un ticket pour cette occurence : #6632.

J'ai crée un ticket pour réfléchir à trouver des outils pour nous aider à vérifier ce type d'erreurs : #6633.

{% endif %}
{% if content.sha_beta == commit.hexsha %}
<li>{% trans "Bêta" %}</li>
{% url "content:beta-view" pk=content.pk slug=content.slug as url_beta %}
<a href="{{ url_beta }}"><li>{% trans "Bêta" %}</li></a>
{% endif %}
{% if content.sha_draft == commit.hexsha %}
<li>{% trans "Brouillon" %}</li>
<a href="{{ content.get_absolute_url }}"><li>{% trans "Brouillon" %}</li></a>
{% endif %}
{% if content.sha_public == commit.hexsha %}
<li>{% trans "Publiée" %}</li>
<a href="{{ content.get_absolute_url_online }}"><li>{% trans "Publiée" %}</li></a>
{% endif %}
</ul>
{% endif %}
Expand Down