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
[#42158] added styling for headers, action button
Eric Schubert4f57cf0d9ad3
diff --git a/config/locales/js-en.yml b/config/locales/js-en.ymlindex cf2196ddb4d..59135293b7f 100644--- a/config/locales/js-en.yml+++ b/config/locales/js-en.yml@@ -421,6 +421,7 @@ en:label_learn_more_link: "Learn more"label_less_or_equal: "<="label_less_than_ago: "less than days ago"+ label_link_files_in_storage: "Link files in %{storageType}"label_loading: "Loading..."label_login_to_storage: "Login to %{storageType}"label_mail_notification: "Email notifications"@@ -438,8 +439,7 @@ en:label_no_start_date: "no start date"label_no_storage_connection: "No %{storageType} connection"label_no_value: "No value"- label_no_file_links_header: "Link files in %{storageType}"- label_no_file_links_content: "In order to link files to this work package please do it via %{storageType}."+ label_no_file_links: "In order to link files to this work package please do it via %{storageType}."label_none: "none"label_not_contains: "doesn't contain"label_not_equals: "is not"diff --git a/frontend/src/app/features/work-packages/components/wp-single-view-tabs/files-tab/op-files-tab.html b/frontend/src/app/features/work-packages/components/wp-single-view-tabs/files-tab/op-files-tab.htmlindex af1d1b7cd53..eb459354329 100644--- a/frontend/src/app/features/work-packages/components/wp-single-view-tabs/files-tab/op-files-tab.html+++ b/frontend/src/app/features/work-packages/components/wp-single-view-tabs/files-tab/op-files-tab.html@@ -1,7 +1,13 @@<div class="op-tab-content--container">- <section data-qa-selector="op-tab-content--tab-section">- <div *ngIf="canViewFileLinks$ | async" class="op-tab-content--header">- <h3 class="op-tab-content--header-text" [textContent]="text.attachments.label"></h3>+ <section+ class="op-tab-content--tab-section"+ data-qa-selector="op-tab-content--tab-section"+ >+ <div+ *ngIf="canViewFileLinks$ | async"+ class="op-tab-content--header"+ >+ <span class="op-tab-content--header-text" [textContent]="text.attachments.label"></span></div><op-attachment-list [resource]="workPackage"></op-attachment-list>@@ -9,10 +15,14 @@<op-attachments-upload [resource]="workPackage"></op-attachments-upload></section>- <section *ngFor="let storage of storages$ | async" data-qa-selector="op-tab-content--tab-section">+ <section+ *ngFor="let storage of storages$ | async"+ data-qa-selector="op-tab-content--tab-section"+ class="op-tab-content--tab-section"+ ><div class=op-tab-content--header>- <op-icon icon-classes="icon3 icon-nextcloud-circle op-files-tab--color-blue-deep"></op-icon>- <h3 class="op-tab-content--header-text" [textContent]="storage.name"></h3>+ <span class="spot-icon spot-icon_nextcloud-circle op-files-tab--color-blue-deep"></span>+ <span class="op-tab-content--header-text" [textContent]="storage.name"></span></div><op-file-link-listdiff --git a/frontend/src/app/shared/components/file-links/file-link-list/file-link-list-item.html b/frontend/src/app/shared/components/file-links/file-link-list/file-link-list-item.htmlindex 54780245742..6ee6fa46db9 100644--- a/frontend/src/app/shared/components/file-links/file-link-list/file-link-list-item.html+++ b/frontend/src/app/shared/components/file-links/file-link-list/file-link-list-item.html@@ -2,7 +2,7 @@class="op-files-tab--file-list-item--content file-name"><span- class="spot-icon spot-icon_{{fileLinkIcon.icon}} op-files-tab--color-{{fileLinkIcon.color}}"+ class="spot-icon with-text spot-icon_{{fileLinkIcon.icon}} op-files-tab--color-{{fileLinkIcon.color}}"></span><adiff --git a/frontend/src/app/shared/components/file-links/file-link-list/file-link-list.component.ts b/frontend/src/app/shared/components/file-links/file-link-list/file-link-list.component.tsindex 9577f82251f..a60c018291f 100644--- a/frontend/src/app/shared/components/file-links/file-link-list/file-link-list.component.ts+++ b/frontend/src/app/shared/components/file-links/file-link-list/file-link-list.component.ts@@ -69,7 +69,7 @@ export class FileLinkListComponent extends UntilDestroyedMixin implements OnInit'urn:openproject-org:api:v3:storages:Nextcloud': 'Nextcloud',};- private text:{+ text:{infoBox:{emptyStorageHeader:string,emptyStorageContent:string,@@ -79,6 +79,9 @@ export class FileLinkListComponent extends UntilDestroyedMixin implements OnInitauthenticationFailureHeader:string,authenticationFailureContent:string,loginButton:string,+ },+ actions:{+ linkFile:string,}};@@ -119,6 +122,10 @@ export class FileLinkListComponent extends UntilDestroyedMixin implements OnInitthis.fileLinkResourceService.remove(this.collectionKey, fileLink);}+ public openStorageLocation():void {+ window.open(this.storage._links.origin.href);+ }+private get collectionKey():string {return isNewResource(this.resource) ? 'new' : this.fileLinkSelfLink;}@@ -181,8 +188,8 @@ export class FileLinkListComponent extends UntilDestroyedMixin implements OnInitconst storageType = this.storageTypeMap[this.storage._links.type.href];this.text = {infoBox: {- emptyStorageHeader: this.i18n.t('js.label_no_file_links_header', { storageType }),- emptyStorageContent: this.i18n.t('js.label_no_file_links_content', { storageType }),+ emptyStorageHeader: this.i18n.t('js.label_link_files_in_storage', { storageType }),+ emptyStorageContent: this.i18n.t('js.label_no_file_links', { storageType }),emptyStorageButton: this.i18n.t('js.label_open_storage', { storageType }),connectionErrorHeader: this.i18n.t('js.label_no_storage_connection', { storageType }),connectionErrorContent: this.i18n.t('js.label_storage_connection_error', { storageType }),@@ -190,6 +197,9 @@ export class FileLinkListComponent extends UntilDestroyedMixin implements OnInitauthenticationFailureContent: this.i18n.t('js.label_storage_not_connected', { storageType }),loginButton: this.i18n.t('js.label_storage_login', { storageType }),},+ actions: {+ linkFile: this.i18n.t('js.label_link_files_in_storage', { storageType }),+ },};}}diff --git a/frontend/src/app/shared/components/file-links/file-link-list/file-link-list.html b/frontend/src/app/shared/components/file-links/file-link-list/file-link-list.htmlindex 8b2f8993439..c661fbf1cbb 100644--- a/frontend/src/app/shared/components/file-links/file-link-list/file-link-list.html+++ b/frontend/src/app/shared/components/file-links/file-link-list/file-link-list.html@@ -1,10 +1,14 @@-<div class="work-package--attachments--files" *ngIf="resource" data-qa-selector="op-files-tab--file-link-list">+<div+ *ngIf="resource"+ data-qa-selector="op-files-tab--file-link-list"+><op-storage-information*ngIf="showInformationBox"[infoIcon]="informationBoxIcon"[infoTextHeader]="informationBoxHeader"[infoTextContent]="informationBoxContent"[buttonText]="informationBoxButton"+ (buttonClickEventEmitter)="openStorageLocation()"></op-storage-information><ul@@ -26,4 +30,13 @@></op-file-link-list-item></li></ul>++ <a+ *ngIf="!showInformationBox"+ class="spot-link op-files-tab--file-list-action-button"+ (click)="openStorageLocation()"+ >+ <span class="spot-icon spot-icon_external-link"></span>+ <span [textContent]="text.actions.linkFile"></span>+ </a></div>diff --git a/frontend/src/app/shared/components/file-links/file-link-list/storage-information.html b/frontend/src/app/shared/components/file-links/file-link-list/storage-information.htmlindex b5be28c170b..14cafa80aba 100644--- a/frontend/src/app/shared/components/file-links/file-link-list/storage-information.html+++ b/frontend/src/app/shared/components/file-links/file-link-list/storage-information.html@@ -1,7 +1,7 @@<divclass="op-files-tab--storage-info-box">- <span class="spot-icon spot-icon_{{infoIcon}}"></span>+ <span class="spot-icon big spot-icon_{{infoIcon}}"></span><divclass="text-box"@@ -25,7 +25,7 @@class="action-button"(click)="buttonClickEventEmitter.emit()">- <span class="spot-icon spot-icon_external-link"></span>+ <span class="spot-icon with-text spot-icon_external-link"></span><span [textContent]="buttonText"></span></button></div>diff --git a/frontend/src/global_styles/content/work_packages/tabs/_files.sass b/frontend/src/global_styles/content/work_packages/tabs/_files.sassindex a93f0ef123e..946b35d9f27 100644--- a/frontend/src/global_styles/content/work_packages/tabs/_files.sass+++ b/frontend/src/global_styles/content/work_packages/tabs/_files.sass@@ -68,12 +68,6 @@color: $primary-colorwidth: $spot-spacing-1_25height: $spot-spacing-1_25- margin: 0-- .spot-icon- width: $spot-spacing-1_5- height: $spot-spacing-1_5- margin-right: 8px&--file-info-timestampmargin-right: 8px@@ -90,7 +84,7 @@display: gridgrid-template: "icon text" "button button" / auto 1fr- .spot-icon+ .spot-icon.biggrid-area: iconwidth: 3.375remheight: 3.375rem@@ -121,12 +115,13 @@font-size: 14pxline-height: 20px- .spot-icon- width: $spot-spacing-1_5- height: $spot-spacing-1_5- margin-right: 8px- font-size: 14px- color: #333333+ &--file-list-action-button+ &.spot-link+ margin-top: 12px+ font-size: 14px++ .spot-icon:first-child+ margin: 0&--color&-reddiff --git a/frontend/src/global_styles/content/work_packages/tabs/_tab_content.sass b/frontend/src/global_styles/content/work_packages/tabs/_tab_content.sassindex 6958647387d..8e112a1794d 100644--- a/frontend/src/global_styles/content/work_packages/tabs/_tab_content.sass+++ b/frontend/src/global_styles/content/work_packages/tabs/_tab_content.sass@@ -30,15 +30,28 @@&--containermargin-right: 16px+ .spot-icon+ width: $spot-spacing-1_5+ height: $spot-spacing-1_5++ &.with-text+ margin-right: 8px++ &--tab-section+ margin-bottom: 32px+&--headerborder-bottom: 1px solid #ddd+ padding-bottom: 12pxdisplay: flexalign-items: center&-text- font-size: 16px- line-height: 1.1875em+ line-height: $spot-spacing-1_5+ font-weight: 700text-transform: uppercase- margin: 16px 0- padding: 0- border-bottom: none++ .spot-icon+ width: $spot-spacing-1_5+ height: $spot-spacing-1_5+ margin-right: 8px