forked from ietf-tools/datatracker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocument_format_buttons.html
More file actions
35 lines (35 loc) · 1.53 KB
/
document_format_buttons.html
File metadata and controls
35 lines (35 loc) · 1.53 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
{% if file_urls %}
<div class="buttonlist">
{% for label, url in file_urls %}
{% if label != skip_format %}
<a class="btn btn-primary btn-sm"
{% if label == 'pdf' or label == 'pdfized' %}
download="{% if not snapshot and doc.get_state_slug == 'rfc' %}rfc{{ doc.rfc_number }}{% else %}{{ doc.name }}-{{ doc.rev }}{% endif %}.pdf"
{% comment %}
TODO: determine if we want bibtex to jiust download
{% elif label == 'bibtex' %}
download="{% if not snapshot and doc.get_state_slug == 'rfc' %}rfc{{ doc.rfc_number }}{% else %}{{ doc.name }}-{{ doc.rev }}{% endif %}.bib"
{% endcomment %}
{% endif %}
{% if label != 'htmlized' %}target="_blank"{% endif %}
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>
{% endif %}
{% endfor %}
</div>
{% else %}
<span class="text-muted">(not online)</span>
{% endif %}