SciPost Code Repository
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
SciPost
Manage
Activity
Members
Labels
Plan
Issues
118
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SciPost
SciPost
Commits
baa6b1fa
Commit
baa6b1fa
authored
7 years ago
by
Jean-Sébastien Caux
Browse files
Options
Downloads
Patches
Plain Diff
Change display of report metadata manage page
parent
8f46ada5
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
journals/templates/journals/manage_report_metadata.html
+4
-2
4 additions, 2 deletions
journals/templates/journals/manage_report_metadata.html
submissions/models.py
+28
-12
28 additions, 12 deletions
submissions/models.py
with
32 additions
and
14 deletions
journals/templates/journals/manage_report_metadata.html
+
4
−
2
View file @
baa6b1fa
...
...
@@ -26,8 +26,9 @@ event: "focusin"
<thead
class=
"thead-default"
>
<tr>
<th>
Submission
</th>
<th>
Associated doi
</th>
<th>
Report nr
</th>
<th>
Needs doi
</th>
<th>
Needs
own
doi
</th>
<th>
Latest successful Crossref deposit
</th>
<th>
Deposit needs updating?
</th>
</tr>
...
...
@@ -37,13 +38,14 @@ event: "focusin"
{% for report in reports %}
<tr
data-toggle=
"collapse"
data-parent=
"#accordion"
href=
"#collapse{{ report.id }}"
aria-expanded=
"true"
aria-controls=
"collapse{{ report.id }}"
style=
"cursor: pointer;"
>
<td>
{{ report.submission.arxiv_identifier_w_vn_nr }}
</td>
<td>
{{ report.associated_published_doi }}
</td>
<td>
{{ report.report_nr }}
</td>
<td>
{{ report.needs_doi }}
</td>
<td>
{{ report|latest_successful_crossref_deposit_report }}
</td>
<td>
{{ report.doideposit_needs_updating }}
</td>
</tr>
<tr
id=
"collapse{{ report.id }}"
class=
"collapse"
role=
"tabpanel"
aria-labelledby=
"heading{{ report.id }}"
style=
"background-color: #fff;"
>
<td
colspan=
"
5
"
>
<td
colspan=
"
6
"
>
<p><a
href=
"{{ report.submission.get_absolute_url }}"
>
{{ report.submission.arxiv_identifier_w_vn_nr }}
</a>
,
<a
href=
"{{ report.get_absolute_url }}"
>
{{ report.report_nr }}
</a></p>
<h2
class=
"ml-3"
>
Actions
</h2>
...
...
This diff is collapsed.
Click to expand it.
submissions/models.py
+
28
−
12
View file @
baa6b1fa
...
...
@@ -502,6 +502,21 @@ class Report(SubmissionRelatedObjectMixin, models.Model):
submission__arxiv_identifier_wo_vn_nr
=
self
.
submission
.
arxiv_identifier_wo_vn_nr
)
.
order_by
(
'
submission__arxiv_identifier_wo_vn_nr
'
).
last
())
@property
def
associated_published_doi
(
self
):
"""
Check if the Report relates to a SciPost-published object.
If it is, return the doi of the published object.
"""
try
:
publication
=
Publication
.
objects
.
get
(
accepted_submission__arxiv_identifier_wo_vn_nr
=
self
.
submission
.
arxiv_identifier_wo_vn_nr
)
except
Publication
.
DoesNotExist
:
return
None
return
publication
.
doi_string
@property
def
relation_to_published
(
self
):
"""
...
...
@@ -509,19 +524,20 @@ class Report(SubmissionRelatedObjectMixin, models.Model):
If it is, return a dict with info on relation to the published object,
based on Crossref
'
s peer review content type.
"""
publication
=
Publication
.
objects
.
get
(
accepted_submission__arxiv_identifier_wo_vn_nr
=
self
.
submission
.
arxiv_identifier_wo_vn_nr
)
if
publication
:
relation
=
{
'
isReviewOfDOI
'
:
publication
.
doi_string
,
'
stage
'
:
'
pre-publication
'
,
'
type
'
:
'
referee-report
'
,
'
title
'
:
'
Report on
'
+
self
.
submission
.
arxiv_identifier_w_vn_nr
,
'
contributor_role
'
:
'
reviewer
'
,
}
return
relation
try
:
publication
=
Publication
.
objects
.
get
(
accepted_submission__arxiv_identifier_wo_vn_nr
=
self
.
submission
.
arxiv_identifier_wo_vn_nr
)
except
Publication
.
DoesNotExist
:
return
None
return
None
relation
=
{
'
isReviewOfDOI
'
:
publication
.
doi_string
,
'
stage
'
:
'
pre-publication
'
,
'
type
'
:
'
referee-report
'
,
'
title
'
:
'
Report on
'
+
self
.
submission
.
arxiv_identifier_w_vn_nr
,
'
contributor_role
'
:
'
reviewer
'
,
}
return
relation
##########################
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment