Skip to content

Commit

Permalink
feat: Add bibxml button to document info page (#5921)
Browse files Browse the repository at this point in the history
* feat: Add bibxml button to document info page (#5908)

* fix: No bibxml for RFCs
  • Loading branch information
pselkirk committed Jul 7, 2023
1 parent 8f94269 commit bae2048
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ietf/doc/tests_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ def test_build_file_urls(self, mocked):
build_file_urls(WgDraftFactory(rev=''))

urls, types = build_file_urls(WgDraftFactory(rev='23'))
self.assertEqual(['xml', 'bibtex'], [t for t, _ in urls])
self.assertEqual(['xml', 'bibtex', 'bibxml'], [t for t, _ in urls])
self.assertEqual(types, ['xml'])

urls, types = build_file_urls(WgRfcFactory(rev=''))
Expand Down
1 change: 1 addition & 0 deletions ietf/doc/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1038,6 +1038,7 @@ def build_file_urls(doc: Union[Document, DocHistory]):
file_urls.append(("htmlized", urlreverse('ietf.doc.views_doc.document_html', kwargs=dict(name=doc.name, rev=doc.rev))))
file_urls.append(("pdfized", urlreverse('ietf.doc.views_doc.document_pdfized', kwargs=dict(name=doc.name, rev=doc.rev))))
file_urls.append(("bibtex", urlreverse('ietf.doc.views_doc.document_bibtex',kwargs=dict(name=doc.name,rev=doc.rev))))
file_urls.append(("bibxml", urlreverse('ietf.doc.views_doc.document_bibxml',kwargs=dict(name=doc.name,rev=doc.rev))))
else:
# As of 2022-12-14, there are 1463 Document and 3136 DocHistory records with type='draft' and rev=''.
# All of these are in the rfc state and are covered by the above cases.
Expand Down
2 changes: 1 addition & 1 deletion ietf/templates/doc/document_format_buttons.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
href="{{ url }}">
{% if label == 'pdf' or label == 'pdfized' %}
<i class="bi bi-file-pdf"></i> pdf
{% elif label == 'xml' or label == 'html' %}
{% 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
Expand Down

1 comment on commit bae2048

@MayLove31

This comment was marked as spam.

Please sign in to comment.