Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/review and secretary pages redesign #688

Merged
merged 24 commits into from
Sep 23, 2024
Merged
Show file tree
Hide file tree
Changes from 23 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
3f7e101
feat: turn proposal export list into datatable
EdoStorm96 Aug 22, 2024
b67c5d4
feat:rename stepper block to sidebar
EdoStorm96 Aug 27, 2024
3c5b7fc
fix: change review_detail_sidebar to work with sidebar block on form_…
EdoStorm96 Aug 27, 2024
c15261d
fix: simplify form_buttons
EdoStorm96 Aug 27, 2024
f31e497
feat: restyle review_assign_form
EdoStorm96 Aug 27, 2024
a14cfe1
feat: restyle decision_form
EdoStorm96 Aug 27, 2024
48cc444
feat: restyle review_close_form and some imports
EdoStorm96 Aug 27, 2024
7393982
feat: restyle proposal_confirmation
EdoStorm96 Aug 27, 2024
a0e9323
feat: restyle review_discontinue_form
EdoStorm96 Aug 27, 2024
10a9c2f
feat:restyle proposal_update_date_start
EdoStorm96 Aug 27, 2024
24225c5
feat: restyle & rename proposal_update_dmp
EdoStorm96 Aug 27, 2024
d286713
feat: restyle study_update_attachments
EdoStorm96 Aug 27, 2024
593cebf
fix: update form_buttons block on proposal_submit
EdoStorm96 Aug 27, 2024
b702725
fix: some bugfixes to review_actions logic
EdoStorm96 Aug 27, 2024
c3483cc
feat: restyle committee_members_workload.html
EdoStorm96 Aug 28, 2024
4c29c77
fix: formatting
EdoStorm96 Aug 28, 2024
dee7879
fix: remove redundant with's
EdoStorm96 Sep 9, 2024
04b5b2a
fix: remove lost div
EdoStorm96 Sep 9, 2024
5283ac4
feat: add review sidebar on review close
EdoStorm96 Sep 9, 2024
9c90b5a
fix: updated logic for ChangeAssignment.is_available()
EdoStorm96 Sep 9, 2024
eb39a5d
Merge branch 'major/4' into feature/review_and_secretary_pages_redesign
EdoStorm96 Sep 9, 2024
e52b7e2
style: djlint
EdoStorm96 Sep 9, 2024
887ed5f
Merge branch 'major/4' into feature/review_and_secretary_pages_redesign
EdoStorm96 Sep 17, 2024
97c953a
fix: bugs on fetc_form_base.html
EdoStorm96 Sep 18, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 24 additions & 19 deletions main/templates/base/fetc_form_base.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

