Skip to content

Commit b0454d6

Browse files
authored
Merge pull request #319 from crf-devs/hide-included-user-skills
Remove included skills from users list
2 parents cf7158d + ec65ba1 commit b0454d6

File tree

6 files changed

+9
-11
lines changed

6 files changed

+9
-11
lines changed

assets/css/planning.scss

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,6 @@ $tableBoxSize: 40px;
2323
.planning {
2424
margin-bottom: 40px;
2525

26-
.badge {
27-
margin-right: 2px;
28-
}
29-
3026
thead {
3127
th {
3228
font-weight: 600;

src/Form/Type/UserType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
120120
if (self::DISPLAY_ORGANIZATION === $options['display_type']) {
121121
$form->add('vulnerable', ChoiceType::class, [
122122
'choices' => [
123-
'fait PAS partie des personnes vulnérables' => 0,
123+
'ne fait PAS partie des personnes vulnérables' => 0,
124124
'fait partie des personnes vulnérables' => 1,
125125
],
126126
'expanded' => true,

src/Twig/Extension/UserExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,6 @@ public function formatBadge(string $skill): string
3131
{
3232
$importantSkills = $this->skillSetDomain->getImportantSkills();
3333

34-
return sprintf('<span class="badge badge-%s">%s</span>', \in_array($skill, $importantSkills, true) ? 'primary' : 'secondary', $skill);
34+
return sprintf('<span class="badge badge-%s mr-1">%s</span>', \in_array($skill, $importantSkills, true) ? 'primary' : 'secondary', $skill);
3535
}
3636
}

templates/organization/user/_list.html.twig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@
1616
<tbody>
1717
{% for user in users %}
1818
<tr>
19-
<td>{{ user.identificationNumber }}</td>
19+
<td><small>{{ user.identificationNumber }}</small></td>
2020
<td>{{ user.firstName }}</td>
2121
<td>{{ user.lastName }}</td>
2222
<td>
23-
{% for skill in user.skillSet -%}
23+
{% for skill in getDisplayableSkillsInPlanning(user) -%}
2424
{{ skill|skillBadge }}
2525
{%- endfor %}
2626
</td>
27-
<td>{{ user.emailAddress }}</td>
27+
<td><small>{{ user.emailAddress }}</small></td>
2828
{% if organization.parent is null %}
2929
<td>{{ user.organization.name }}</td>
3030
{% endif %}

templates/organization/user/user-list.html.twig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
{{ encore_entry_script_tags('availabilitable-list') }}
66
{% endblock %}
77

8+
{% block title %}{{ 'organization.users' | trans }}{% endblock %}
9+
810
{% block body %}
911
<h1>{{ 'organization.users' | trans }} - {{ organization }}</h1>
1012

translations/messages.fr.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ organization:
8787
userAvailabilityNextWeek: Afficher les disponibilités de mes bénévoles pour la semaine prochaine
8888
userList: Liste des bénévoles
8989
user:
90-
hasDrivingLicence: Permis depuis plus de 3 ans ?
90+
hasDrivingLicence: Permis B depuis plus de 3 ans ?
9191
isFullyEquipped: Uniforme en dotation ?
9292
occupation: Fonction de cadre au sein de la structure d'emploi
9393
skillset: Compétences Croix-Rouge
@@ -106,7 +106,7 @@ user:
106106
availabilitySpecificWeek: Mes disponibilités pour la semaine du %week%
107107
createMyAccount: Créer mon compte
108108
detail:
109-
drivingLicence: Avez-vous le permis depuis plus de 3 ans ?
109+
drivingLicence: Avez-vous le permis B depuis plus de 3 ans ?
110110
fullyEquipped: Avez-vous un uniforme en dotation chez vous ?
111111
occupation: Quelle est votre profession ?
112112
organization: Votre structure de rattachement

0 commit comments

Comments
 (0)