Skip to content

Commit

Permalink
#2819 adds description to Review Files block to avoid confusion and a…
Browse files Browse the repository at this point in the history
…dds the latest manuscript and figure files inline below a revision request.
  • Loading branch information
ajrbyers committed Jul 21, 2022
1 parent 473705e commit 9f8f791
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/submission/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import uuid
import os
from dateutil import parser as dateparser
from itertools import chain

from django.urls import reverse
from django.db import connection, models
Expand Down Expand Up @@ -1603,6 +1604,9 @@ def hidden_completed_reviews(self):
decision='withdrawn',
)

def ms_and_figure_files(self):
return chain(self.manuscript_files.all(), self.data_figure_files.all())


class FrozenAuthor(AbstractLastModifiedModel):
article = models.ForeignKey('submission.Article', blank=True, null=True)
Expand Down
33 changes: 33 additions & 0 deletions src/templates/admin/review/in_review.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ <h2>Files</h2>
Files</a>{% endif %}
</div>
<div class="row" data-equalizer data-equalize-on="medium">
<p>
These files are the versions sent out to reviewers in Round {{ round.round_number }} of review.
</p>
{% for file in round.review_files.all %}
<div class="large-3 columns{% if forloop.last %} end{% endif %}">
<div class="callout breakdown file" data-equalizer-watch>
Expand Down Expand Up @@ -180,10 +183,40 @@ <h2>Revision Requests</h2>
{% endif %}
</td>
</tr>
<tr>
{% endfor %}
</tbody>
</table>
</div>
<div class="title-area">
<h2>Current Files</h2>
</div>
<div class="content">
<p>
<small>
The latest manuscript and figure files for this article. When a revision task is completed these will be updated with the latest versions from the authors.
</small>
</p>
<table>
<tr>
<th>File ID</th>
<th colspan="2">File Name</th>
<th>Uploaded</th>
<th>Download</th>
</tr>
{% for file in article.ms_and_figure_files %}
<tr>
<td>{{ file.pk }}</td>
<td colspan="2">{{ file.original_filename }}</td>
<td>{{ file.date_uploaded|date:"Y-m-d G:i" }}</td>
<td>
<a href="{% url 'editor_file_download' article.pk file.pk %}"><i
class="fa fa-download">&nbsp;</i></a>
</td>
</tr>
{% endfor %}
</table>
</div>
</div>
{% endif %}

Expand Down

0 comments on commit 9f8f791

Please sign in to comment.