diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon
index 11ef8f679a..b552f30326 100644
--- a/phpstan-baseline.neon
+++ b/phpstan-baseline.neon
@@ -9280,61 +9280,6 @@ parameters:
count: 1
path: src/lib/UI/Config/Provider/Autosave.php
- -
- message: "#^Method Ibexa\\\\AdminUi\\\\UI\\\\Config\\\\Provider\\\\ContentTypeMappings\\:\\:__construct\\(\\) has parameter \\$defaultMappings with no value type specified in iterable type array\\.$#"
- count: 1
- path: src/lib/UI/Config/Provider/ContentTypeMappings.php
-
- -
- message: "#^Method Ibexa\\\\AdminUi\\\\UI\\\\Config\\\\Provider\\\\ContentTypeMappings\\:\\:__construct\\(\\) has parameter \\$fallbackContentType with no value type specified in iterable type array\\.$#"
- count: 1
- path: src/lib/UI/Config/Provider/ContentTypeMappings.php
-
- -
- message: "#^Method Ibexa\\\\AdminUi\\\\UI\\\\Config\\\\Provider\\\\ContentTypeMappings\\:\\:__construct\\(\\) has parameter \\$locationMappings with no value type specified in iterable type array\\.$#"
- count: 1
- path: src/lib/UI/Config/Provider/ContentTypeMappings.php
-
- -
- message: "#^Method Ibexa\\\\AdminUi\\\\UI\\\\Config\\\\Provider\\\\ContentTypeMappings\\:\\:buildFallbackContentTypeStructure\\(\\) has parameter \\$fallbackContentType with no value type specified in iterable type array\\.$#"
- count: 1
- path: src/lib/UI/Config/Provider/ContentTypeMappings.php
-
- -
- message: "#^Method Ibexa\\\\AdminUi\\\\UI\\\\Config\\\\Provider\\\\ContentTypeMappings\\:\\:buildFallbackContentTypeStructure\\(\\) return type has no value type specified in iterable type array\\.$#"
- count: 1
- path: src/lib/UI/Config/Provider/ContentTypeMappings.php
-
- -
- message: "#^Method Ibexa\\\\AdminUi\\\\UI\\\\Config\\\\Provider\\\\ContentTypeMappings\\:\\:buildMappingGroupStructure\\(\\) has parameter \\$mappingGroup with no value type specified in iterable type array\\.$#"
- count: 1
- path: src/lib/UI/Config/Provider/ContentTypeMappings.php
-
- -
- message: "#^Method Ibexa\\\\AdminUi\\\\UI\\\\Config\\\\Provider\\\\ContentTypeMappings\\:\\:buildMappingGroupStructure\\(\\) return type has no value type specified in iterable type array\\.$#"
- count: 1
- path: src/lib/UI/Config/Provider/ContentTypeMappings.php
-
- -
- message: "#^Method Ibexa\\\\AdminUi\\\\UI\\\\Config\\\\Provider\\\\ContentTypeMappings\\:\\:getConfig\\(\\) return type has no value type specified in iterable type array\\.$#"
- count: 1
- path: src/lib/UI/Config/Provider/ContentTypeMappings.php
-
- -
- message: "#^Property Ibexa\\\\AdminUi\\\\UI\\\\Config\\\\Provider\\\\ContentTypeMappings\\:\\:\\$defaultMappings type has no value type specified in iterable type array\\.$#"
- count: 1
- path: src/lib/UI/Config/Provider/ContentTypeMappings.php
-
- -
- message: "#^Property Ibexa\\\\AdminUi\\\\UI\\\\Config\\\\Provider\\\\ContentTypeMappings\\:\\:\\$fallbackContentType type has no value type specified in iterable type array\\.$#"
- count: 1
- path: src/lib/UI/Config/Provider/ContentTypeMappings.php
-
- -
- message: "#^Property Ibexa\\\\AdminUi\\\\UI\\\\Config\\\\Provider\\\\ContentTypeMappings\\:\\:\\$locationMappings type has no value type specified in iterable type array\\.$#"
- count: 1
- path: src/lib/UI/Config/Provider/ContentTypeMappings.php
-
-
message: "#^Offset 'dirname' does not exist on array\\{dirname\\?\\: string, basename\\: string, extension\\?\\: string, filename\\: string\\}\\.$#"
count: 1
diff --git a/src/bundle/Resources/encore/ibexa.js.config.js b/src/bundle/Resources/encore/ibexa.js.config.js
index 2cacdf6c22..0e715c8ce7 100644
--- a/src/bundle/Resources/encore/ibexa.js.config.js
+++ b/src/bundle/Resources/encore/ibexa.js.config.js
@@ -228,9 +228,7 @@ module.exports = (Encore) => {
'../../ui-dev/src/modules/universal-discovery/components/tree-item-toggle-selection/tree.item.toggle.selection.js',
),
])
- .addEntry('ibexa-admin-ui-mfu-js', [
- path.resolve(__dirname, '../../ui-dev/src/modules/multi-file-upload/multi.file.upload.module.js'),
- ])
+ .addEntry('ibexa-admin-ui-mfu-js', [path.resolve(__dirname, '../../ui-dev/src/modules/multi-file-upload/config.loader.js')])
.addEntry('ibexa-admin-ui-subitems-js', [path.resolve(__dirname, '../../ui-dev/src/modules/sub-items/sub.items.module.js')])
.addEntry('ibexa-admin-ui-content-tree-js', [
path.resolve(__dirname, '../../ui-dev/src/modules/content-tree/content.tree.module.js'),
diff --git a/src/bundle/Resources/public/img/icons/about-info.svg b/src/bundle/Resources/public/img/icons/about-info.svg
index b84ce9bb9a..418403f2a3 100755
--- a/src/bundle/Resources/public/img/icons/about-info.svg
+++ b/src/bundle/Resources/public/img/icons/about-info.svg
@@ -1,4 +1,4 @@
diff --git a/src/bundle/Resources/public/img/icons/trash.svg b/src/bundle/Resources/public/img/icons/trash.svg
index d6f25ddfc5..7124b7f708 100755
--- a/src/bundle/Resources/public/img/icons/trash.svg
+++ b/src/bundle/Resources/public/img/icons/trash.svg
@@ -1,4 +1,4 @@
diff --git a/src/bundle/Resources/public/img/icons/upload.svg b/src/bundle/Resources/public/img/icons/upload.svg
index ade71ee965..e83ea27913 100755
--- a/src/bundle/Resources/public/img/icons/upload.svg
+++ b/src/bundle/Resources/public/img/icons/upload.svg
@@ -1,4 +1,4 @@
diff --git a/src/bundle/Resources/public/js/scripts/admin.location.view.js b/src/bundle/Resources/public/js/scripts/admin.location.view.js
index 3d54ea1f7e..b5ba200956 100644
--- a/src/bundle/Resources/public/js/scripts/admin.location.view.js
+++ b/src/bundle/Resources/public/js/scripts/admin.location.view.js
@@ -150,6 +150,7 @@
return contentTypeDataMap;
}, {});
+
const mfuAttrs = {
adminUiConfig: {
...ibexa.adminUiConfig,
@@ -160,6 +161,7 @@
contentTypeIdentifier: mfuContainer.dataset.parentContentTypeIdentifier,
contentTypeId: parseInt(mfuContainer.dataset.parentContentTypeId, 10),
locationPath: mfuContainer.dataset.parentLocationPath,
+ name: mfuContainer.dataset.parentName,
language: mfuContainer.dataset.parentContentLanguage,
},
currentLanguage: mfuContainer.dataset.currentLanguage,
diff --git a/src/bundle/Resources/public/js/scripts/helpers/context.helper.js b/src/bundle/Resources/public/js/scripts/helpers/context.helper.js
index 016b150042..1131fc685b 100644
--- a/src/bundle/Resources/public/js/scripts/helpers/context.helper.js
+++ b/src/bundle/Resources/public/js/scripts/helpers/context.helper.js
@@ -1,5 +1,6 @@
let { bootstrap, flatpickr, moment, Popper, Routing, Translator } = window;
let adminUiConfig = window.ibexa?.adminUiConfig;
+let rootNode = document.body;
const restInfo = {
accessToken: null,
instanceUrl: window.location.origin,
@@ -7,10 +8,10 @@ const restInfo = {
siteaccess: document.querySelector('meta[name="SiteAccess"]')?.content,
};
-export const setRestInfo = ({ instanceUrl, token, csrfToken, siteaccess }) => {
+export const setRestInfo = ({ instanceUrl, accessToken, token, siteaccess }) => {
restInfo.instanceUrl = instanceUrl ?? restInfo.instanceUrl;
+ restInfo.accessToken = accessToken ?? restInfo.accessToken;
restInfo.token = token ?? restInfo.token;
- restInfo.csrfToken = csrfToken ?? restInfo.csrfToken;
restInfo.siteaccess = siteaccess ?? restInfo.siteaccess;
};
export const setAdminUiConfig = (loadedAdminUiConfig) => (adminUiConfig = loadedAdminUiConfig);
@@ -44,6 +45,7 @@ export const setTranslator = (TranslatorInstance, forceSet = false) => {
Translator = TranslatorInstance;
}
};
+export const setRootNode = (rootNodeParam) => (rootNode = rootNodeParam);
export const getAdminUiConfig = () => adminUiConfig;
export const getBootstrap = () => bootstrap;
@@ -53,3 +55,4 @@ export const getPopper = () => Popper;
export const getRouting = () => Routing;
export const getTranslator = () => Translator;
export const getRestInfo = () => restInfo;
+export const getRootNode = () => rootNode;
diff --git a/src/bundle/Resources/public/scss/ui/modules/common/_tooltip.popup.scss b/src/bundle/Resources/public/scss/ui/modules/common/_tooltip.popup.scss
index c1763cf6d9..25ff50a027 100644
--- a/src/bundle/Resources/public/scss/ui/modules/common/_tooltip.popup.scss
+++ b/src/bundle/Resources/public/scss/ui/modules/common/_tooltip.popup.scss
@@ -9,6 +9,12 @@
margin: 0;
}
+ &__subtitle {
+ @include modal-subtitle();
+
+ color: $ibexa-color-dark;
+ }
+
&__close {
@include close-button();
}
diff --git a/src/bundle/Resources/public/scss/ui/modules/muti-file-upload/_drop.area.scss b/src/bundle/Resources/public/scss/ui/modules/muti-file-upload/_drop.area.scss
index c4a006bef8..60e704d569 100644
--- a/src/bundle/Resources/public/scss/ui/modules/muti-file-upload/_drop.area.scss
+++ b/src/bundle/Resources/public/scss/ui/modules/muti-file-upload/_drop.area.scss
@@ -5,21 +5,81 @@
flex-direction: column;
justify-content: center;
align-items: center;
+ padding: calculateRem(47px);
&__message {
+ color: $ibexa-color-dark;
+ margin-bottom: calculateRem(16px);
+ }
+
+ &__message--main {
+ cursor: auto;
+ font-weight: 600;
+ }
+
+ &__message--filesize {
+ margin: calculateRem(16px) 0 0 0;
color: $ibexa-color-dark-400;
- margin-bottom: calculateRem(12px);
+ font-size: $ibexa-text-font-size-medium;
+ }
+
+ &__max-files-size {
+ margin: 0;
+ padding: 0;
+ list-style: none;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ row-gap: calculateRem(8px);
+
+ &--expanded {
+ .c-drop-area {
+ &__max-file-size-item {
+ display: flex;
+ }
- &--main {
- cursor: auto;
- font-weight: bold;
- margin-top: calculateRem(44px);
+ &__max-file-size-toggle-btn {
+ &::after {
+ transform: rotate(-180deg);
+ }
+ }
+ }
}
+ }
+
+ &__max-file-size-item {
+ display: none;
+ gap: calculateRem(4px);
+ justify-content: center;
+ align-items: center;
+ font-size: $ibexa-text-font-size-small;
- &--filesize {
- color: $ibexa-color-dark-300;
+ &:first-child {
font-size: $ibexa-text-font-size-medium;
- margin: calculateRem(12px) 0 calculateRem(44px);
+ display: flex;
+ }
+ }
+
+ &__max-file-size-toggle-btn {
+ width: calculateRem(16px);
+ height: calculateRem(16px);
+ position: relative;
+ display: inline-block;
+ cursor: pointer;
+ border: none;
+
+ &::after {
+ content: '';
+ position: absolute;
+ width: calculateRem(6px);
+ height: calculateRem(3px);
+ top: calc(50% - #{calculateRem(3px)});
+ right: 0;
+ border-left: calculateRem(6px) solid transparent;
+ border-right: calculateRem(6px) solid transparent;
+ border-top: calculateRem(6px) solid $ibexa-color-dark-400;
+ transition: all $ibexa-admin-transition-duration $ibexa-admin-transition;
}
}
diff --git a/src/bundle/Resources/public/scss/ui/modules/muti-file-upload/_progress.bar.scss b/src/bundle/Resources/public/scss/ui/modules/muti-file-upload/_progress.bar.scss
index 88c2ff41ff..0a7dd9ff5a 100644
--- a/src/bundle/Resources/public/scss/ui/modules/muti-file-upload/_progress.bar.scss
+++ b/src/bundle/Resources/public/scss/ui/modules/muti-file-upload/_progress.bar.scss
@@ -9,13 +9,13 @@
border-radius: calculateRem(4px);
transition: width 0.2s linear;
height: calculateRem(8px);
- width: 10vw;
+ width: calculateRem(176px);
position: relative;
&::after {
content: '';
width: calc(100% - var(--progress));
- height: calculateRem(10px);
+ height: calculateRem(11px);
border-radius: calculateRem(4px);
position: absolute;
right: 0;
@@ -29,7 +29,7 @@
}
&__label {
- font-size: $ibexa-text-font-size-small;
+ font-size: $ibexa-text-font-size-medium;
color: $ibexa-color-dark-400;
}
}
diff --git a/src/bundle/Resources/public/scss/ui/modules/muti-file-upload/_upload.item.scss b/src/bundle/Resources/public/scss/ui/modules/muti-file-upload/_upload.item.scss
index bddf4aeed7..19696088af 100644
--- a/src/bundle/Resources/public/scss/ui/modules/muti-file-upload/_upload.item.scss
+++ b/src/bundle/Resources/public/scss/ui/modules/muti-file-upload/_upload.item.scss
@@ -1,20 +1,39 @@
.c-upload-list-item {
display: flex;
+ flex-wrap: wrap;
background: $ibexa-color-white;
- padding: calculateRem(8px) 0;
- min-height: calculateRem(60px);
+ padding: 0;
+ margin: calculateRem(12px) 0;
+ height: calculateRem(48px);
&--errored {
- background: $ibexa-color-danger-100;
- color: $ibexa-color-danger;
+ background: $ibexa-color-danger-200;
+ color: $ibexa-color-danger-600;
border-radius: $ibexa-border-radius;
.ibexa-icon {
- fill: $ibexa-color-danger;
+ fill: $ibexa-color-danger-600;
}
.c-upload-list-item__size {
- color: $ibexa-color-danger;
+ color: $ibexa-color-danger-600;
+ }
+ }
+
+ &--expanded-multiple-errors {
+ padding-bottom: 0;
+ height: auto;
+
+ .c-upload-list-item {
+ &__multiple-errors-list {
+ display: block;
+ padding: calculateRem(4px) 0 calculateRem(8px) calculateRem(26px);
+ margin-top: calculateRem(4px);
+ }
+
+ &__multiple-errors-toggle-btn {
+ transform: rotate(180deg);
+ }
}
}
@@ -26,26 +45,25 @@
}
&__meta {
- padding: 0 calculateRem(16px);
- line-height: 1.4;
+ padding: 0 calculateRem(8px);
max-width: 25vw;
+ height: calculateRem(48px);
display: flex;
justify-content: center;
align-items: center;
}
&__name {
- font-size: calculateRem(16px);
margin-right: calculateRem(8px);
- max-width: 15vw;
+ max-width: calculateRem(172px);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
&__size {
- color: $ibexa-color-dark-300;
- font-size: $ibexa-text-font-size-medium;
+ color: $ibexa-color-dark-400;
+ font-size: $ibexa-text-font-size-small;
}
&__info {
@@ -56,8 +74,8 @@
}
&__message {
- font-style: italic;
- font-size: $ibexa-text-font-size-small;
+ font-size: $ibexa-text-font-size-medium;
+ line-height: $ibexa-text-font-size-medium;
.ibexa-icon {
margin-right: calculateRem(4px);
@@ -70,6 +88,14 @@
fill: $ibexa-color-success;
}
}
+
+ &--error {
+ display: flex;
+ align-items: center;
+ font-size: $ibexa-text-font-size-small;
+ line-height: $ibexa-text-font-size-small;
+ padding-right: calculateRem(32px);
+ }
}
&__actions {
@@ -93,4 +119,27 @@
margin-right: 0;
}
}
+
+ &__multiple-errors-toggle-btn {
+ border: none;
+ outline: none;
+ margin: 0 0 0 calculateRem(8px);
+ padding: 0;
+ transition: all $ibexa-admin-transition-duration $ibexa-admin-transition;
+ }
+
+ &__multiple-errors-list {
+ display: none;
+ flex-basis: 100%;
+ background: $ibexa-color-danger-100;
+ padding: 0;
+ margin: 0;
+ list-style: none;
+ border-radius: 0 0 $ibexa-border-radius $ibexa-border-radius;
+ }
+
+ &__multiple-errors-item {
+ margin: calculateRem(4px) 0;
+ font-size: $ibexa-text-font-size-medium;
+ }
}
diff --git a/src/bundle/Resources/public/scss/ui/modules/muti-file-upload/_upload.list.scss b/src/bundle/Resources/public/scss/ui/modules/muti-file-upload/_upload.list.scss
index 5d3a1027fb..8d1813a068 100644
--- a/src/bundle/Resources/public/scss/ui/modules/muti-file-upload/_upload.list.scss
+++ b/src/bundle/Resources/public/scss/ui/modules/muti-file-upload/_upload.list.scss
@@ -1,14 +1,5 @@
.c-upload-list {
- &__items {
- margin-top: calculateRem(32px);
- padding: calculateRem(16px) 0;
-
- &:not(:empty) {
- border-top: calculateRem(1px) solid $ibexa-color-light-500;
- }
-
- &:last-child {
- padding-bottom: 0;
- }
- }
+ height: 100%;
+ overflow: auto;
+ margin-top: calculateRem(16px);
}
diff --git a/src/bundle/Resources/public/scss/ui/modules/muti-file-upload/_upload.popup.scss b/src/bundle/Resources/public/scss/ui/modules/muti-file-upload/_upload.popup.scss
index b54978b669..e4cfc9cd25 100644
--- a/src/bundle/Resources/public/scss/ui/modules/muti-file-upload/_upload.popup.scss
+++ b/src/bundle/Resources/public/scss/ui/modules/muti-file-upload/_upload.popup.scss
@@ -8,32 +8,54 @@
width: 100vw;
color: $ibexa-color-dark;
+ &__label {
+ margin-bottom: calculateRem(8px);
+ color: $ibexa-color-dark-400;
+ font-size: $ibexa-text-font-size-small;
+ line-height: calculateRem(18px);
+ }
+
.c-tooltip-popup {
width: 100%;
- max-width: calculateRem(774px);
+ max-height: 100vh;
+ max-width: calculateRem(800px);
position: absolute;
z-index: 2;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
- padding: 0 calculateRem(24px);
+ overflow: hidden;
&__header {
@include modal-header();
- padding: $modal-header-padding-y $modal-header-padding-x;
- border-bottom: $modal-header-border-width solid $modal-header-border-color;
+ height: calculateRem(92px);
+ padding: calculateRem(32px) calculateRem(32px) 0;
+ margin-bottom: calculateRem(36px);
+ }
+
+ &__title {
+ line-height: calculateRem(42px);
+ }
+
+ &__close {
+ top: 0;
+ }
+
+ &__subtitle {
+ margin-top: calculateRem(8px);
}
&__content {
@include modal-body();
- padding: $modal-inner-padding;
+ padding: 0 calculateRem(32px);
+ max-height: calc(100vh - #{calculateRem(208px)});
+ overflow: auto;
}
- }
- .c-upload-list {
- overflow-y: auto;
- max-height: 30vw;
+ &__footer {
+ padding: calculateRem(16px) calculateRem(32px) calculateRem(32px) calculateRem(32px);
+ }
}
}
diff --git a/src/bundle/Resources/translations/ibexa_content.en.xliff b/src/bundle/Resources/translations/ibexa_content.en.xliff
index 602535d1a6..d243909be4 100644
--- a/src/bundle/Resources/translations/ibexa_content.en.xliff
+++ b/src/bundle/Resources/translations/ibexa_content.en.xliff
@@ -106,6 +106,11 @@
Close
key: tooltip.close_label
+
+ Confirm
+ Confirm
+ key: tooltip.confirm_label
+
Are you sure you want to send this Content item to Trash?
Are you sure you want to send this Content item to Trash?
diff --git a/src/bundle/Resources/translations/ibexa_multi_file_upload.en.xliff b/src/bundle/Resources/translations/ibexa_multi_file_upload.en.xliff
index 1f1a192945..5ef19468eb 100644
--- a/src/bundle/Resources/translations/ibexa_multi_file_upload.en.xliff
+++ b/src/bundle/Resources/translations/ibexa_multi_file_upload.en.xliff
@@ -21,10 +21,10 @@
Cannot get content type by identifier
key: cannot_get_content_type_identifier.message
-
- Cannot upload file
- Cannot upload file
- key: cannot_upload.message
+
+ An error occurred while deleting a file
+ An error occurred while deleting a file
+ key: delete.error.message
Delete
@@ -61,16 +61,36 @@
Edit
key: edit.label
+
+ An error occurred while publishing a file
+ An error occurred while publishing a file
+ key: general.error.message
+
- Max file size:
- Max file size:
+ %contentTypeName% max file size: %maxFileSize%
+ %contentTypeName% max file size: %maxFileSize%
key: max_file_size.message
+
+ Max. file size
+ Max. file size
+ key: max_file_size.message.general
+
Upload
Upload
key: multi_file_upload_open_btn.label
+
+ Under %name%
+ Under %name%
+ key: multi_file_upload_popup.subtitle
+
+
+ Failed to upload
+ Failed to upload
+ key: multierror.label
+
Uploading...
Uploading...
@@ -86,10 +106,25 @@
Upload file
key: upload_btn.label
-
+
+ Confirm and close
+ Confirm and close
+ key: upload_popup.close_label
+
+
+ Cancel pending upload
+ Cancel pending upload
+ key: upload_popup.confirm_label
+
+
+ Upload
+ Upload
+ key: upload_popup.label
+
+
Multi-file upload
Multi-file upload
- key: upload_popup.close
+ key: upload_popup.title