diff --git a/commentaries/templates/commentaries/commentary_detail.html b/commentaries/templates/commentaries/commentary_detail.html index 104df9d1df7bce6c0b9d5112f1949891e38d53ef..2a907bbffb5cd7d220d1e2b0ac51ec80c5918504 100644 --- a/commentaries/templates/commentaries/commentary_detail.html +++ b/commentaries/templates/commentaries/commentary_detail.html @@ -87,7 +87,7 @@ <div class="col-1"></div> <div class="col-10"> <h3>Comment text:</h3> - <div class="twocolumn">{{ comment.comment_text|linebreaks }}</div> + <p>{{ comment.comment_text|linebreaks }}</p> </div> </div> diff --git a/comments/models.py b/comments/models.py index 89283c2d29b0fafc28878fe16139d78358955daf..43238a20cd437da081ca6e870ccb0f2da00530ae 100644 --- a/comments/models.py +++ b/comments/models.py @@ -68,6 +68,18 @@ class Comment(models.Model): output += '<h4>Date: ' + self.date_submitted.strftime("%Y-%m-%d") + '</h4>\n</div>\n' return output + def header_as_li (self): + header = '<li><div class="flex-container">' + header += '<div class="flex-whitebox0"><p> \"' + self.comment_text[:50] + '\"</p><p>submitted on ' + self.date_submitted.strftime("%Y-%m-%d") + if self.submission is not None: + header += ' in submission on <a href="/submission/submission/' + str(self.submission.id) + '" class="pubtitleli">' + self.submission.title + '</a> by ' + self.submission.author_list + '</p></div>' + if self.commentary is not None: + header += ' in commentary on <a href="/commentaries/commentary/' + str(self.commentary.id) + '" class="pubtitleli">' + self.commentary.pub_title + '</a> by ' + self.commentary.author_list + '</p></div>' + if self.thesislink is not None: + header += ' in thesislink on <a href="/theses/thesis/' + str(self.thesislink.id) + '" class="pubtitleli">' + self.thesislink.pub_title + '</a> by ' + self.thesislink.author_list + '</p></div>' + header += '</div></li>' + return header + class AuthorReply(models.Model): """ Reply to a Comment or Report. """ diff --git a/journals/templates/journals/journals.html b/journals/templates/journals/journals.html index 3304ad85a65aa05ecf33b974849f04bf936c59d4..75e5ff7f57cbd2629d1bbebde53e87a5342b808a 100644 --- a/journals/templates/journals/journals.html +++ b/journals/templates/journals/journals.html @@ -12,7 +12,7 @@ <h1>SciPost Physics Journals</h1> </div> <br/> - <p id="journalsannounce">OPEN FOR SUBMISSION 5 MAY 2016</p> + <p id="journalsannounce">OPEN FOR SUBMISSION STARTING 5 MAY 2016</p> <br/> <div class="row"> <div class="col-5"> diff --git a/scipost/static/scipost/SciPost.css b/scipost/static/scipost/SciPost.css index ce768c96ad1c9dbf0edc0a61c71c037f43e2bcb5..a797ca6c69e8d99556da3870a11e65795292d474 100644 --- a/scipost/static/scipost/SciPost.css +++ b/scipost/static/scipost/SciPost.css @@ -169,6 +169,7 @@ hr.hr12 { background: linear-gradient(to right,#f8f8f8, #e0e0e0); } +/* For two-column text display */ .twocolumn { -webkit-column-count: 2; /* Chrome, Safari, Opera */ -moz-column-count: 2; /* Firefox */ diff --git a/scipost/templates/scipost/personal_page.html b/scipost/templates/scipost/personal_page.html index f753c8d4cf5f43163253024fec1af88bf007f98b..4af7a3d89076f531a128cb8dff9e32768fdaa400 100644 --- a/scipost/templates/scipost/personal_page.html +++ b/scipost/templates/scipost/personal_page.html @@ -109,7 +109,7 @@ </div> <ul> {% for own_comment in own_comments %} - <li>{{ own_comment.comment_text }}</li> + {{ own_comment.header_as_li|safe }} {% endfor %} </ul> </section> diff --git a/scipost/views.py b/scipost/views.py index cb0fd53d6292b8d73a725c6a3e8962d29e6b8f04..12533d29ac482d88402e855922ee3bc0a4dd2683 100644 --- a/scipost/views.py +++ b/scipost/views.py @@ -211,7 +211,7 @@ def personal_page(request): nr_author_replies_to_vet = AuthorReply.objects.filter(status=0).count() nr_reports_to_vet = Report.objects.filter(status=0).count() nr_thesislink_requests_to_vet = ThesisLink.objects.filter(vetted=False).count() - own_comments = Comment.objects.filter(author=contributor) + own_comments = Comment.objects.filter(author=contributor).order_by('-date_submitted') context = {'contributor': contributor, 'nr_reg_to_vet': nr_reg_to_vet, 'nr_reg_awaiting_validation': nr_reg_awaiting_validation, 'nr_commentary_page_requests_to_vet': nr_commentary_page_requests_to_vet, 'nr_comments_to_vet': nr_comments_to_vet, 'nr_author_replies_to_vet': nr_author_replies_to_vet, 'nr_reports_to_vet': nr_reports_to_vet, 'nr_submissions_to_process': nr_submissions_to_process, 'nr_thesislink_requests_to_vet': nr_thesislink_requests_to_vet, 'own_comments': own_comments} return render(request, 'scipost/personal_page.html', context) else: diff --git a/theses/templates/theses/thesis_detail.html b/theses/templates/theses/thesis_detail.html index 6d681e7b1d70978582d13de602cf4cdfa16e41c5..6b98eed7a48b9a6981087016c8efd4d6e2e83b0b 100644 --- a/theses/templates/theses/thesis_detail.html +++ b/theses/templates/theses/thesis_detail.html @@ -78,7 +78,7 @@ <div class="col-1"></div> <div class="col-10"> <h3>Comment text:</h3> - <div class="twocolumn">{{ comment.comment_text|linebreaks }}</div> + <p>{{ comment.comment_text|linebreaks }}</p> </div> </div>