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
babd941d
Commit
babd941d
authored
6 years ago
by
Jean-Sébastien Caux
Browse files
Options
Downloads
Patches
Plain Diff
Add template filter to check author ordering
parent
6c00faf6
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/partials/journals/publication_preparation.html
+1
-0
1 addition, 0 deletions
.../templates/partials/journals/publication_preparation.html
journals/templatetags/publication_administration.py
+14
-0
14 additions, 0 deletions
journals/templatetags/publication_administration.py
with
15 additions
and
0 deletions
journals/templates/partials/journals/publication_preparation.html
+
1
−
0
View file @
babd941d
...
...
@@ -4,6 +4,7 @@
<ul
class=
"fa-ul"
>
<li><i
class=
"fa-li fa fa-check-square text-success"
></i><a
href=
"{% url 'journals:update_publication' publication.accepted_submission.arxiv_identifier_w_vn_nr %}"
>
Create/update Publication object
</a></li>
<li><i
class=
"fa-li fa {% if publication|has_all_author_relations %}fa-check-square text-success{% else %}fa-square{% endif %}"
></i><a
href=
"{% url 'journals:add_author' publication.doi_label %}"
>
Create all author relations
</a></li>
<li><i
class=
"fa-li fa {% if publication|authors_in_right_order %}fa-check-square text-success{% else %}fa-square{% endif %}"
></i><a
href=
"{% url 'journals:update_author_ordering' doi_label=publication.doi_label %}"
>
Update Author ordering
</a></li>
<li><i
class=
"fa-li fa {% if publication.has_citation_list %}fa-check-square text-success{% else %}fa-square{% endif %}"
></i><a
href=
"{% url 'journals:create_citation_list_metadata' publication.doi_label %}"
>
Create/update citation metadata
</a></li>
<li><i
class=
"fa-li fa {% if publication.has_funding_statement %}fa-check-square text-success{% else %}fa-square{% endif %}"
></i><a
href=
"{% url 'journals:create_funding_info_metadata' publication.doi_label %}"
>
Create/update funding info metadata
</a></li>
<li><i
class=
"fa-li fa {% if publication.grants.exists %}fa-check-square text-success{% else %}fa-square{% endif %}"
></i><a
href=
"{% url 'journals:update_grants' publication.doi_label %}"
>
Create/update grants
</a></li>
...
...
This diff is collapsed.
Click to expand it.
journals/templatetags/publication_administration.py
+
14
−
0
View file @
babd941d
...
...
@@ -13,3 +13,17 @@ def has_all_author_relations(publication):
Check if all authors are added to the Publication object, just by counting.
"""
return
len
(
publication
.
author_list
.
split
(
'
,
'
))
==
publication
.
authors
.
count
()
@register.filter
def
authors_in_right_order
(
publication
):
"""
Checks if all author orderings correspond to those in author list.
"""
if
not
has_all_author_relations
(
publication
):
return
False
list_of_authors
=
publication
.
author_list
.
split
(
'
,
'
)
for
author
in
publication
.
authors
.
all
():
if
author
.
last_name
not
in
list_of_authors
[
author
.
order
]:
return
False
return
True
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