Skip to content

Commit

Permalink
improved invite participants view (#205)
Browse files Browse the repository at this point in the history
  • Loading branch information
bbonf authored Apr 22, 2024
1 parent e126436 commit 7be3234
Show file tree
Hide file tree
Showing 8 changed files with 77 additions and 31 deletions.
9 changes: 9 additions & 0 deletions lab/experiments/locale/en/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -919,3 +919,12 @@ msgstr "Parent with TOS"

msgid "experiments:invite:not_a_leader"
msgstr "Note: you are not a leader of the experiment"

msgid "experiments:invite:age"
msgstr "Age"

msgid "experiments:invite:multilingual"
msgstr "Multilingual"

msgid "experiments:invite:english"
msgstr "English contact"
23 changes: 22 additions & 1 deletion lab/experiments/locale/nl/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -918,4 +918,25 @@ msgid "criteria_snippit:pregnancy_duration"
msgstr "Zwangerschapsduur"

msgid "experiments:invite:not_a_leader"
msgstr "Opmerking: u bent geen leider van het experiment"
msgstr "Opmerking: u bent geen leider van het experiment"

msgid "experiments:invite:age"
msgstr "Leeftijd"

msgid "experiments:invite:multilingual"
msgstr "Meertalig"

msgid "experiments:invite:english"
msgstr "Engelse communicatie"

msgid "experiments:invite:last_call"
msgstr "Laatst gebeld"

msgid "experiments:invite:call_status"
msgstr "Status"

msgid "experiments:invite:actions"
msgstr "Acties"

msgid "experiments:invite:actions:call"
msgstr "Bel"
6 changes: 1 addition & 5 deletions lab/experiments/static/experiments/invite/table.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,7 @@ $(function () {
],
responsive: true,
paginationType: "full_numbers",
columnDefs: [ {
targets: 4,
orderable: false
}
]

});

$('#master_checkbox').click(function () {
Expand Down
54 changes: 34 additions & 20 deletions lab/experiments/templates/experiments/invite.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,44 +22,47 @@
{% endblock %}

{% block content %}
{% if not is_leader %}
<div class="uu-inner-container">
<div class="col-12">
<h1>
{% transformat 'experiments:invite:header' experiment.name %}
</h1>
</div>
</div>
<div class="uu-inner-container">
<div class="col-6">
{% include 'experiments/criteria_snippit.html' %}
</div>
<div class="col-6">
<p>
{% trans 'experiments:invite:info_text' %}
</p>
</div>
</div>

{% if not is_leader %}
<div class="uu-inner-container">
{% translate 'experiments:invite:not_a_leader' %}
</div>
{% endif %}

<div class="uu-inner-container">
<h2 class="mt-4">{% trans 'experiments:invite:participants' %}</h2>
<div class="uu-fullwidth-container">
<div class="col-12">
<h1>
{% transformat 'experiments:invite:header' experiment.name %}
</h1>
</div>
<form class="w-100" method="post">
<div>
<div class="col-12">
{% csrf_token %}
<table class="dt_custom" width="100%" data-language="{% datatables_lang %}" data-responsive="">
<table class="dt_custom table table-striped" width="100%" data-language="{% datatables_lang %}" data-responsive="">
<thead>
<tr>
<th>
{% get_verbose_field_name "participants" "ParticipantData" "name" %}
</th>
<th>
{% get_verbose_field_name "participants" "ParticipantData" "email" %}
{% trans 'experiments:invite:age' %}
</th>
<th>
{% get_verbose_field_name "participants" "ParticipantData" "birth_date" %}
</th>
<th>
{% get_verbose_field_name "participants" "ParticipantData" "dyslexic_parent" %}
</th>
<th>
{% trans 'experiments:invite:multilingual' %}
</th>
<th>
{% trans 'experiments:invite:english' %}
</th>
<th>
{% trans 'experiments:invite:last_call' %}
Expand All @@ -83,8 +86,19 @@ <h2 class="mt-4">{% trans 'experiments:invite:participants' %}</h2>
</a>
</td>
<td>
<!-- email -->
{{ participant.email }}
{{ participant.age }}
</td>
<td>
{{ participant.birth_date }}
</td>
<td>
{{ participant.dyslexic_parent_bool|yesno:_('options:yes,empty') }}
</td>
<td>
{{ participant.multilingual_bool|yesno:_('options:yes,empty') }}
</td>
<td>
{{ participant.english_contact|yesno:_('options:yes,empty') }}
</td>
<td>
<!-- last call -->
Expand Down
4 changes: 2 additions & 2 deletions lab/participants/locale/en/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -368,8 +368,8 @@ msgid "participants:globals:actions"
msgstr "Actions"

#: participants/templates/participants/index.html:53
msgid "options:yes,no"
msgstr "yes,no"
msgid "options:yes,empty"
msgstr "✔,"

#: participants/templates/participants/index.html:57
msgid "participants:home:update:title"
Expand Down
8 changes: 7 additions & 1 deletion lab/participants/locale/nl/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -290,4 +290,10 @@ msgid "default_criteria:attribute:yes"
msgstr "Ja"

msgid "default_criteria:attribute:no"
msgstr "Nee"
msgstr "Nee"

msgid "participant:attribute:dyslexic_parent"
msgstr "Dyslectisch ouder"

msgid "options:yes,empty"
msgstr "✔,"
2 changes: 1 addition & 1 deletion lab/participants/templates/participants/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ <h1>
<td> {{ participant.age }} </td>
<td> {{ participant.get_sex_display|default_if_none:"" }} </td>
<td> {{ participant.phonenumber }} </td>
<td> {{ participant.multilingual|yesno:_('options:yes,no') }} </td>
<td> {{ participant.multilingual|yesno:_('options:yes,empty') }} </td>
<td> {{ participant.created|date:'Y-m-d' }} </td>
<td>
<a href="{% url 'participants:edit' participant.pk %}"
Expand Down
2 changes: 1 addition & 1 deletion lab/signups/templates/signups/signup_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ <h1 class="h2">
</tr>
<tr>
<td> {% get_verbose_field_name "signups" "Signup" "english_contact" %} </td>
<td> {{ signup.english_contact|yesno:_("yes,no") }} </td>
<td> {{ signup.english_contact|yesno:_("yes,empty") }} </td>
</tr>
</table>

Expand Down

0 comments on commit 7be3234

Please sign in to comment.