fix: Show all available formats for archived I-Ds (#4298). Fixes #3881

This commit is contained in:
Lars Eggert 2022-07-29 16:39:45 -04:00 committed by GitHub
parent f5df294574
commit d3d75c1a8c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 28 additions and 19 deletions

View file

@ -245,19 +245,7 @@
Expired & archived
</div>
{% endif %}
{% if file_urls %}
<div class="buttonlist">
{% for label, url in file_urls %}
<a class="btn btn-primary btn-sm" href="{{ url }}">
<i class="bi bi-file-{% if label == 'pdf' %}pdf{% elif label == 'xml' or label == 'htmlized' or label == 'html' %}code{% elif label == 'bibtex' %}ruled{% elif label == 'plain text' %}text{% endif %}">
</i>
{{ label }}
</a>
{% endfor %}
</div>
{% else %}
(not online)
{% endif %}
{% include "doc/document_format_buttons.html" %}
</td>
</tr>
{% for check in doc.submission.latest_checks %}
@ -1155,12 +1143,10 @@
{% else %}
<div class="card border-warning mt-5">
<div class="card-header bg-warning">
<b>This Internet-Draft is no longer active. A copy of
the expired Internet-Draft can be found at:</b>
<br>
<a href="{{ doc.get_href }}">
{{ doc.get_href }}
</a>
<p><b>This Internet-Draft is no longer active. A copy of
the expired Internet-Draft is available in these formats:</b></p>
{% include "doc/document_format_buttons.html" %}
</div>
<div class="card-body">
<p class="h5 card-title">

View file

@ -0,0 +1,23 @@
{% if file_urls %}
<div class="buttonlist">
{% for label, url in file_urls %}
<a class="btn btn-primary btn-sm" href="{{ url }}">
{% if label == 'pdf' or label == 'pdfized' %}
<i class="bi bi-file-pdf"></i> pdf
{% elif label == 'xml' or label == 'html' %}
<i class="bi bi-file-code"></i> {{ label}}
{% elif label == 'htmlized' %}
<i class="bi bi-file-code"></i> htmlized
{% elif label == 'bibtex' %}
<i class="bi bi-file-ruled"></i> bibtex
{% elif label == 'plain text' %}
<i class="bi bi-file-text"></i> txt
{% elif label == 'with errata' %}
<i class="bi bi-file-diff"></i> w/errata
{% endif %}
</a>
{% endfor %}
</div>
{% else %}
<span class="text-muted">(not online)</span>
{% endif %}