{# todo: responsive design #}
<div class="col-3">
{% block stepper %}
{% block sidebar %}
{% include stepper %}
{% endblock %}

Expand Down Expand Up @@ -37,28 +37,33 @@
{% block post-form-pre-buttons %}{% endblock %}

<div class="uu-form-text-row">
<div class="uu-form-text">{% include "base/form_buttons.html" %}</div>
<div class="uu-form-text">
<div class="mt-4 mb-3 w-100 d-flex">
{% block form-buttons %}
{% include "base/form_buttons.html" %}
{% endblock %}

</div>
</div>
</div>
{% endblock %}
{# A block one can use to add stuff after the form, but still next to the stepper #}
{% block post-form %}
<div class="uu-form-text-row">
<div class="uu-form-text">
{% block post-form-text %}{% endblock %}

{# A block one can use to add stuff after the form, but still next to the stepper #}
{% block post-form %}
<div class="uu-form-text-row">
<div class="uu-form-text">
{% block post-form-text %}{% endblock %}
</div>
<aside class="uu-form-text-aside">
{% block post-form-aside %}{% endblock %}

</aside>
</div>
<aside class="uu-form-text-aside">
{% block post-form-aside %}{% endblock %}
{% endblock %}

</aside>
</div>
{% endblock %}
</form>
</div>
{# A block one can use to insert content after the stepper/form container #}
{% block post-form-container-content %}{% endblock %}

</form>
</div>
{# A block one can use to insert content after the stepper/form container #}
{% block post-form-container-content %}{% endblock %}

</div>
{% endblock %}
{% endblock %}
28 changes: 13 additions & 15 deletions main/templates/base/form_buttons.html
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
{% load i18n %}

<div class="mt-4 mb-3 w-100 d-flex">
{% if not no_back %}
<input class="btn btn-secondary"
type="submit"
name="save_back"
value="{% trans '<< Opslaan en vorige stap' %}" />
{% endif %}
{% if not no_forward %}
{% trans 'Opslaan en volgende stap >>' as default_next_text %}
<input class="btn btn-primary continue-button ms-auto"
type="submit"
name="save_continue"
value="{{ next_text|default:default_next_text }}" />
{% endif %}
</div>
{% if not no_back %}
<input class="btn btn-secondary"
type="submit"
name="save_back"
value="{% trans '<< Opslaan en vorige stap' %}" />
{% endif %}
{% if not no_forward %}
{% trans 'Opslaan en volgende stap >>' as default_next_text %}
<input class="btn btn-primary continue-button ms-auto"
type="submit"
name="save_continue"
value="{{ next_text|default:default_next_text }}" />
{% endif %}
5 changes: 3 additions & 2 deletions proposals/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,7 @@ class ProposalConfirmationForm(TemplatedModelForm):
class Meta:
model = Proposal
fields = ["date_confirmed", "confirmation_comments"]
widgets = {"date_confirmed": DateInput}


class WmoForm(SoftValidationMixin, ConditionalModelForm):
Expand Down Expand Up @@ -770,13 +771,13 @@ def clean(self):
)


class ProposalUpdateDataManagementForm(forms.ModelForm):
class ProposalUpdateDataManagementForm(TemplatedModelForm):
class Meta:
model = Proposal
fields = ["dmp_file"]


class ProposalUpdateDateStartForm(forms.ModelForm):
class ProposalUpdateDateStartForm(TemplatedModelForm):
date_start = DateField(label=_("Nieuwe beoogde startdatum"))

class Meta:
Expand Down
47 changes: 15 additions & 32 deletions proposals/templates/proposals/proposal_confirmation.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% extends "base/fetc_base.html" %}
{% extends "base/fetc_form_base.html" %}

{% load static %}
{% load i18n %}
Expand All @@ -7,37 +7,20 @@
{% trans "Bevestigingsbrief versturen" %} - {{ block.super }}
{% endblock %}

{% block html_head %}
<script>
$(function () {
var date_format = '{{ LANGUAGE_CODE }}' === 'nl' ? 'dd-mm-yy' : 'mm/dd/yy';
$("#id_date_confirmed").datepicker({
dateFormat: date_format,
maxDate: 'now',
});
});
</script>
{% block sidebar %}<!--override the stepper-->{% endblock %}

{% block pre-form-text %}
<h2>{% trans "Bevestigingsbrief versturen" %}</h2>
<p>
{% blocktrans trimmed with title=review.proposal.title %}
Geef hieronder aan wanneer de bevestigingsbrief voor de aanvraag <em>{{ title }}</em> is verstuurd.
{% endblocktrans %}
</p>
{% endblock %}

{% block content %}
<div class="uu-container">
<div class="col-12">
<h2>{% trans "Bevestigingsbrief versturen" %}</h2>
<p>
{% blocktrans trimmed with title=review.proposal.title %}
Geef hieronder aan wanneer de bevestigingsbrief voor de aanvraag <em>{{ title }}</em> is verstuurd.
{% endblocktrans %}
</p>
<form action="" method="post" enctype="multipart/form-data">
{% csrf_token %}
<table>
{{ form.as_table }}
</table>
<a class="btn btn-secondary" href="javascript:history.go(-1);">{% trans "Terug naar de vorige pagina" %}</a>
<input class="btn btn-secondary"
type="submit"
value="{% trans 'Bevestigingsbrief verstuurd' %}" />
</form>
</div>
</div>
{% block form-buttons %}
<a class="btn btn-secondary" href="javascript:history.go(-1);">{% trans "Terug naar de vorige pagina" %}</a>
<input class="btn btn-primary ms-auto"
type="submit"
value="{% trans 'Bevestigingsbrief verstuurd' %}" />
{% endblock %}
61 changes: 33 additions & 28 deletions proposals/templates/proposals/proposal_export_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,42 +2,47 @@

{% load static %}
{% load i18n %}
{% load datatables %}

{% block header_title %}Goedgekeurde aanvragen - {{ block.super }}{% endblock %}

{% block content %}
<div class="uu-container">
<div class="col-12">
<h2>Approved proposals</h2>
<table class="display exportTable w-100">
<tr>
{# No translations here, as the table should be in English #}
<th>Reference Number</th>
<th>Title</th>
<th>Applicant</th>
<th>Researcher with final responsibility</th>
<th>Approval Date</th>
<th>FEtC-H chamber</th>
</tr>
{% for proposal in proposals %}
<h2 class="mb-3">Approved proposals</h2>
<table class="dt w-100" data-language="{% datatables_lang %}">
<thead>
<tr>
<td>{{ proposal.reference_number }}</td>
<td>{{ proposal.title }}</td>
<td>{{ proposal.created_by.get_full_name }}</td>
<td>
{% if proposal.supervisor %}{{ proposal.supervisor.get_full_name }}{% endif %}
</td>
<td>{{ proposal.date_confirmed|date:"d M Y" }}</td>
<td>
{# Bad translation hack #}
{% if proposal.reviewing_committee.name == "AK" %}
GC
{% else %}
LC
{% endif %}
</td>
{# No translations here, as the table should be in English #}
<th>Reference Number</th>
<th>Title</th>
<th>Applicant</th>
<th>Researcher with final responsibility</th>
<th>Approval Date</th>
<th>FEtC-H chamber</th>
</tr>
{% endfor %}
</thead>
<tbody>
{% for proposal in proposals %}
<tr>
<td>{{ proposal.reference_number }}</td>
<td>{{ proposal.title }}</td>
<td>{{ proposal.created_by.get_full_name }}</td>
<td>
{% if proposal.supervisor %}{{ proposal.supervisor.get_full_name }}{% endif %}
</td>
<td>{{ proposal.date_confirmed|date:"d M Y" }}</td>
<td>
{# Bad translation hack #}
{% if proposal.reviewing_committee.name == "AK" %}
GC
{% else %}
LC
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
<br />
</div>
Expand Down
30 changes: 13 additions & 17 deletions proposals/templates/proposals/proposal_submit.html
Original file line number Diff line number Diff line change
Expand Up @@ -152,21 +152,17 @@ <h5>{% trans "Controleer uw beoogde startdatum" %}</h5>
{% endblock %}

{% block form-buttons %}
<div class="uu-form-text-row">
<div class="uu-form-text">
{% if troublesome_pages or is_practice %}
{% include "base/form_buttons.html" with no_forward=1 %}
{% else %}
{% if proposal.is_pre_assessment %}
{% include "base/form_buttons.html" with next_text=_("Aanvraag voor voortoetsing versturen") %}
{% elif is_supervisor_edit_phase and is_supervisor %}
{% include "base/form_buttons.html" with next_text=_("Terug naar beoordeling >>") %}
{% elif proposal.relation.needs_supervisor %}
{% include "base/form_buttons.html" with next_text=_("Concept-aanmelding versturen") %}
{% else %}
{% include "base/form_buttons.html" with next_text=_("Aanmelding versturen") %}
{% endif %}
{% endif %}
</div>
</div>
{% if troublesome_pages or is_practice %}
{% include "base/form_buttons.html" with no_forward=1 %}
{% else %}
{% if proposal.is_pre_assessment %}
{% include "base/form_buttons.html" with next_text=_("Aanvraag voor voortoetsing versturen") %}
{% elif is_supervisor_edit_phase and is_supervisor %}
{% include "base/form_buttons.html" with next_text=_("Terug naar beoordeling >>") %}
{% elif proposal.relation.needs_supervisor %}
{% include "base/form_buttons.html" with next_text=_("Concept-aanmelding versturen") %}
{% else %}
{% include "base/form_buttons.html" with next_text=_("Aanmelding versturen") %}
{% endif %}
{% endif %}
{% endblock %}
33 changes: 0 additions & 33 deletions proposals/templates/proposals/proposal_update_attachments.html

This file was deleted.

50 changes: 22 additions & 28 deletions proposals/templates/proposals/proposal_update_date_start.html
Original file line number Diff line number Diff line change
@@ -1,36 +1,30 @@
{% extends "base/fetc_base.html" %}
{% extends "base/fetc_form_base.html" %}

{% load static %}
{% load i18n %}

{% block header_title %}
{% trans "Formulieren aanpassen" %} - {{ block.super }}
{% trans "Formulieren aanpassen" %}
{% endblock %}

{% block content %}
<div class="uu-container">
<div class="col-12">
<h2>{% trans "Startdatum aanpassen" %}</h2>
<p>
{% blocktrans trimmed with title=proposal.title ref_number=proposal.reference_number %}
Op deze pagina kan de startdatum worden aangepast van de aanvraag {{ title }}
(referentienummer <em>{{ ref_number }}</em>). <b>Let op!</b> Als de review al is afgerond,
wordt de nieuwe startdatum niet automatisch weergegeven in de PDF. Mocht je de PDF
opnieuw willen genereren, neem hierover dan contact op met
{% endblocktrans %}
<a href="mailto:[email protected]">[email protected]</a>.
</p>
<form action="" method="post" enctype="multipart/form-data">
{% csrf_token %}
<table>
{{ form.as_table }}
</table>
<input type="hidden" name="next" value="{{ request.META.HTTP_REFERER }}">
<input class="btn btn-primary"
type="submit"
value="{% trans 'Startdatum aanpassen' %}" />
<a class="btn btn-secondary" href="javascript:history.go(-1);">{% trans "Terug naar de vorige pagina" %}</a>
</form>
</div>
</div>
{% block sidebar %}<!--Empty to override stepper-->{% endblock %}

{% block pre-form-text %}
<h2>{% trans "Startdatum aanpassen" %}</h2>
<p>
{% blocktrans trimmed with title=proposal.title ref_number=proposal.reference_number %}
Op deze pagina kan de startdatum worden aangepast van de aanvraag {{ title }}
(referentienummer <em>{{ ref_number }}</em>). <b>Let op!</b> Als de review al is afgerond,
wordt de nieuwe startdatum niet automatisch weergegeven in de PDF. Mocht je de PDF
opnieuw willen genereren, neem hierover dan contact op met
{% endblocktrans %}
<a href="mailto:[email protected]">[email protected]</a>.
</p>
{% endblock %}

{% block form-buttons %}
<a class="btn btn-secondary" href="javascript:history.go(-1);">{% trans "Terug naar de vorige pagina" %}</a>
<input class="btn btn-primary ms-auto"
type="submit"
value="{% trans 'Startdatum aanpassen' %}" />
{% endblock %}
Loading
Loading