From d00a7a1f25fad438c0bc9409234e7b0d1804f589 Mon Sep 17 00:00:00 2001 From: SwoopDoable <swoop-doable.0v@icloud.com> Date: Fri, 13 Sep 2024 13:59:44 +0200 Subject: [PATCH] QOL changes to proceedings metadata page --- .../journals/create_proceedings_metadata_xml.html | 2 +- .../templates/journals/generic_metadata_xml_deposit.html | 8 ++------ scipost_django/journals/views.py | 2 +- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/scipost_django/journals/templates/journals/create_proceedings_metadata_xml.html b/scipost_django/journals/templates/journals/create_proceedings_metadata_xml.html index 784e969d2..0a3214c28 100644 --- a/scipost_django/journals/templates/journals/create_proceedings_metadata_xml.html +++ b/scipost_django/journals/templates/journals/create_proceedings_metadata_xml.html @@ -56,7 +56,7 @@ {% endif %} <input type="submit" class="btn btn-primary" value="Accept the metadata" /> - <a href="{% url 'journals:manage_metadata' %}" class="ms-3 btn btn-link">Back to Admin</a> + <a href="{% url 'journals:manage_proceedings_metadata' %}" class="ms-3 btn btn-link">Back to Admin</a> </form> <hr class="divider" /> diff --git a/scipost_django/journals/templates/journals/generic_metadata_xml_deposit.html b/scipost_django/journals/templates/journals/generic_metadata_xml_deposit.html index 6a06a9346..8397be14a 100644 --- a/scipost_django/journals/templates/journals/generic_metadata_xml_deposit.html +++ b/scipost_django/journals/templates/journals/generic_metadata_xml_deposit.html @@ -25,14 +25,10 @@ {% endif %} <h3 class="my-1">Response headers:</h3> - <div> - <pre><code>{{ response_headers|linebreaks }}</code></pre> - </div> + <pre><code>{{ response_headers|linebreaks }}</code></pre> <h3 class="mt-3">Response text:</h3> - <div class="border p-3 my-3"> - {{ response_text|safe }} - </div> + <pre><code>{{ response_text|linebreaks }}</code></pre> <h3>Return to the <a href="{{ manage_metadata_url }}">management page</a></h3> diff --git a/scipost_django/journals/views.py b/scipost_django/journals/views.py index 58adda5bf..24d391012 100644 --- a/scipost_django/journals/views.py +++ b/scipost_django/journals/views.py @@ -1970,7 +1970,7 @@ def generic_metadata_xml_deposit(request, **kwargs): if isinstance(_object, PublicationUpdate): metadata_xml = _object.xml(doi_batch_id=doi_batch_id) elif isinstance(_object, Proceedings): - metadata_xml = _object.metadata_xml + metadata_xml = _object.metadata_xml.encode("utf-8") else: # Report or Comment relation_to_published = ( _object.relation_to_published -- GitLab