Skip to content

Commit

Permalink
Merge pull request #658 from DH-IT-Portal-Development/acceptation
Browse files Browse the repository at this point in the history
Merge "acc" into "master"
  • Loading branch information
EdoStorm96 authored Apr 17, 2024
2 parents 00602f5 + bf18776 commit 52aaa4c
Show file tree
Hide file tree
Showing 15 changed files with 249 additions and 164 deletions.
230 changes: 130 additions & 100 deletions locale/en/LC_MESSAGES/django.po

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions proposals/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,8 @@ class Statuses(models.IntegerChoices):
WMO_DECISION_MADE = 60, _("Aanvraag is beoordeeld door FETC-GW")

class PracticeReasons(models.IntegerChoices):
COURSE = 1, _("om de portal te exploreren")
EXPLORATION = 2, _("in het kader van een cursus")
COURSE = 1, _("in het kader van een cursus")
EXPLORATION = 2, _("om de portal te exploreren")

# Fields of a proposal
reference_number = models.CharField(
Expand Down
32 changes: 16 additions & 16 deletions proposals/templates/proposals/proposal_data_management.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,22 @@ <h2>{% trans "Data Management Plan" %}</h2>
<h3>{% trans "Nuttige workshops:" %}</h3>
<p>
{% blocktrans trimmed %}
Als je dit nog niet gedaan hebt, wordt er sterk aangeraden om de volgende workshop te volgen:
Als je dit nog niet gedaan hebt, wordt er sterk aangeraden om de volgende workshop/online training te volgen:
{% endblocktrans %}
</p>
<ul>
{% blocktrans trimmed %}
<li>
de workshop <a href="https://www.uu.nl/en/node/75859" target="_blank">Quick
<li>
{% blocktrans trimmed %}
De workshop <a href="https://www.uu.nl/en/node/75859" target="_blank">Quick
start to Research Data Management</a>
</li>
{% endblocktrans %}
{% endblocktrans %}
</li>
<li>
{% blocktrans trimmed %}
De online training <a href="https://www.uu.nl/en/research/research-data-management/training-workshops/online-training-learn-to-write-your-dmp"
target="_blank">Write your DMP</a>
{% endblocktrans %}
</li>
</ul>
<p>
{% blocktrans trimmed %}
Expand All @@ -76,23 +82,17 @@ <h2>{% trans "Privacy: AVG en GDPR" %}</h2>
{% endblocktrans %}
</li>
</ul>
<h3>{% trans "Nuttige workshops:" %}</h3>
<h3>{% trans "Nuttige informatie:" %}</h3>
<p>
{% blocktrans trimmed %}
Als je dit nog niet gedaan hebt, wordt er sterk aangeraden om de volgende workshop te volgen:
Voor vragen over privacy, zoals: "Wat zijn persoonlijke gegevens?" of "Wanneer mag ik mijn onderzoek anoniem noemen?", raden we je aan het <a href="https://utrechtuniversity.github.io/dataprivacyhandbook/"
target="_blank">Data Privacy Handboek</a> te raadplegen.
{% endblocktrans %}
</p>
<ul>
{% blocktrans trimmed %}
<li>
de workshop <a href="https://www.uu.nl/en/node/81799" target="_blank">Handling
personal data in research</a>
</li>
{% endblocktrans %}
</ul>
<p>
{% blocktrans trimmed %}
Voor advies op het gebied van privacy en de AVG kun je contact opnemen met de privacy officer van GW via <a href="mailto:[email protected]">[email protected]</a>.
Voor advies op het gebied van privacy en de AVG kun je contact opnemen met de privacy officer van GW via <a href="mailto:[email protected]" target="_blank">[email protected]</a>.
{% endblocktrans %}
</p>
<form action="" method="post" enctype="multipart/form-data">
Expand Down
4 changes: 2 additions & 2 deletions proposals/templates/proposals/table_with_header_diff.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ <h2 class="mt-5 mb-1">{% trans section_title %}</h2>
<table class="proposals-diff ">
<tr>
<th class="proposals-diff-question"></th>
<th class="proposals-diff-answer">{% trans "Originele aanvraag" %}</th>
<th class="proposals-diff-answer">{% trans "Revisie/amendement" %}</th>
<th class="proposals-diff-answer">{% trans "Vorige aanvraag" %}</th>
<th class="proposals-diff-answer">{% trans "Huidige aanvraag" %}</th>
</tr>
{% if warning %}
{% for row in rows|slice:":1" %}
Expand Down
3 changes: 2 additions & 1 deletion requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,5 @@ python-magic
pdftotext
bpython
black
djlint
djlint
sentry-sdk[django]
46 changes: 27 additions & 19 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#
# This file is autogenerated by pip-compile with Python 3.10
# This file is autogenerated by pip-compile with Python 3.9
# by the following command:
#
# pip-compile requirements.in
# pip-compile -U
#
-e git+https://github.com/UiL-OTS-labs/python-docx2txt#egg=docx2txt
# via -r requirements.in
Expand All @@ -12,7 +12,7 @@ alabaster==0.7.16
# via sphinx
arabic-reshaper==3.0.0
# via xhtml2pdf
asgiref==3.7.2
asgiref==3.8.1
# via django
asn1crypto==1.5.1
# via
Expand All @@ -21,7 +21,7 @@ asn1crypto==1.5.1
# pyhanko-certvalidator
babel==2.14.0
# via sphinx
black==24.2.0
black==24.3.0
# via -r requirements.in
blessed==1.20.0
# via curtsies
Expand All @@ -30,7 +30,9 @@ bpython==0.24
cdh-django-core[federated-auth] @ git+https://github.com/CentreForDigitalHumanities/[email protected]
# via -r requirements.in
certifi==2024.2.2
# via requests
# via
# requests
# sentry-sdk
cffi==1.16.0
# via cryptography
chardet==5.2.0
Expand Down Expand Up @@ -81,9 +83,10 @@ django==3.2.25
# django-user-agents
# djangorestframework
# djangosaml2
# sentry-sdk
# sphinxcontrib-django
# uil-django-core
django-auth-ldap==4.6.0
django-auth-ldap==4.7.0
# via -r requirements.in
django-braces==1.15.0
# via -r requirements.in
Expand All @@ -99,7 +102,7 @@ django-simple-menu==2.1.3
# via -r requirements.in
django-user-agents==0.4.0
# via -r requirements.in
djangorestframework==3.14.0
djangorestframework==3.15.1
# via
# -r requirements.in
# uil-django-core
Expand Down Expand Up @@ -133,17 +136,19 @@ idna==3.6
# via requests
imagesize==1.4.1
# via sphinx
importlib-metadata==7.1.0
# via sphinx
jinja2==3.1.3
# via sphinx
jsbeautifier==1.15.1
# via
# cssbeautifier
# djlint
json5==0.9.22
json5==0.9.24
# via djlint
lesscpy==0.15.1
# via uil-django-core
lxml==5.1.0
lxml==5.2.0
# via svglib
markupsafe==2.1.5
# via jinja2
Expand All @@ -165,7 +170,7 @@ pbr==6.0.0
# via sphinxcontrib-apidoc
pdftotext==2.2.2
# via -r requirements.in
pillow==10.2.0
pillow==10.3.0
# via
# -r requirements.in
# reportlab
Expand All @@ -178,20 +183,20 @@ pprintpp==0.4.0
# via sphinxcontrib-django
pscript==0.7.7
# via vbuild
pyasn1==0.5.1
pyasn1==0.6.0
# via
# pyasn1-modules
# python-ldap
pyasn1-modules==0.3.0
pyasn1-modules==0.4.0
# via python-ldap
pycparser==2.21
pycparser==2.22
# via cffi
pygments==2.17.2
# via
# -r requirements.in
# bpython
# sphinx
pyhanko==0.23.0
pyhanko==0.23.2
# via xhtml2pdf
pyhanko-certvalidator==0.26.3
# via
Expand Down Expand Up @@ -220,7 +225,6 @@ python-magic==0.4.27
pytz==2024.1
# via
# django
# djangorestframework
# pysaml2
pyxdg==0.28
# via bpython
Expand All @@ -245,6 +249,8 @@ requests==2.31.0
# pysaml2
# sphinx
# uil-django-core
sentry-sdk[django]==1.44.0
# via -r requirements.in
six==1.16.0
# via
# blessed
Expand All @@ -261,10 +267,7 @@ sphinx==7.2.6
# -r requirements.in
# sphinx-rtd-theme
# sphinxcontrib-apidoc
# sphinxcontrib-applehelp
# sphinxcontrib-devhelp
# sphinxcontrib-django
# sphinxcontrib-htmlhelp
# sphinxcontrib-jquery
sphinx-rtd-theme==2.0.0
# via -r requirements.in
Expand Down Expand Up @@ -307,6 +310,7 @@ typing-extensions==4.10.0
# asgiref
# black
# django-modeltranslation
# pypdf
# qrcode
tzlocal==5.2
# via pyhanko
Expand All @@ -315,7 +319,9 @@ ua-parser==0.18.0
uritools==4.0.2
# via pyhanko-certvalidator
urllib3==2.2.1
# via requests
# via
# requests
# sentry-sdk
user-agents==2.2.0
# via django-user-agents
vbuild==0.8.2
Expand All @@ -333,3 +339,5 @@ xhtml2pdf==0.2.15
# via -r requirements.in
xmlschema==2.5.1
# via pysaml2
zipp==3.18.1
# via importlib-metadata
11 changes: 11 additions & 0 deletions reviews/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,17 @@ def save(self, *args, **kwargs):
super(Decision, self).save(*args, **kwargs)
self.review.update_go(last_decision=self)

def is_final_decision(self):
"""
Checks if this is the final review in a reviewing round.
Will always return True on Supervisor reviews.
"""
open_decisions = self.review.decision_set.filter(
go="",
)
return open_decisions.count() < 2

def __str__(self):
return "Decision #%d by %s on %s: %s" % (
self.pk,
Expand Down
14 changes: 7 additions & 7 deletions reviews/templates/reviews/action_explaination.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ <h3>{% trans "Uitleg" %}</h3>
</li>
</ul>
</div>
<div class="col-12 {% if request.user|is_secretary %}col-md-6{% endif %}">
<h3>{% trans "Uitleg secretaris" %}</h3>
<ul>
{% if request.user|is_secretary %}
{% if request.user|is_secretary %}
<div class="col-12 col-md-6">
<ul>
<h3>{% trans "Uitleg secretaris" %}</h3>
<li>
{% blocktrans trimmed %}
Klik op
Expand Down Expand Up @@ -107,6 +107,6 @@ <h3>{% trans "Uitleg secretaris" %}</h3>
van de bevestigingsbrief te veranderen.
{% endblocktrans %}
</li>
{% endif %}
</ul>
</div>
</ul>
</div>
{% endif %}
7 changes: 7 additions & 0 deletions reviews/templates/reviews/decision_form.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@ <h2>{% trans "Aanvraag beoordelen" %}</h2>
De aanvraag is <a href="{{ pdf_url }}" target="_blank">hier</a> in te zien (downloadt als PDF).
{% endblocktrans %}
</p>
{% if decision.is_final_decision and not decision.go %}
<div class="alert alert-info">
{% blocktrans trimmed %}
<strong>Attentie:</strong> jij bent de laatste beoordelaar van deze aanvraag. Daarom kun je na het versturen je oordeel en commentaar niet meer bewerken. Controleer je antwoorden goed.
{% endblocktrans %}
</div>
{% endif %}
{% else %}
<p>
{% blocktrans trimmed with title=proposal.title %}
Expand Down
2 changes: 1 addition & 1 deletion reviews/templates/reviews/review_assign_form.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ <h2>{% trans "Commissieleden aanstellen" %}</h2>
{% blocktrans trimmed with title=review.proposal.title %}
<p>
Kies hier de geschikte route en commissieleden voor de aanvraag <em>{{ title }}</em>.
klik <a href="{{ workload_url }}">hier</a> voor een overzicht van de werkverdeling van deze commissie.
Klik <a href="{{ workload_url }}">hier</a> voor een overzicht van de werkverdeling van deze commissie.
</p>
{% endblocktrans %}
<form class="clearfix"
Expand Down
12 changes: 2 additions & 10 deletions reviews/templates/reviews/review_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,13 @@
{% load uil_filters %}

{% block header_title %}
{% blocktrans trimmed with proposal=review.proposal.title %}
Details van besluitvorming bij aanmelding {{ proposal }}
{% endblocktrans %}
- {{ review.proposal.reference_number }} - {{ block.super }}
{{ review.proposal.title }} - {{ review.proposal.reference_number }} - {{ block.super }}
{% endblock %}

{% block content %}
<div class="uu-inner-container">
<div class="col-12">
<h2>
{% blocktrans trimmed with proposal=review.proposal.title %}
Details van besluitvorming bij aanmelding <em>{{ proposal }}</em>
{% endblocktrans %}
- {{ review.proposal.reference_number }}
</h2>
<h2>{{ review.proposal.title }} - {{ review.proposal.reference_number }}</h2>
</div>
</div>
<div class="uu-inner-container">
Expand Down
8 changes: 5 additions & 3 deletions reviews/templates/reviews/review_detail_sidebar.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,18 +52,20 @@ <h3>{% trans "Details" %}</h3>
{% if review.date_end %}
<li>
{% blocktrans trimmed with date_end=review.date_end|date:"j F Y, G:i" %}
Reviewronde beëindigd op
Laatste beoordeling ontvangen op
<br />
{{ date_end }}.
{% endblocktrans %}
</li>
{% endif %}
{% if review.stage == review.Stages.CLOSED %}
<li>
{% blocktrans trimmed with continuation=review.get_continuation_display %}
{% blocktrans trimmed with continuation=review.get_continuation_display date_reviewed=review.proposal.date_reviewed|date:"j F Y, G:i" %}
Afhandeling:
<br />
{{ continuation }}.
{{ continuation }},
<br />
{{ date_reviewed }}.
{% endblocktrans %}
</li>
{% if review.proposal.date_confirmed %}
Expand Down
8 changes: 5 additions & 3 deletions reviews/utils/review_actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,13 @@ def get_available_decision(self):
user = self.user
review = self.review

if review.stage != review.Stages.COMMISSION:
if review.stage not in (review.Stages.COMMISSION, review.Stages.SUPERVISOR):
return False

try:
decision = Decision.objects.get(
review=review,
reviewer=user,
go="",
)
except Decision.DoesNotExist:
return None
Expand All @@ -115,7 +114,10 @@ def action_url(self):
def description(self):
decision = self.get_available_decision()

return _("Geef jouw beslissing en/of commentaar door")
if decision.go != "":
return _("Pas jouw beslissing en/of commentaar aan")
else:
return _("Geef jouw beslissing en/of commentaar door")


class CloseReview(ReviewAction):
Expand Down
Loading

0 comments on commit 52aaa4c

Please sign in to comment.