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
[#46439] Bahn Plugin für OpenProject 12.5.x anpassen
Pavel Balashov6be6ff151b89
diff --git a/frontend/src/app/core/state/attachments/attachment.model.ts b/frontend/src/app/core/state/attachments/attachment.model.tsindex 4a2168523e1..9b1d8240c36 100644--- a/frontend/src/app/core/state/attachments/attachment.model.ts+++ b/frontend/src/app/core/state/attachments/attachment.model.ts@@ -40,6 +40,7 @@ export interface IAttachmentHalResourceLinks extends IHalResourceLinks {author:IHalResourceLink;downloadLocation:IHalResourceLink;staticDownloadLocation:IHalResourceLink;+ originOpen:IHalResourceLink;}export interface IAttachment {diff --git a/frontend/src/app/shared/components/attachments/attachment-list/attachment-list-item.component.html b/frontend/src/app/shared/components/attachments/attachment-list/attachment-list-item.component.htmlindex 8dca08e1148..860f16cf3a7 100644--- a/frontend/src/app/shared/components/attachments/attachment-list/attachment-list-item.component.html+++ b/frontend/src/app/shared/components/attachments/attachment-list/attachment-list-item.component.html@@ -1,7 +1,7 @@<div class="spot-list--item-floating-wrapper op-file-list--item-floating-wrapper"><aclass="spot-list--item-action spot-list--item-action_link op-file-list--item-action"- [href]="attachment._links.staticDownloadLocation.href"+ [href]="linkHref"target="_blank"(dragstart)="setDragData($event)">@@ -28,10 +28,18 @@></div></a><div- *ngIf="!!this.attachment._links.delete"class="spot-list--item-floating-actions op-file-list--item-floating-actions hidden-for-mobile">+ <a+ *ngIf="!!this.attachment._links.originOpen"+ class="spot-link"+ [href]="this.attachment._links.staticDownloadLocation.href"+ target="_blank"+ >+ <span class="spot-icon spot-icon_download-arrow"></span>+ </a><button+ *ngIf="!!this.attachment._links.delete"type="button"class="spot-link"[title]="deleteIconTitle"diff --git a/frontend/src/app/shared/components/attachments/attachment-list/attachment-list-item.component.ts b/frontend/src/app/shared/components/attachments/attachment-list/attachment-list-item.component.tsindex 87fc992c956..601a1979066 100644--- a/frontend/src/app/shared/components/attachments/attachment-list/attachment-list-item.component.ts+++ b/frontend/src/app/shared/components/attachments/attachment-list/attachment-list-item.component.ts@@ -167,6 +167,13 @@ export class OpAttachmentListItemComponent extends UntilDestroyedMixin implementreturn el;}+ public get linkHref():string {+ if (this.attachment._links.originOpen !== undefined) {+ return this.attachment._links.originOpen.href;+ }+ return this.attachment._links.staticDownloadLocation.href;+ }+private get downloadPath():string {return this.pathHelper.attachmentDownloadPath(String(this.attachment.id), this.attachment.fileName);}