From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Sat, 3 Jun 2023 23:16:05 +0000 (-0700) Subject: Fix display of private items in small cards X-Git-Tag: v1.16.0~1^2~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e329f6cdf1f07560bb74b525a3949b378ae8a687;p=thirdparty%2Fpaperless-ngx.git Fix display of private items in small cards --- diff --git a/src-ui/messages.xlf b/src-ui/messages.xlf index 9d05ee9ab8..b52c8e7024 100644 --- a/src-ui/messages.xlf +++ b/src-ui/messages.xlf @@ -2106,6 +2106,10 @@ src/app/components/common/tag/tag.component.html 8 + + src/app/components/document-list/document-card-small/document-card-small.component.ts + 80 + Add tag diff --git a/src-ui/src/app/components/document-list/document-card-small/document-card-small.component.html b/src-ui/src/app/components/document-list/document-card-small/document-card-small.component.html index 3f23d99f9c..a4024d70dc 100644 --- a/src-ui/src/app/components/document-list/document-card-small/document-card-small.component.html +++ b/src-ui/src/app/components/document-list/document-card-small/document-card-small.component.html @@ -29,7 +29,7 @@

- {{(document.correspondent$ | async)?.name}}: + {{(document.correspondent$ | async)?.name ?? privateName}}: {{document.title | documentTitle}}

@@ -41,14 +41,14 @@ - {{(document.document_type$ | async)?.name}} + {{(document.document_type$ | async)?.name ?? privateName}}
diff --git a/src-ui/src/app/components/document-list/document-card-small/document-card-small.component.ts b/src-ui/src/app/components/document-list/document-card-small/document-card-small.component.ts index 62f44851e5..3dd64818df 100644 --- a/src-ui/src/app/components/document-list/document-card-small/document-card-small.component.ts +++ b/src-ui/src/app/components/document-list/document-card-small/document-card-small.component.ts @@ -76,6 +76,10 @@ export class DocumentCardSmallComponent extends ComponentWithPermissions { return this.documentService.getPreviewUrl(this.document.id) } + get privateName() { + return $localize`Private` + } + getTagsLimited$() { const limit = this.document.notes.length > 0 ? 6 : 7 return this.document.tags$.pipe(