diff --git a/src/Bundle/ChillActivityBundle/Controller/ActivityController.php b/src/Bundle/ChillActivityBundle/Controller/ActivityController.php index 798ae77b4..97678af50 100644 --- a/src/Bundle/ChillActivityBundle/Controller/ActivityController.php +++ b/src/Bundle/ChillActivityBundle/Controller/ActivityController.php @@ -41,7 +41,6 @@ use Symfony\Component\Form\Extension\Core\Type\SubmitType; use Symfony\Component\Form\FormInterface; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\Security\Core\Role\Role; use Symfony\Component\Serializer\SerializerInterface; use Symfony\Contracts\Translation\TranslatorInterface; use function array_key_exists; @@ -213,7 +212,7 @@ final class ActivityController extends AbstractController $form = $this->createForm(ActivityType::class, $entity, [ 'center' => $this->centerResolver->resolveCenters($entity)[0] ?? null, - 'role' => new Role('CHILL_ACTIVITY_UPDATE'), + 'role' => 'CHILL_ACTIVITY_UPDATE', 'activityType' => $entity->getActivityType(), 'accompanyingPeriod' => $accompanyingPeriod, ]); @@ -442,7 +441,7 @@ final class ActivityController extends AbstractController $form = $this->createForm(ActivityType::class, $entity, [ 'center' => $this->centerResolver->resolveCenters($entity)[0] ?? null, - 'role' => new Role('CHILL_ACTIVITY_CREATE'), + 'role' => 'CHILL_ACTIVITY_CREATE', 'activityType' => $entity->getActivityType(), 'accompanyingPeriod' => $accompanyingPeriod, ]); diff --git a/src/Bundle/ChillActivityBundle/translations/messages.fr.yml b/src/Bundle/ChillActivityBundle/translations/messages.fr.yml index be12daca0..042fccc69 100644 --- a/src/Bundle/ChillActivityBundle/translations/messages.fr.yml +++ b/src/Bundle/ChillActivityBundle/translations/messages.fr.yml @@ -106,6 +106,9 @@ CHILL_ACTIVITY_SEE_DETAILS: Voir le détail des échanges CHILL_ACTIVITY_DELETE: Supprimer un échange CHILL_ACTIVITY_STATS: Statistique des échanges CHILL_ACTIVITY_LIST: Liste des échanges +CHILL_ACTIVITY_CREATE_PERSON: Créer un échange lié à un usager +CHILL_ACTIVITY_CREATE_ACCOMPANYING_COURSE: Créer un échange lié à un parcours +CHILL_ACTIVITY_FULL: Voir les détails, créer, supprimer et mettre à jour un échange # admin Activities: Échanges diff --git a/src/Bundle/ChillDocGeneratorBundle/Resources/views/DocGeneratorTemplate/index.html.twig b/src/Bundle/ChillDocGeneratorBundle/Resources/views/DocGeneratorTemplate/index.html.twig index 73527edb3..1adb6872b 100644 --- a/src/Bundle/ChillDocGeneratorBundle/Resources/views/DocGeneratorTemplate/index.html.twig +++ b/src/Bundle/ChillDocGeneratorBundle/Resources/views/DocGeneratorTemplate/index.html.twig @@ -27,9 +27,7 @@
| {{ 'Creator bundle id' | trans }} | {{ 'Internal id inside creator bundle' | trans }} | {{ 'Document class' | trans }} | {{ 'Name' | trans }} | -{{ 'Actions' | trans }} | +{{ 'Actions' | trans }} | {{ document_category.documentClass }} | {{ document_category.name | localize_translatable_string}} | -+ |
add('scope', EntityType::class, [
'class' => Scope::class,
+ 'placeholder' => 'Choose amongst scopes',
'choice_label' => static function (Scope $scope) use ($translatableStringHelper) {
return $translatableStringHelper->localize($scope->getName());
},
diff --git a/src/Bundle/ChillMainBundle/Resources/public/chill/chillmain.scss b/src/Bundle/ChillMainBundle/Resources/public/chill/chillmain.scss
index 3c9fc8601..2523ee202 100644
--- a/src/Bundle/ChillMainBundle/Resources/public/chill/chillmain.scss
+++ b/src/Bundle/ChillMainBundle/Resources/public/chill/chillmain.scss
@@ -375,6 +375,12 @@ span.dt {
font-weight: bolder;
background-color: var(--bs-chill-light-gray);
}
+/// help text
+.help-text {
+ margin-top: 0.25rem;
+ font-size: 0.875em;
+ color: var(--bs-gray);
+}
/*
diff --git a/src/Bundle/ChillMainBundle/Resources/public/chill/scss/record_actions.scss b/src/Bundle/ChillMainBundle/Resources/public/chill/scss/record_actions.scss
index b8f60e250..5158a826e 100644
--- a/src/Bundle/ChillMainBundle/Resources/public/chill/scss/record_actions.scss
+++ b/src/Bundle/ChillMainBundle/Resources/public/chill/scss/record_actions.scss
@@ -1,3 +1,11 @@
+/// mixin to set sticky area on bottom when scrolling
+@mixin sticky-bottom {
+ position: sticky;
+ bottom: 0;
+ margin-top: 4em;
+ z-index: 1000;
+}
+
ul.record_actions {
display: flex;
flex-direction: row;
@@ -53,16 +61,30 @@ ul.record_actions {
}
}
}
+
+.sticky-form {
+ background-color: $white;
+ padding-top: 1.25em;
+ margin: -1em;
+ box-shadow: 0 -20px 20px -20px rgba($chill-gray, .5);
+ @include sticky-bottom;
+
+ .sticky-form-buttons {
+ position: initial;
+ bottom: unset;
+ margin-top: unset;
+ z-index: unset;
+ }
+}
+
.sticky-form-buttons {
- margin-top: 4em;
- background-color: $beige;
- position: sticky;
- bottom: 0.3em;
- text-align: center;
- display: flex;
- padding: 0.8em 1.6em;
- border-radius: 0;
- z-index: 1000;
+ display: flex;
+ background-color: $beige;
+ text-align: center;
+ padding: 0.8em 1.6em;
+ border-radius: 0;
+ @include sticky-bottom;
+ bottom: 0.3em;
}
/// EXCEPTIONS
diff --git a/src/Bundle/ChillMainBundle/Resources/views/CRUD/_edit_content.html.twig b/src/Bundle/ChillMainBundle/Resources/views/CRUD/_edit_content.html.twig
index e23949162..0bfa5d54b 100644
--- a/src/Bundle/ChillMainBundle/Resources/views/CRUD/_edit_content.html.twig
+++ b/src/Bundle/ChillMainBundle/Resources/views/CRUD/_edit_content.html.twig
@@ -1,7 +1,7 @@
{% set formId = crudMainFormId|default('crud_main_form') %}
{% block crud_content_header %}
- {{ ('crud.'~crud_name~'.title_edit')|trans }}+{{ ('crud.'~crud_name~'.title_edit')|trans }}{% endblock crud_content_header %} {% block crud_content_form %} diff --git a/src/Bundle/ChillMainBundle/Resources/views/CRUD/_index.html.twig b/src/Bundle/ChillMainBundle/Resources/views/CRUD/_index.html.twig index eaacc1f73..81e29a52e 100644 --- a/src/Bundle/ChillMainBundle/Resources/views/CRUD/_index.html.twig +++ b/src/Bundle/ChillMainBundle/Resources/views/CRUD/_index.html.twig @@ -14,7 +14,7 @@ {% endblock %} {% else %} {% block table_entities %} -
{{ 'This group does not provide any permission'|trans }} - {%- endif -%} + {%- else -%} +{{ 'This group does not provide any permission'|trans }} + {%- endif -%} + +
-
+{% endblock %}
+
+{% block js %}
+
{% endblock %}
diff --git a/src/Bundle/ChillMainBundle/Resources/views/PermissionsGroup/index.html.twig b/src/Bundle/ChillMainBundle/Resources/views/PermissionsGroup/index.html.twig
index 1b35e9799..6741898e3 100644
--- a/src/Bundle/ChillMainBundle/Resources/views/PermissionsGroup/index.html.twig
+++ b/src/Bundle/ChillMainBundle/Resources/views/PermissionsGroup/index.html.twig
@@ -5,7 +5,7 @@
{% block admin_content -%}
{{ 'Grant new permissions'|trans }}{{ form_start(add_role_scopes_form) }} {{ form_errors(add_role_scopes_form) }} - {{ form_row(add_role_scopes_form.composed_role_scope.role) }} - {{ form_row(add_role_scopes_form.composed_role_scope.scope) }} + +
+ {{ form_widget(add_role_scopes_form.composed_role_scope.role, { 'attr': { 'class': 'w-50' }}) }}
+ {{ form_widget(add_role_scopes_form.composed_role_scope.scope) }}
+
+ {{ 'Help to pick role and scope'|trans }}
{{ form_end(add_role_scopes_form) }}
{{ 'Permissions group list'|trans }}-
{{ 'Grant those permissions'|trans }} :+{{ 'Grant those permissions'|trans }} :{% for title, role_scopes in role_scopes_sorted %}{{ title|default('Unclassified')|trans }}-
|
|---|