fix: Let charter revisions be variable length in the version paginator (#4989)

* fix: Let charter revisions be variable length in the version paginator

Fixes #4988

* Address review comments. Also make major charter revisions bold for readability.
This commit is contained in:
Lars Eggert 2023-01-18 18:36:21 +02:00 committed by GitHub
parent 1f87ff164f
commit d7a7033a42
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 3 deletions

View file

@ -220,6 +220,12 @@ th,
}
}
.charter.revision-list {
.page-item {
width: auto;
}
}
// Style the photo cards
.photo {
width: 12em;

View file

@ -1,14 +1,14 @@
{# Copyright The IETF Trust 2015, All Rights Reserved #}
{% load origin %}
{% load origin ietf_filters %}
{% origin %}
{% if not document_html %}
<label class="my-1 fw-bold">Versions:</label>
<nav class="mb-3">
{% endif %}
<ul class="revision-list pagination pagination-sm text-center flex-wrap{% if document_html %} my-0{% endif %}">
<ul class="revision-list{%if doc.type.slug == 'charter' %} charter{% endif %} pagination pagination-sm text-center flex-wrap{% if document_html %} my-0{% endif %}">
{% for rev in revisions %}
{% if rev %}
<li class="page-item {% if rev == doc.rev %}{% if snapshot or doc.get_state_slug != 'rfc' %}active{% endif %}{% endif %}">
<li class="page-item {%if doc.type.slug == 'charter' and rev == rev|charter_major_rev %}fw-bold {% endif %}{% if rev == doc.rev %}{% if snapshot or doc.get_state_slug != 'rfc' %}active{% endif %}{% endif %}">
<a class="page-link"
href="{% if snapshot and doc.get_state_slug == 'rfc' %}{% if document_html %}{% url 'ietf.doc.views_doc.document_html' name=doc.doc.name %}{% else %}{% url 'ietf.doc.views_doc.document_main' name=doc.doc.name %}{% endif %}{% else %}{% if document_html %}{% url 'ietf.doc.views_doc.document_html' name=doc.name rev=rev %}{% else %}{% url 'ietf.doc.views_doc.document_main' name=doc.name rev=rev %}{% endif %}{% endif %}"
{% if rev != '00' and rev != latest_rev %}rel="nofollow"{% endif %}>