From b5829d8893f325fe72d77b4e2faf42d9f33776a6 Mon Sep 17 00:00:00 2001
From: "J.-S. Caux" <J.S.Caux@uva.nl>
Date: Mon, 21 Nov 2016 18:31:33 +0100
Subject: [PATCH] Work on metadata deposit

---
 journals/templates/journals/create_metadata_xml.html     | 9 +++++++++
 .../templates/journals/test_metadata_xml_deposit.html    | 4 ++--
 journals/views.py                                        | 8 ++++----
 3 files changed, 15 insertions(+), 6 deletions(-)

diff --git a/journals/templates/journals/create_metadata_xml.html b/journals/templates/journals/create_metadata_xml.html
index 271d8fc09..0373d2c51 100644
--- a/journals/templates/journals/create_metadata_xml.html
+++ b/journals/templates/journals/create_metadata_xml.html
@@ -20,6 +20,15 @@
     <input type="submit" value="Accept the metadata">
   </form>
 
+  <hr class="hr6"/>
+
+  <h3>Current metadata xml:</h3>
+  <p>{{ publication.metadata_xml|linebreaks }}</p>
+
+  <hr class="hr6"/>
+
+  <h3>Once you're happy with this metadata, you can <a href="{% url 'scipost:publication_detail' doi_string=publication.doi_string %}">return to the publication's page</a></h3>
+
 </section>
 
 
diff --git a/journals/templates/journals/test_metadata_xml_deposit.html b/journals/templates/journals/test_metadata_xml_deposit.html
index b64032ff9..8fc6d8ff3 100644
--- a/journals/templates/journals/test_metadata_xml_deposit.html
+++ b/journals/templates/journals/test_metadata_xml_deposit.html
@@ -15,10 +15,10 @@
   {% endif %}
 
   <h3>Response headers:</h3>
-  <p>{{ response_headers }}</p>
+  <p>{{ response_headers|linebreaks }}</p>
 
   <h3>Response text:</h3>
-  <p>{{ response_text }}</p>
+  <p>{{ response_text|linebreaks }}</p>
 
   <h3>Once you're happy, you can <a href="{% url 'scipost:publication_detail' doi_string=publication.doi_string %}">return to the publication's page</a></h3>
 
diff --git a/journals/views.py b/journals/views.py
index 34a688972..3e63e8399 100644
--- a/journals/views.py
+++ b/journals/views.py
@@ -469,11 +469,11 @@ def create_metadata_xml(request, doi_string):
                 '</person_name>\n'
             )
         if author.orcid_id:
-            #publication.metadata_xml += '<ORCID>' + author.orcid_id + '</ORCID>\n'
-            initial['metadata_xml'] += '<ORCID>' + author.orcid_id + '</ORCID>\n'
+            #publication.metadata_xml += '<ORCID>http://orcid.org' + author.orcid_id + '</ORCID>\n'
+            initial['metadata_xml'] += '<ORCID>http://orcid.org/' + author.orcid_id + '</ORCID>\n'
 
-            #publication.metadata_xml += '</contributors>\n'
-            initial['metadata_xml'] += '</contributors>\n'
+    #publication.metadata_xml += '</contributors>\n'
+    initial['metadata_xml'] += '</contributors>\n'
 
     #publication.metadata_xml += (
     initial['metadata_xml'] += (
-- 
GitLab