]> git.ipfire.org Git - thirdparty/paperless-ngx.git/commitdiff
Fix display of private items in small cards
authorshamoon <4887959+shamoon@users.noreply.github.com>
Sat, 3 Jun 2023 23:16:05 +0000 (16:16 -0700)
committershamoon <4887959+shamoon@users.noreply.github.com>
Sat, 3 Jun 2023 23:16:05 +0000 (16:16 -0700)
src-ui/messages.xlf
src-ui/src/app/components/document-list/document-card-small/document-card-small.component.html
src-ui/src/app/components/document-list/document-card-small/document-card-small.component.ts

index 9d05ee9ab8c7c622514a0252be002b1719323ab1..b52c8e70242a38375da4fbac5b3740a22a233f05 100644 (file)
           <context context-type="sourcefile">src/app/components/common/tag/tag.component.html</context>
           <context context-type="linenumber">8</context>
         </context-group>
+        <context-group purpose="location">
+          <context context-type="sourcefile">src/app/components/document-list/document-card-small/document-card-small.component.ts</context>
+          <context context-type="linenumber">80</context>
+        </context-group>
       </trans-unit>
       <trans-unit id="6560126119609945418" datatype="html">
         <source>Add tag</source>
index 3f23d99f9c18484a84f688bbf2e2a5f2e8d90d6d..a4024d70dc015acba2bcb86c2646a1fa5e2ee507 100644 (file)
@@ -29,7 +29,7 @@
     <div class="card-body bg-light p-2">
       <p class="card-text">
         <ng-container *ngIf="document.correspondent">
-          <a title="Toggle correspondent filter" i18n-title (click)="clickCorrespondent.emit(document.correspondent);$event.stopPropagation()" class="fw-bold btn-link">{{(document.correspondent$ | async)?.name}}</a>:
+          <a title="Toggle correspondent filter" i18n-title (click)="clickCorrespondent.emit(document.correspondent);$event.stopPropagation()" class="fw-bold btn-link">{{(document.correspondent$ | async)?.name ?? privateName}}</a>:
         </ng-container>
         {{document.title | documentTitle}}
       </p>
           <svg class="metadata-icon me-2 text-muted" fill="currentColor">
             <use xlink:href="assets/bootstrap-icons.svg#file-earmark"/>
           </svg>
-          <small>{{(document.document_type$ | async)?.name}}</small>
+          <small>{{(document.document_type$ | async)?.name ?? privateName}}</small>
         </button>
         <button *ngIf="document.storage_path" type="button" class="list-group-item list-group-item-action bg-transparent ps-0 p-1 border-0" title="Toggle storage path filter" i18n-title
          (click)="clickStoragePath.emit(document.storage_path);$event.stopPropagation()">
           <svg class="metadata-icon me-2 text-muted" fill="currentColor">
             <use xlink:href="assets/bootstrap-icons.svg#folder"/>
           </svg>
-          <small>{{(document.storage_path$ | async)?.name}}</small>
+          <small>{{(document.storage_path$ | async)?.name ?? privateName}}</small>
         </button>
         <div class="list-group-item bg-transparent p-0 border-0 d-flex flex-wrap-reverse justify-content-between">
           <ng-template #dateTooltip>
index 62f44851e5da20e1cf3c0b4d7705a26d266e8098..3dd64818df25dc7701afe1bfc0ccc5547748af60 100644 (file)
@@ -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(