diff --git a/config/packages/liip_imagine.yaml b/config/packages/liip_imagine.yaml index 7338b189..a2205a24 100644 --- a/config/packages/liip_imagine.yaml +++ b/config/packages/liip_imagine.yaml @@ -5,7 +5,7 @@ liip_imagine: filter_sets: thumbnail_sm: - quality: 70 + quality: 90 filters: thumbnail: size: [150, 150] @@ -13,14 +13,14 @@ liip_imagine: thumbnail_md: - quality: 75 + quality: 90 filters: thumbnail: size: [250, 250] mode: inset thumbnail_xs: - quality: 70 + quality: 90 filters: thumbnail: size: [50, 50] diff --git a/src/Form/UserAdminForm.php b/src/Form/UserAdminForm.php index fa6f98c7..a84fc2b4 100644 --- a/src/Form/UserAdminForm.php +++ b/src/Form/UserAdminForm.php @@ -28,6 +28,7 @@ use App\Entity\UserSystem\Group; use App\Entity\UserSystem\User; use App\Form\Permissions\PermissionsType; use App\Form\Type\CurrencyEntityType; +use App\Form\Type\MasterPictureAttachmentType; use App\Form\Type\StructuralEntityType; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\Extension\Core\Type\CheckboxType; @@ -227,7 +228,14 @@ class UserAdminForm extends AbstractType 'data_class' => $options['attachment_class'], ], 'by_reference' => false, - 'disabled' => !$this->security->isGranted($is_new ? 'create' : 'edit', $entity), + 'disabled' => !$this->security->isGranted($is_new ? 'create' : 'edit_infos', $entity), + ]); + + $builder->add('master_picture_attachment', MasterPictureAttachmentType::class, [ + 'required' => false, + 'disabled' => !$this->security->isGranted($is_new ? 'create' : 'edit_infos', $entity), + 'label' => 'part.edit.master_attachment', + 'entity' => $entity, ]); $builder->add('log_comment', TextType::class, [ diff --git a/src/Services/UserSystem/UserAvatarHelper.php b/src/Services/UserSystem/UserAvatarHelper.php index 4c104a01..64fd10c2 100644 --- a/src/Services/UserSystem/UserAvatarHelper.php +++ b/src/Services/UserSystem/UserAvatarHelper.php @@ -50,7 +50,7 @@ class UserAvatarHelper { //Check if the user has a master attachment defined (meaning he has explicitly defined a profile picture) if ($user->getMasterPictureAttachment() !== null) { - return $this->attachmentURLGenerator->getThumbnailURL($user->getMasterPictureAttachment()); + return $this->attachmentURLGenerator->getThumbnailURL($user->getMasterPictureAttachment(), 'thumbnail_md'); } //If not check if gravatar is enabled (then use gravatar URL) diff --git a/templates/AdminPages/UserAdmin.html.twig b/templates/AdminPages/UserAdmin.html.twig index 30888741..98ee4cde 100644 --- a/templates/AdminPages/UserAdmin.html.twig +++ b/templates/AdminPages/UserAdmin.html.twig @@ -16,8 +16,6 @@ {% endblock %} -{% block master_picture_block %}{% endblock %} - {% block additional_controls %} {{ form_row(form.group) }} {{ form_row(form.first_name) }} @@ -87,4 +85,8 @@ {% block new_title %} {% trans %}user.new{% endtrans %} +{% endblock %} + +{% block quick_links %} + {% endblock %} \ No newline at end of file