forked from ietf-tools/datatracker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrevisions_list.html
More file actions
53 lines (53 loc) · 2.75 KB
/
Copy pathrevisions_list.html
File metadata and controls
53 lines (53 loc) · 2.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
{# Copyright The IETF Trust 2015, All Rights Reserved #}
{% 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{%if doc.type.slug == 'charter' %} charter{% endif %} pagination pagination-sm text-center flex-wrap{% if document_html %} my-0{% endif %}">
{% if doc.type_id == "rfc" %}
{% with doc.came_from_draft as draft %}
{% if draft %}
{% for rev in draft.revisions_by_dochistory %}
<li class="page-item">
<a class="page-link"
href="{% if document_html %}{% url 'ietf.doc.views_doc.document_html' name=draft.name rev=rev %}{% else %}{% url 'ietf.doc.views_doc.document_main' name=draft.name rev=rev %}{% endif %}"
rel="nofollow">
{{ rev }}
</a>
</li>
{% endfor %}
{% endif %}
{% endwith %}
<li class="page-item rfc active">
<a class="page-link"
href="{% if document_html %}{% url 'ietf.doc.views_doc.document_html' name=doc.name %}{% else %}{% url 'ietf.doc.views_doc.document_main' name=doc.name %}{% endif %}">
RFC {{ doc.rfc_number }}
</a>
</li>
{% else %}
{% for rev in revisions %}
{% if rev %} {# I think this guard is now unnecessary #}
<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 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 %}"
{% if rev != '00' and rev != latest_rev %}rel="nofollow"{% endif %}>
{{ rev }}
</a>
</li>
{% endif %}
{% endfor %}
{% if doc.became_rfc %}
<li class="page-item rfc">
<a class="page-link"
href="{% if document_html %}{% url 'ietf.doc.views_doc.document_html' name=doc.became_rfc.name %}{% else %}{% url 'ietf.doc.views_doc.document_main' name=doc.became_rfc.name %}{% endif %}">
RFC {{ doc.became_rfc.rfc_number }}
</a>
</li>
{% endif %}
{% endif %}
</ul>
{% if not document_html %}
</nav>
{% endif %}