Skip to content

Commit bae2048

Browse files
authored
feat: Add bibxml button to document info page (ietf-tools#5921)
* feat: Add bibxml button to document info page (ietf-tools#5908) * fix: No bibxml for RFCs
1 parent 8f94269 commit bae2048

3 files changed

Lines changed: 3 additions & 2 deletions

File tree

ietf/doc/tests_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ def test_build_file_urls(self, mocked):
308308
build_file_urls(WgDraftFactory(rev=''))
309309

310310
urls, types = build_file_urls(WgDraftFactory(rev='23'))
311-
self.assertEqual(['xml', 'bibtex'], [t for t, _ in urls])
311+
self.assertEqual(['xml', 'bibtex', 'bibxml'], [t for t, _ in urls])
312312
self.assertEqual(types, ['xml'])
313313

314314
urls, types = build_file_urls(WgRfcFactory(rev=''))

ietf/doc/utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1038,6 +1038,7 @@ def build_file_urls(doc: Union[Document, DocHistory]):
10381038
file_urls.append(("htmlized", urlreverse('ietf.doc.views_doc.document_html', kwargs=dict(name=doc.name, rev=doc.rev))))
10391039
file_urls.append(("pdfized", urlreverse('ietf.doc.views_doc.document_pdfized', kwargs=dict(name=doc.name, rev=doc.rev))))
10401040
file_urls.append(("bibtex", urlreverse('ietf.doc.views_doc.document_bibtex',kwargs=dict(name=doc.name,rev=doc.rev))))
1041+
file_urls.append(("bibxml", urlreverse('ietf.doc.views_doc.document_bibxml',kwargs=dict(name=doc.name,rev=doc.rev))))
10411042
else:
10421043
# As of 2022-12-14, there are 1463 Document and 3136 DocHistory records with type='draft' and rev=''.
10431044
# All of these are in the rfc state and are covered by the above cases.

ietf/templates/doc/document_format_buttons.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
href="{{ url }}">
1616
{% if label == 'pdf' or label == 'pdfized' %}
1717
<i class="bi bi-file-pdf"></i> pdf
18-
{% elif label == 'xml' or label == 'html' %}
18+
{% elif label == 'xml' or label == 'html' or label == 'bibxml' %}
1919
<i class="bi bi-file-code"></i> {{ label}}
2020
{% elif label == 'htmlized' %}
2121
<i class="bi bi-file-code"></i> htmlized

0 commit comments

Comments
 (0)