SciPost Code Repository

Skip to content
Snippets Groups Projects
Commit d6bbbb4d authored by Jean-Sébastien Caux's avatar Jean-Sébastien Caux
Browse files

Correct bugs in theses comments vetting

parent 432b05a2
No related branches found
No related tags found
Loading
...@@ -43,7 +43,7 @@ class Commentary(models.Model): ...@@ -43,7 +43,7 @@ class Commentary(models.Model):
header += '<tr><td>Title: </td><td>&nbsp;</td><td>' + self.pub_title + '</td></tr>' header += '<tr><td>Title: </td><td>&nbsp;</td><td>' + self.pub_title + '</td></tr>'
header += '<tr><td>Author(s): </td><td>&nbsp;</td><td>' + self.author_list + '</td></tr>' header += '<tr><td>Author(s): </td><td>&nbsp;</td><td>' + self.author_list + '</td></tr>'
if self.type == 'published': if self.type == 'published':
header += '<tr><td>DOI: </td><td>&nbsp;</td><td><a href="' + self.pub_DOI_link + '">' + self.pub_DOI_link + '</a></td></tr>' header += '<tr><td>DOI: </td><td>&nbsp;</td><td><a href="' + self.pub_DOI_link + '" target="_blank">' + self.pub_DOI_link + '</a></td></tr>'
elif self.type == 'preprint': elif self.type == 'preprint':
header += '<tr><td>arxiv Link: </td><td>&nbsp;</td><td><a href="' + self.arxiv_link + '">' + self.arxiv_link + '</a></td></tr>' header += '<tr><td>arxiv Link: </td><td>&nbsp;</td><td><a href="' + self.arxiv_link + '">' + self.arxiv_link + '</a></td></tr>'
header += '<tr><td>Date: </td><td>&nbsp;</td><td>' + str(self.pub_date) + '</td></tr>' header += '<tr><td>Date: </td><td>&nbsp;</td><td>' + str(self.pub_date) + '</td></tr>'
......
...@@ -43,6 +43,10 @@ def vet_submitted_comment_ack(request, comment_id): ...@@ -43,6 +43,10 @@ def vet_submitted_comment_ack(request, comment_id):
email_text += comment.submission.title + ' by ' + comment.submission.author_list email_text += comment.submission.title + ' by ' + comment.submission.author_list
comment.submission.latest_activity = timezone.now() comment.submission.latest_activity = timezone.now()
comment.submission.save() comment.submission.save()
elif comment.thesislink is not None:
email_text += comment.thesislink.title + ' by ' + comment.thesis.author
comment.thesislink.latest_activity = timezone.now()
comment.thesislink.save()
email_text += (', has been accepted and published online.' + email_text += (', has been accepted and published online.' +
'\n\nWe copy it below for your convenience.' + '\n\nWe copy it below for your convenience.' +
'\n\nThank you for your contribution, \nThe SciPost Team.' + '\n\nThank you for your contribution, \nThe SciPost Team.' +
...@@ -62,6 +66,8 @@ def vet_submitted_comment_ack(request, comment_id): ...@@ -62,6 +66,8 @@ def vet_submitted_comment_ack(request, comment_id):
email_text += comment.commentary.pub_title + ' by ' + comment.commentary.author_list email_text += comment.commentary.pub_title + ' by ' + comment.commentary.author_list
elif comment.submission is not None: elif comment.submission is not None:
email_text += comment.submission.title + ' by ' + comment.submission.author_list email_text += comment.submission.title + ' by ' + comment.submission.author_list
elif comment.thesislink is not None:
email_text += comment.thesislink.title + ' by ' + comment.thesislink.author
email_text += (', has been rejected for the following reason: ' + comment_refusal_dict[comment.status] + '.' + email_text += (', has been rejected for the following reason: ' + comment_refusal_dict[comment.status] + '.' +
'\n\nWe copy it below for your convenience.' + '\n\nWe copy it below for your convenience.' +
'\n\nThank you for your contribution, \nThe SciPost Team.') '\n\nThank you for your contribution, \nThe SciPost Team.')
......
...@@ -54,7 +54,7 @@ class Submission(models.Model): ...@@ -54,7 +54,7 @@ class Submission(models.Model):
header = '<table>' header = '<table>'
header += '<tr><td>Title: </td><td>&nbsp;</td><td>' + self.title + '</td></tr>' header += '<tr><td>Title: </td><td>&nbsp;</td><td>' + self.title + '</td></tr>'
header += '<tr><td>Author(s): </td><td>&nbsp;</td><td>' + self.author_list + '</td></tr>' header += '<tr><td>Author(s): </td><td>&nbsp;</td><td>' + self.author_list + '</td></tr>'
header += '<tr><td>arxiv Link: </td><td>&nbsp;</td><td><a href="' + self.arxiv_link + '">' + self.arxiv_link + '</a></td></tr>' header += '<tr><td>arxiv Link: </td><td>&nbsp;</td><td><a href="' + self.arxiv_link + '" target="_blank">' + self.arxiv_link + '</a></td></tr>'
header += '<tr><td>Date submitted: </td><td>&nbsp;</td><td>' + str(self.submission_date) + '</td></tr>' header += '<tr><td>Date submitted: </td><td>&nbsp;</td><td>' + str(self.submission_date) + '</td></tr>'
header += '<tr><td>Submitted by: </td><td>&nbsp;</td><td>' + str(self.submitted_by) + '</td></tr>' header += '<tr><td>Submitted by: </td><td>&nbsp;</td><td>' + str(self.submitted_by) + '</td></tr>'
header += '<tr><td>Submitted to: </td><td>&nbsp;</td><td>' + journals_submit_dict[self.submitted_to_journal] + '</td></tr>' header += '<tr><td>Submitted to: </td><td>&nbsp;</td><td>' + journals_submit_dict[self.submitted_to_journal] + '</td></tr>'
......
...@@ -49,7 +49,7 @@ class ThesisLink(models.Model): ...@@ -49,7 +49,7 @@ class ThesisLink(models.Model):
header += '<tr><td>Discipline: </td><td></td><td>' + disciplines_dict[self.discipline] + '</td></tr>' header += '<tr><td>Discipline: </td><td></td><td>' + disciplines_dict[self.discipline] + '</td></tr>'
header += '<tr><td>Domain: </td><td></td><td>' + journals_domains_dict[self.domain] + '</td></tr>' header += '<tr><td>Domain: </td><td></td><td>' + journals_domains_dict[self.domain] + '</td></tr>'
header += '<tr><td>Specialization: </td><td></td><td>' + journals_spec_dict[self.specialization] + '</td></tr>' header += '<tr><td>Specialization: </td><td></td><td>' + journals_spec_dict[self.specialization] + '</td></tr>'
header += '<tr><td>URL: </td><td>&nbsp;</td><td><a href="' + self.pub_link + '">' + self.pub_link + '</a></td></tr>' header += '<tr><td>URL: </td><td>&nbsp;</td><td><a href="' + self.pub_link + '" target="_blank">' + self.pub_link + '</a></td></tr>'
header += '<tr><td>Degree granting institution: </td><td>&nbsp;</td><td>' + self.institution + '</td></tr>' header += '<tr><td>Degree granting institution: </td><td>&nbsp;</td><td>' + self.institution + '</td></tr>'
header += '<tr><td>Supervisor(s): </td><td></td><td>' + self.supervisor + '</td></tr>' header += '<tr><td>Supervisor(s): </td><td></td><td>' + self.supervisor + '</td></tr>'
header += '<tr><td>Defense date: </td><td>&nbsp;</td><td>' + str(self.defense_date) + '</td></tr>' header += '<tr><td>Defense date: </td><td>&nbsp;</td><td>' + str(self.defense_date) + '</td></tr>'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment