Skip to content

Commit

Permalink
feat: Provide xml2rfc compatible BibXML for BibXML download button (i…
Browse files Browse the repository at this point in the history
  • Loading branch information
kesara authored Jul 24, 2024
1 parent a0b9f3c commit 9551911
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions main/templates/citation/export.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,23 @@
</span>
{% endfor %}
{% for format in available_serialization_formats %}
{% if format == "bibxml" and xml2rfc_urls %}
{% for _, url, _ in xml2rfc_urls|slice:":1" %}
<a
class="link button-v2 shrink-0 grow-0"
href="{{ url }}"
>
<span class="label">
{{ format }}
</span>
<span class="icon">
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor">
<path fill-rule="evenodd" d="M3 17a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zm3.293-7.707a1 1 0 011.414 0L9 10.586V3a1 1 0 112 0v7.586l1.293-1.293a1 1 0 111.414 1.414l-3 3a1 1 0 01-1.414 0l-3-3a1 1 0 010-1.414z" clip-rule="evenodd" />
</svg>
</span>
</a>
{% endfor %}
{% else %}
<a
class="link button-v2 shrink-0 grow-0"
href="{% url "export_citation" %}?doctype={{ docid.type }}&docid={{ docid.id|urlencode:"" }}&format={{ format }}"
Expand All @@ -35,6 +52,7 @@
</svg>
</span>
</a>
{% endif %}
{% endfor %}
{% else %}
<a
Expand Down

0 comments on commit 9551911

Please sign in to comment.