datatracker/ietf/templates/doc/document_format_buttons.html
Paul Selkirk bae204862d
feat: Add bibxml button to document info page (#5921)
* feat: Add bibxml button to document info page (#5908)

* fix: No bibxml for RFCs
2023-07-07 08:23:15 -05:00

35 lines
1.6 KiB
HTML

{% 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' or label == 'bibxml' %}
<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 %}