SciPost Code Repository

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

Improve presentation

parent e97d8e71
No related branches found
No related tags found
No related merge requests found
......@@ -44,3 +44,14 @@ class Commentary(models.Model):
def __str__ (self):
return self.pub_title
def header_as_table (self):
header = '<table>'
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>'
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>'
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>Date: </td><td>&nbsp;</td><td>' + str(self.pub_date) + '</td></tr>'
header += '</table>'
return header
......@@ -39,19 +39,18 @@
-->
<section>
<div class="flex-greybox">
<h1>SciPost Commentary Page &nbsp; (for non-SciPost publications)</h1>
<h1>SciPost Commentary Page &nbsp; (non-SciPost publications)</h1>
<button id="ratingsbutton">Toggle ratings view</button>
</div>
</section>
<section>
<hr class="hr12">
<div class="row">
<div class="col-4">
<h2>Original publication: </h2>
</div>
</div>
{{ commentary.header_as_table|safe }}
<!--
<table>
<tr><td>Title: </td><td>{{ commentary.pub_title }}</td></tr>
<tr><td>Author(s): </td><td>{{ commentary.author_list }}</td></tr>
......@@ -59,6 +58,7 @@
<tr><td>DOI Link: </td><td><a href="{{ commentary.pub_DOI_link }}">{{ commentary.pub_DOI_link }}</a></td></tr>
<tr><td>Date published: </td><td>{{ commentary.pub_date }}</td></tr>
</table>
-->
<h3>Abstract:</h3>
<p>{{ commentary.pub_abstract }}</p>
......
......@@ -28,19 +28,11 @@
{% if user.is_authenticated %}
<section>
<hr class="hr12">
<div class="row">
<div class="col-10">
<h1>SciPost Submission Page &nbsp; (for papers submitted to SciPost)</h1>
</div>
<div class="col-2">
<br/>
<button id="ratingsbutton">Toggle ratings view</button>
</div>
<div class="flex-greybox">
<h1>SciPost Submission Page &nbsp; (for papers submitted to SciPost)</h1>
<button id="ratingsbutton">Toggle ratings view</button>
</div>
</section>
<section>
<hr class="hr12">
<div class="row">
<div class="col-4">
......@@ -78,13 +70,9 @@
{% if reports %}
<section>
<hr class="hr12">
<div class="row">
<div class="col-10">
<h2>Reports on this Submission</h2>
</div>
<div class="col-2">
<button id="reportsbutton">Toggle reports view</button>
</div>
<div class="flex-breybox">
<h2>Reports on this Submission</h2>
<button id="reportsbutton">Toggle reports view</button>
</div>
<div id="reportslist">
......@@ -235,13 +223,9 @@
{% if comments %}
<section>
<hr class="hr12">
<div class="row">
<div class="col-10">
<h2>Comments on this Submission</h2>
</div>
<div class="col-2">
<button id="commentsbutton">Toggle comments view</button>
</div>
<div class="flex-greybox">
<h2>Comments on this Submission</h2>
<button id="commentsbutton">Toggle comments view</button>
</div>
<div id="commentslist">
......@@ -379,7 +363,9 @@
{% if user.is_authenticated and submission.open_for_commenting and user.contributor.rank > 0 %}
<section>
<hr class="hr12"/>
<h1>Contribute a Comment:</h1>
<div class="flex-greybox">
<h1>Contribute a Comment:</h1>
</div>
<form action="{% url 'submissions:submission' submission.id %}" method="post">
{% csrf_token %}
{% load crispy_forms_tags %}
......
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