diff --git a/comments/models.py b/comments/models.py index c2404137f134c3c9db2133e39efedf802c5e519b..cf5c7f31194b87dcb2b2c47c08a1c394d58ca698 100644 --- a/comments/models.py +++ b/comments/models.py @@ -114,8 +114,8 @@ class Comment(models.Model): if self.in_reply_to: output += (' (in reply to <a href="#comment_id' + str(self.in_reply_to_id) + '" style="font-size: 80%">' + str(self.in_reply_to.author.user.first_name) + ' ' + - str(self.in_reply_to.author.user.last_name) + '</a> on ' + - self.in_reply_to.date_submitted.strftime("%Y-%m-%d")) + str(self.in_reply_to.author.user.last_name) + ' on ' + + self.in_reply_to.date_submitted.strftime("%Y-%m-%d") + '</a>') output += '</h3></div>' return output diff --git a/scipost/models.py b/scipost/models.py index d94f99436e089eb593c7fccf1c3b487ab26eb130..a688e6070bed21bc4b5b335d540728d7cc8b7c0c 100644 --- a/scipost/models.py +++ b/scipost/models.py @@ -68,7 +68,7 @@ class Contributor(models.Model): def __str__ (self): return self.user.last_name + ', ' + self.user.first_name - def as_table (self): + def private_info_as_table (self): output = '<table>' output += '<tr><td>Title: </td><td> </td><td>' + title_dict[self.title] + '</td></tr>' output += '<tr><td>First name: </td><td> </td><td>' + self.user.first_name + '</td></tr>' @@ -82,6 +82,18 @@ class Contributor(models.Model): output += '</table>' return output + def public_info_as_table (self): + output = '<table>' + output += '<tr><td>Title: </td><td> </td><td>' + title_dict[self.title] + '</td></tr>' + output += '<tr><td>First name: </td><td> </td><td>' + self.user.first_name + '</td></tr>' + output += '<tr><td>Last name: </td><td> </td><td>' + self.user.last_name + '</td></tr>' + output += '<tr><td>ORCID id: </td><td> </td><td>' + self.orcid_id + '</td></tr>' + output += '<tr><td>Country of employment: </td><td> </td><td>' + str(self.country_of_employment.name) + '</td></tr>' + output += '<tr><td>Affiliation: </td><td> </td><td>' + self.affiliation + '</td></tr>' + output += '<tr><td>Personal web page: </td><td> </td><td>' + self.personalwebpage + '</td></tr>' + output += '</table>' + return output + AUTHORSHIP_CLAIM_STATUS = ( (1, 'accepted'), (0, 'not yet vetted (pending)'), diff --git a/scipost/static/scipost/SciPost.css b/scipost/static/scipost/SciPost.css index 0db3e4a79982a8d58a64ee1e40c7dba2700e24d7..624e23a2e9e00f2363dfe453f0f75f3138024914 100644 --- a/scipost/static/scipost/SciPost.css +++ b/scipost/static/scipost/SciPost.css @@ -248,7 +248,6 @@ hr.hr12 { padding: 3px 5px; background-color: #f4f4f4; border-radius: 4px; - border: 1px solid orange; } body { diff --git a/scipost/templates/scipost/contributor_info.html b/scipost/templates/scipost/contributor_info.html index f0dcdae395355478fccec0f4929d67a19fcfb34a..51b427a469a56409e0303863a25b20f3a426a46c 100644 --- a/scipost/templates/scipost/contributor_info.html +++ b/scipost/templates/scipost/contributor_info.html @@ -25,7 +25,7 @@ </div> <div class="row"> <div class="col-6"> - {{ contributor.as_table|safe }} + {{ contributor.public_info_as_table|safe }} </div> </div> </section> diff --git a/scipost/templates/scipost/personal_page.html b/scipost/templates/scipost/personal_page.html index cfdc5c6b85e0708496ac72b315351f3093356331..0336551ff1e5f8ca70ef353a82a9bed216057159 100644 --- a/scipost/templates/scipost/personal_page.html +++ b/scipost/templates/scipost/personal_page.html @@ -31,7 +31,7 @@ <div class="row"> <div class="col-6"> <h3>Your personal details</h3> - {{ contributor.as_table|safe }} + {{ contributor.private_info_as_table|safe }} </div> <div class="col-6"> <h3>Update your personal data or password</h3> diff --git a/scipost/templates/scipost/vet_registration_requests.html b/scipost/templates/scipost/vet_registration_requests.html index 0e93596b5e0e35db3dad0e237f5c49931db7dde1..fed3f55fc726b932c55f3be5ec965bab041fa6a5 100644 --- a/scipost/templates/scipost/vet_registration_requests.html +++ b/scipost/templates/scipost/vet_registration_requests.html @@ -60,7 +60,7 @@ $( document ).ready(function() { <hr> <div class="flex-container"> <div class="flex-whitebox"> - {{ contributor_to_vet.as_table|safe }} + {{ contributor_to_vet.private_info_as_table|safe }} </div> <div class="flex-whitebox"> <form action="{% url 'scipost:vet_registration_request_ack' contributor_id=contributor_to_vet.id %}" method="post">