OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
[45520] Added tooltip for non-writeable directories
Andreas Pfohl9e7a808ac916
diff --git a/frontend/src/app/shared/components/storages/location-picker-modal/location-picker-modal.component.ts b/frontend/src/app/shared/components/storages/location-picker-modal/location-picker-modal.component.tsindex b8fc47b4ea2..3a444d7c40d 100644--- a/frontend/src/app/shared/components/storages/location-picker-modal/location-picker-modal.component.ts+++ b/frontend/src/app/shared/components/storages/location-picker-modal/location-picker-modal.component.ts@@ -61,6 +61,9 @@ export class LocationPickerModalComponent extends FilePickerBaseModalComponent {cancel: this.i18n.t('js.button_cancel'),selectAll: this.i18n.t('js.storages.file_links.select_all'),},+ tooltip: {+ directory_not_writeable: this.i18n.t('js.storages.files.directory_not_writeable'),+ },};public get canChooseLocation():boolean {@@ -101,8 +104,12 @@ export class LocationPickerModalComponent extends FilePickerBaseModalComponent {!isDirectory(file),index === 0,this.enterDirectoryCallback(file),- undefined,+ this.isDirectoryWithoutWritePermission(file) ? this.text.tooltip.directory_not_writeable : undefined,undefined,);}++ private isDirectoryWithoutWritePermission(file:IStorageFile):boolean {+ return isDirectory(file) && !file.permissions.some((permission) => permission === 'writeable');+ }}diff --git a/frontend/src/app/shared/components/storages/storage-file-list-item/storage-file-list-item.html b/frontend/src/app/shared/components/storages/storage-file-list-item/storage-file-list-item.htmlindex b99a99bafe5..d017f9858d4 100644--- a/frontend/src/app/shared/components/storages/storage-file-list-item/storage-file-list-item.html+++ b/frontend/src/app/shared/components/storages/storage-file-list-item/storage-file-list-item.html@@ -1,6 +1,6 @@<spot-tooltip[alignment]="getTooltipAlignment"- [disabled]="!content.disabled || !content.tooltip"+ [disabled]="!content.tooltip"><pslot="body"@@ -11,7 +11,10 @@slot="trigger"class="spot-list--item-action"data-qa-selector="op-files-picker-modal--list-item"- [ngClass]="{ 'spot-list--item-action_disabled': content.disabled }"+ [ngClass]="{+ 'spot-list--item-action_disabled': content.disabled,+ 'op-file-list--item-action_view-not-allowed': !content.isWriteable+ }"><spot-checkbox*ngIf="!!content.checkbox"diff --git a/modules/storages/config/locales/js-en.yml b/modules/storages/config/locales/js-en.ymlindex 416a97d9cf0..e2c02166e4b 100644--- a/modules/storages/config/locales/js-en.yml+++ b/modules/storages/config/locales/js-en.yml@@ -28,6 +28,9 @@ en:not_logged_in: >To add a link, see or upload files related to this work package, please login to %{storageType}.+ files:+ directory_not_writeable: "You do not have to permission to add files to this folder."+file_links:empty: >Currently there are no linked files to this work package. Start linking files with the action below or from