SciPost Code Repository

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

Improve presentation overall

parent dcb47b68
No related branches found
No related tags found
No related merge requests found
...@@ -87,7 +87,7 @@ ...@@ -87,7 +87,7 @@
<div class="col-1"></div> <div class="col-1"></div>
<div class="col-10"> <div class="col-10">
<h3>Comment text:</h3> <h3>Comment text:</h3>
<div class="twocolumn">{{ comment.comment_text|linebreaks }}</div> <p>{{ comment.comment_text|linebreaks }}</p>
</div> </div>
</div> </div>
......
...@@ -68,6 +68,18 @@ class Comment(models.Model): ...@@ -68,6 +68,18 @@ class Comment(models.Model):
output += '<h4>Date: ' + self.date_submitted.strftime("%Y-%m-%d") + '</h4>\n</div>\n' output += '<h4>Date: ' + self.date_submitted.strftime("%Y-%m-%d") + '</h4>\n</div>\n'
return output 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): class AuthorReply(models.Model):
""" Reply to a Comment or Report. """ """ Reply to a Comment or Report. """
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<h1>SciPost Physics Journals</h1> <h1>SciPost Physics Journals</h1>
</div> </div>
<br/> <br/>
<p id="journalsannounce">OPEN FOR SUBMISSION 5 MAY 2016</p> <p id="journalsannounce">OPEN FOR SUBMISSION STARTING 5 MAY 2016</p>
<br/> <br/>
<div class="row"> <div class="row">
<div class="col-5"> <div class="col-5">
......
...@@ -169,6 +169,7 @@ hr.hr12 { ...@@ -169,6 +169,7 @@ hr.hr12 {
background: linear-gradient(to right,#f8f8f8, #e0e0e0); background: linear-gradient(to right,#f8f8f8, #e0e0e0);
} }
/* For two-column text display */
.twocolumn { .twocolumn {
-webkit-column-count: 2; /* Chrome, Safari, Opera */ -webkit-column-count: 2; /* Chrome, Safari, Opera */
-moz-column-count: 2; /* Firefox */ -moz-column-count: 2; /* Firefox */
......
...@@ -109,7 +109,7 @@ ...@@ -109,7 +109,7 @@
</div> </div>
<ul> <ul>
{% for own_comment in own_comments %} {% for own_comment in own_comments %}
<li>{{ own_comment.comment_text }}</li> {{ own_comment.header_as_li|safe }}
{% endfor %} {% endfor %}
</ul> </ul>
</section> </section>
......
...@@ -211,7 +211,7 @@ def personal_page(request): ...@@ -211,7 +211,7 @@ def personal_page(request):
nr_author_replies_to_vet = AuthorReply.objects.filter(status=0).count() nr_author_replies_to_vet = AuthorReply.objects.filter(status=0).count()
nr_reports_to_vet = Report.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() 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} 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) return render(request, 'scipost/personal_page.html', context)
else: else:
......
...@@ -78,7 +78,7 @@ ...@@ -78,7 +78,7 @@
<div class="col-1"></div> <div class="col-1"></div>
<div class="col-10"> <div class="col-10">
<h3>Comment text:</h3> <h3>Comment text:</h3>
<div class="twocolumn">{{ comment.comment_text|linebreaks }}</div> <p>{{ comment.comment_text|linebreaks }}</p>
</div> </div>
</div> </div>
......
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