From 71fc7857534ae93876f4d3dcdba17d5096322461 Mon Sep 17 00:00:00 2001 From: jonaswinkler Date: Sat, 28 Nov 2020 14:47:55 +0100 Subject: [PATCH 1/9] tag component needs no click event --- src-ui/src/app/components/common/tag/tag.component.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/src-ui/src/app/components/common/tag/tag.component.ts b/src-ui/src/app/components/common/tag/tag.component.ts index ec59e86f3..f7d9b0c58 100644 --- a/src-ui/src/app/components/common/tag/tag.component.ts +++ b/src-ui/src/app/components/common/tag/tag.component.ts @@ -16,9 +16,6 @@ export class TagComponent implements OnInit { @Input() clickable: boolean = false - @Output() - click = new EventEmitter() - ngOnInit(): void { } From dddd6f5503a8b8051ed905b698d4fe930317542d Mon Sep 17 00:00:00 2001 From: jonaswinkler Date: Sat, 28 Nov 2020 14:50:14 +0100 Subject: [PATCH 2/9] added buttons to view documents in the browser. fixes #55 --- .../document-card-large.component.html | 7 +++++++ .../document-card-large.component.ts | 4 ++++ .../document-card-small.component.html | 10 ++++++++-- .../document-card-small.component.ts | 4 ++++ src-ui/src/app/components/search/search.component.scss | 2 +- 5 files changed, 24 insertions(+), 3 deletions(-) diff --git a/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.html b/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.html index 305cb37d2..2ef5875fe 100644 --- a/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.html +++ b/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.html @@ -24,6 +24,13 @@ Edit + + + + + + View + diff --git a/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.ts b/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.ts index 1c1e110c0..db634e83c 100644 --- a/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.ts +++ b/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.ts @@ -41,4 +41,8 @@ export class DocumentCardLargeComponent implements OnInit { getDownloadUrl() { return this.documentService.getDownloadUrl(this.document.id) } + + getPreviewUrl() { + return this.documentService.getPreviewUrl(this.document.id) + } } 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 022b92a4d..85dc94dd8 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 @@ -16,12 +16,18 @@
- + - + + + + + + + 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 1ca9847b9..5cc4c5bde 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 @@ -24,4 +24,8 @@ export class DocumentCardSmallComponent implements OnInit { getDownloadUrl() { return this.documentService.getDownloadUrl(this.document.id) } + + getPreviewUrl() { + return this.documentService.getPreviewUrl(this.document.id) + } } diff --git a/src-ui/src/app/components/search/search.component.scss b/src-ui/src/app/components/search/search.component.scss index 5be54746a..40ca79a61 100644 --- a/src-ui/src/app/components/search/search.component.scss +++ b/src-ui/src/app/components/search/search.component.scss @@ -11,5 +11,5 @@ } .result-content-searching { - opacity: 0.2; + opacity: 0.3; } \ No newline at end of file From 6992ac6aa9204c6e91e033abb6ed011e75ffbea0 Mon Sep 17 00:00:00 2001 From: jonaswinkler Date: Sat, 28 Nov 2020 19:28:46 +0100 Subject: [PATCH 3/9] fixes #61 --- src/documents/signals/handlers.py | 9 +-- .../tests/test_post_consume_handlers.py | 57 +++++++++++++++++++ 2 files changed, 62 insertions(+), 4 deletions(-) create mode 100644 src/documents/tests/test_post_consume_handlers.py diff --git a/src/documents/signals/handlers.py b/src/documents/signals/handlers.py index f83f88783..3afb0d1cf 100755 --- a/src/documents/signals/handlers.py +++ b/src/documents/signals/handlers.py @@ -9,6 +9,7 @@ from django.contrib.contenttypes.models import ContentType from django.db import models, DatabaseError from django.dispatch import receiver from django.utils import timezone +from rest_framework.reverse import reverse from .. import index, matching from ..file_handling import delete_empty_directories, generate_filename, \ @@ -157,10 +158,10 @@ def run_post_consume_script(sender, document, **kwargs): settings.POST_CONSUME_SCRIPT, str(document.pk), document.file_name, - document.source_path, - document.thumbnail_path, - None, - None, + os.path.normpath(document.source_path), + os.path.normpath(document.thumbnail_path), + reverse("document-download", kwargs={"pk": document.pk}), + reverse("document-thumb", kwargs={"pk": document.pk}), str(document.correspondent), str(",".join(document.tags.all().values_list("slug", flat=True))) )).wait() diff --git a/src/documents/tests/test_post_consume_handlers.py b/src/documents/tests/test_post_consume_handlers.py new file mode 100644 index 000000000..aa712832a --- /dev/null +++ b/src/documents/tests/test_post_consume_handlers.py @@ -0,0 +1,57 @@ +from unittest import mock + +from django.test import TestCase, override_settings + +from documents.models import Document, Tag, Correspondent +from documents.signals.handlers import run_post_consume_script + + +class PostConsumeTestCase(TestCase): + + @mock.patch("documents.signals.handlers.Popen") + @override_settings(POST_CONSUME_SCRIPT=None) + def test_no_post_consume_script(self, m): + doc = Document.objects.create(title="Test", mime_type="application/pdf") + tag1 = Tag.objects.create(name="a") + tag2 = Tag.objects.create(name="b") + doc.tags.add(tag1) + doc.tags.add(tag2) + + run_post_consume_script(None, doc) + + m.assert_not_called() + + @mock.patch("documents.signals.handlers.Popen") + @override_settings(POST_CONSUME_SCRIPT="script") + def test_post_consume_script_simple(self, m): + doc = Document.objects.create(title="Test", mime_type="application/pdf") + + run_post_consume_script(None, doc) + + m.assert_called_once() + + @mock.patch("documents.signals.handlers.Popen") + @override_settings(POST_CONSUME_SCRIPT="script") + def test_post_consume_script_simple(self, m): + c = Correspondent.objects.create(name="my_bank") + doc = Document.objects.create(title="Test", mime_type="application/pdf", correspondent=c) + tag1 = Tag.objects.create(name="a") + tag2 = Tag.objects.create(name="b") + doc.tags.add(tag1) + doc.tags.add(tag2) + + run_post_consume_script(None, doc) + + m.assert_called_once() + + args, kwargs = m.call_args + + command = args[0] + + self.assertEqual(command[0], "script") + self.assertEqual(command[1], str(doc.pk)) + self.assertEqual(command[5], f"/api/documents/{doc.pk}/download/") + self.assertEqual(command[6], f"/api/documents/{doc.pk}/thumb/") + self.assertEqual(command[7], "my_bank") + # TODO: tags are unordered by default. + self.assertEqual(command[8], "a,b") From bddffbce50472b05d865e1e639da5a2c63e2f580 Mon Sep 17 00:00:00 2001 From: jonaswinkler Date: Sat, 28 Nov 2020 21:27:04 +0100 Subject: [PATCH 4/9] Refactored the list view logic, editable saved views fixes #58 --- .../document-detail.component.ts | 8 +- .../document-list.component.html | 31 ++--- .../document-list/document-list.component.ts | 45 +++---- .../services/document-list-view.service.ts | 119 +++++++++++++----- .../app/services/saved-view-config.service.ts | 10 +- 5 files changed, 137 insertions(+), 76 deletions(-) diff --git a/src-ui/src/app/components/document-detail/document-detail.component.ts b/src-ui/src/app/components/document-detail/document-detail.component.ts index 00b840b48..aa4922bb0 100644 --- a/src-ui/src/app/components/document-detail/document-detail.component.ts +++ b/src-ui/src/app/components/document-detail/document-detail.component.ts @@ -1,4 +1,3 @@ -import { DatePipe, formatDate } from '@angular/common'; import { Component, OnInit } from '@angular/core'; import { FormControl, FormGroup } from '@angular/forms'; import { ActivatedRoute, Router } from '@angular/router'; @@ -6,17 +5,14 @@ import { NgbModal } from '@ng-bootstrap/ng-bootstrap'; import { PaperlessCorrespondent } from 'src/app/data/paperless-correspondent'; import { PaperlessDocument } from 'src/app/data/paperless-document'; import { PaperlessDocumentType } from 'src/app/data/paperless-document-type'; -import { TAG_COLOURS, PaperlessTag } from 'src/app/data/paperless-tag'; import { DocumentListViewService } from 'src/app/services/document-list-view.service'; import { OpenDocumentsService } from 'src/app/services/open-documents.service'; import { CorrespondentService } from 'src/app/services/rest/correspondent.service'; import { DocumentTypeService } from 'src/app/services/rest/document-type.service'; import { DocumentService } from 'src/app/services/rest/document.service'; -import { TagService } from 'src/app/services/rest/tag.service'; import { DeleteDialogComponent } from '../common/delete-dialog/delete-dialog.component'; import { CorrespondentEditDialogComponent } from '../manage/correspondent-list/correspondent-edit-dialog/correspondent-edit-dialog.component'; import { DocumentTypeEditDialogComponent } from '../manage/document-type-list/document-type-edit-dialog/document-type-edit-dialog.component'; -import { TagEditDialogComponent } from '../manage/tag-list/tag-edit-dialog/tag-edit-dialog.component'; @Component({ selector: 'app-document-detail', @@ -133,8 +129,8 @@ export class DocumentDetailComponent implements OnInit { close() { this.openDocumentService.closeDocument(this.document) - if (this.documentListViewService.viewId) { - this.router.navigate(['view', this.documentListViewService.viewId]) + if (this.documentListViewService.savedViewId) { + this.router.navigate(['view', this.documentListViewService.savedViewId]) } else { this.router.navigate(['documents']) } diff --git a/src-ui/src/app/components/document-list/document-list.component.html b/src-ui/src/app/components/document-list/document-list.component.html index 7c0abebc8..8bd5b1a55 100644 --- a/src-ui/src/app/components/document-list/document-list.component.html +++ b/src-ui/src/app/components/document-list/document-list.component.html @@ -21,13 +21,12 @@
-
+
- +
-
+
@@ -72,12 +75,12 @@
- +
- +
@@ -91,7 +94,7 @@ Added - + {{d.archive_serial_number}} {{d.correspondent ? d.correspondent.name : ''}} {{d.title}} @@ -104,7 +107,7 @@
- +
-

No results

\ No newline at end of file +

No results

diff --git a/src-ui/src/app/components/document-list/document-list.component.ts b/src-ui/src/app/components/document-list/document-list.component.ts index 2b155c34f..8cc5ed863 100644 --- a/src-ui/src/app/components/document-list/document-list.component.ts +++ b/src-ui/src/app/components/document-list/document-list.component.ts @@ -1,11 +1,12 @@ import { Component, OnInit } from '@angular/core'; -import { ActivatedRoute, Router } from '@angular/router'; +import { ActivatedRoute } from '@angular/router'; import { NgbModal } from '@ng-bootstrap/ng-bootstrap'; import { cloneFilterRules, FilterRule } from 'src/app/data/filter-rule'; import { SavedViewConfig } from 'src/app/data/saved-view-config'; import { DocumentListViewService } from 'src/app/services/document-list-view.service'; import { DOCUMENT_SORT_FIELDS } from 'src/app/services/rest/document.service'; import { SavedViewConfigService } from 'src/app/services/saved-view-config.service'; +import { Toast, ToastService } from 'src/app/services/toast.service'; import { SaveViewConfigDialogComponent } from './save-view-config-dialog/save-view-config-dialog.component'; @Component({ @@ -16,9 +17,10 @@ import { SaveViewConfigDialogComponent } from './save-view-config-dialog/save-vi export class DocumentListComponent implements OnInit { constructor( - public docs: DocumentListViewService, + public list: DocumentListViewService, public savedViewConfigService: SavedViewConfigService, public route: ActivatedRoute, + private toastService: ToastService, public modalService: NgbModal) { } displayMode = 'smallCards' // largeCards, smallCards, details @@ -27,17 +29,13 @@ export class DocumentListComponent implements OnInit { showFilter = false getTitle() { - return this.docs.viewConfigOverride ? this.docs.viewConfigOverride.title : "Documents" + return this.list.savedViewTitle || "Documents" } getSortFields() { return DOCUMENT_SORT_FIELDS } - setSort(field: string) { - this.docs.sortField = field - } - saveDisplayMode() { localStorage.setItem('document-list:displayMode', this.displayMode) } @@ -48,39 +46,42 @@ export class DocumentListComponent implements OnInit { } this.route.paramMap.subscribe(params => { if (params.has('id')) { - this.docs.viewConfigOverride = this.savedViewConfigService.getConfig(params.get('id')) + this.list.savedView = this.savedViewConfigService.getConfig(params.get('id')) } else { - this.filterRules = this.docs.filterRules - this.showFilter = this.filterRules.length > 0 - this.docs.viewConfigOverride = null + this.list.savedView = null } - this.reload() + this.filterRules = this.list.filterRules + //this.showFilter = this.filterRules.length > 0 + // prevents temporarily visible results from previous views + this.list.documents = [] + this.list.reload() }) } - reload() { - this.docs.reload() - } - applyFilterRules() { - this.docs.filterRules = this.filterRules + this.list.filterRules = this.filterRules } loadViewConfig(config: SavedViewConfig) { this.filterRules = cloneFilterRules(config.filterRules) - this.docs.loadViewConfig(config) + this.list.load(config) } saveViewConfig() { + this.savedViewConfigService.updateConfig(this.list.savedView) + this.toastService.showToast(Toast.make("Information", `View "${this.list.savedView.title}" saved successfully.`)) + } + + saveViewConfigAs() { let modal = this.modalService.open(SaveViewConfigDialogComponent, {backdrop: 'static'}) modal.componentInstance.saveClicked.subscribe(formValue => { - this.savedViewConfigService.saveConfig({ + this.savedViewConfigService.newConfig({ title: formValue.title, showInDashboard: formValue.showInDashboard, showInSideBar: formValue.showInSideBar, - filterRules: this.docs.filterRules, - sortDirection: this.docs.sortDirection, - sortField: this.docs.sortField + filterRules: this.list.filterRules, + sortDirection: this.list.sortDirection, + sortField: this.list.sortField }) modal.close() }) diff --git a/src-ui/src/app/services/document-list-view.service.ts b/src-ui/src/app/services/document-list-view.service.ts index 39a8661b9..9c7e244f4 100644 --- a/src-ui/src/app/services/document-list-view.service.ts +++ b/src-ui/src/app/services/document-list-view.service.ts @@ -7,6 +7,12 @@ import { DOCUMENT_LIST_SERVICE, GENERAL_SETTINGS } from '../data/storage-keys'; import { DocumentService } from './rest/document.service'; +/** + * This service manages the document list which is displayed using the document list view. + * + * This service also serves saved views by transparently switching between the document list + * and saved views on request. See below. + */ @Injectable({ providedIn: 'root' }) @@ -14,80 +20,127 @@ export class DocumentListViewService { static DEFAULT_SORT_FIELD = 'created' + isReloading: boolean = false documents: PaperlessDocument[] = [] currentPage = 1 currentPageSize: number = +localStorage.getItem(GENERAL_SETTINGS.DOCUMENT_LIST_SIZE) || GENERAL_SETTINGS.DOCUMENT_LIST_SIZE_DEFAULT collectionSize: number - private currentViewConfig: SavedViewConfig - //TODO: make private - viewConfigOverride: SavedViewConfig + /** + * This is the current config for the document list. The service will always remember the last settings used for the document list. + */ + private _documentListViewConfig: SavedViewConfig + /** + * Optionally, this is the currently selected saved view, which might be null. + */ + private _savedViewConfig: SavedViewConfig - get viewId() { - return this.viewConfigOverride?.id + get savedView() { + return this._savedViewConfig + } + + set savedView(value) { + if (value) { + //this is here so that we don't modify value, which might be the actual instance of the saved view. + this._savedViewConfig = Object.assign({}, value) + } else { + this._savedViewConfig = null + } + } + + get savedViewId() { + return this.savedView?.id + } + + get savedViewTitle() { + return this.savedView?.title + } + + get documentListView() { + return this._documentListViewConfig + } + + set documentListView(value) { + if (value) { + this._documentListViewConfig = Object.assign({}, value) + this.saveDocumentListView() + } + } + + /** + * This is what switches between the saved views and the document list view. Everything on the document list uses + * this property to determine the settings for the currently displayed document list. + */ + get view() { + return this.savedView || this.documentListView + } + + load(config: SavedViewConfig) { + this.view.filterRules = cloneFilterRules(config.filterRules) + this.view.sortDirection = config.sortDirection + this.view.sortField = config.sortField + this.reload() } reload(onFinish?) { - let viewConfig = this.viewConfigOverride || this.currentViewConfig - + this.isReloading = true this.documentService.list( this.currentPage, this.currentPageSize, - viewConfig.sortField, - viewConfig.sortDirection, - viewConfig.filterRules).subscribe( + this.view.sortField, + this.view.sortDirection, + this.view.filterRules).subscribe( result => { this.collectionSize = result.count this.documents = result.results if (onFinish) { onFinish() } + this.isReloading = false }, error => { if (error.error['detail'] == 'Invalid page.') { this.currentPage = 1 this.reload() } + this.isReloading = false }) } set filterRules(filterRules: FilterRule[]) { - this.currentViewConfig.filterRules = cloneFilterRules(filterRules) - this.saveCurrentViewConfig() + //we're going to clone the filterRules object, since we don't + //want changes in the filter editor to propagate into here right away. + this.view.filterRules = cloneFilterRules(filterRules) this.reload() + this.saveDocumentListView() } get filterRules(): FilterRule[] { - return cloneFilterRules(this.currentViewConfig.filterRules) + return cloneFilterRules(this.view.filterRules) } set sortField(field: string) { - this.currentViewConfig.sortField = field - this.saveCurrentViewConfig() + this.view.sortField = field + this.saveDocumentListView() this.reload() } get sortField(): string { - return this.currentViewConfig.sortField + return this.view.sortField } set sortDirection(direction: string) { - this.currentViewConfig.sortDirection = direction - this.saveCurrentViewConfig() + this.view.sortDirection = direction + this.saveDocumentListView() this.reload() } get sortDirection(): string { - return this.currentViewConfig.sortDirection + return this.view.sortDirection } - loadViewConfig(config: SavedViewConfig) { - Object.assign(this.currentViewConfig, config) - this.reload() - } - - private saveCurrentViewConfig() { - sessionStorage.setItem(DOCUMENT_LIST_SERVICE.CURRENT_VIEW_CONFIG, JSON.stringify(this.currentViewConfig)) + private saveDocumentListView() { + sessionStorage.setItem(DOCUMENT_LIST_SERVICE.CURRENT_VIEW_CONFIG, JSON.stringify(this.documentListView)) } getLastPage(): number { @@ -134,21 +187,21 @@ export class DocumentListViewService { } constructor(private documentService: DocumentService) { - let currentViewConfigJson = sessionStorage.getItem(DOCUMENT_LIST_SERVICE.CURRENT_VIEW_CONFIG) - if (currentViewConfigJson) { + let documentListViewConfigJson = sessionStorage.getItem(DOCUMENT_LIST_SERVICE.CURRENT_VIEW_CONFIG) + if (documentListViewConfigJson) { try { - this.currentViewConfig = JSON.parse(currentViewConfigJson) + this.documentListView = JSON.parse(documentListViewConfigJson) } catch (e) { sessionStorage.removeItem(DOCUMENT_LIST_SERVICE.CURRENT_VIEW_CONFIG) - this.currentViewConfig = null + this.documentListView = null } } - if (!this.currentViewConfig) { - this.currentViewConfig = { + if (!this.documentListView) { + this.documentListView = { filterRules: [], sortDirection: 'des', sortField: 'created' } - } + } } } diff --git a/src-ui/src/app/services/saved-view-config.service.ts b/src-ui/src/app/services/saved-view-config.service.ts index d69791209..41c28216b 100644 --- a/src-ui/src/app/services/saved-view-config.service.ts +++ b/src-ui/src/app/services/saved-view-config.service.ts @@ -36,13 +36,21 @@ export class SavedViewConfigService { return this.configs.find(sf => sf.id == id) } - saveConfig(config: SavedViewConfig) { + newConfig(config: SavedViewConfig) { config.id = uuidv4() this.configs.push(config) this.save() } + updateConfig(config: SavedViewConfig) { + let savedConfig = this.configs.find(c => c.id == config.id) + if (savedConfig) { + Object.assign(savedConfig, config) + this.save() + } + } + private save() { localStorage.setItem('saved-view-config-service:savedConfigs', JSON.stringify(this.configs)) } From 562d81e246320b35bcce63019988fd79ab69f267 Mon Sep 17 00:00:00 2001 From: jonaswinkler Date: Sat, 28 Nov 2020 21:28:07 +0100 Subject: [PATCH 5/9] clickable tags and correspondents fixes #54 --- .../components/common/tag/tag.component.html | 2 +- .../components/common/tag/tag.component.ts | 3 ++ .../document-card-large.component.html | 7 ++- .../document-card-large.component.ts | 9 +++- .../document-card-small.component.html | 8 +-- .../document-card-small.component.ts | 9 +++- .../document-list/document-list.component.ts | 23 ++++++++ src-ui/src/app/data/filter-rule-type.ts | 54 +++++++++++++------ 8 files changed, 91 insertions(+), 24 deletions(-) diff --git a/src-ui/src/app/components/common/tag/tag.component.html b/src-ui/src/app/components/common/tag/tag.component.html index a83c53c77..8b9632a65 100644 --- a/src-ui/src/app/components/common/tag/tag.component.html +++ b/src-ui/src/app/components/common/tag/tag.component.html @@ -1,2 +1,2 @@ {{tag.name}} -
{{tag.name}} \ No newline at end of file +{{tag.name}} \ No newline at end of file diff --git a/src-ui/src/app/components/common/tag/tag.component.ts b/src-ui/src/app/components/common/tag/tag.component.ts index f7d9b0c58..c032c51db 100644 --- a/src-ui/src/app/components/common/tag/tag.component.ts +++ b/src-ui/src/app/components/common/tag/tag.component.ts @@ -13,6 +13,9 @@ export class TagComponent implements OnInit { @Input() tag: PaperlessTag + @Input() + linkTitle: string = "" + @Input() clickable: boolean = false diff --git a/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.html b/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.html index 2ef5875fe..63a8bf710 100644 --- a/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.html +++ b/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.html @@ -7,7 +7,12 @@
-
{{document.correspondent ? document.correspondent.name + ': ' : ''}}{{document.title}}
+
+ + {{document.correspondent.name}}: + + {{document.title}} +
#{{document.archive_serial_number}}

diff --git a/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.ts b/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.ts index db634e83c..4a44909ec 100644 --- a/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.ts +++ b/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.ts @@ -1,6 +1,7 @@ -import { Component, Input, OnInit } from '@angular/core'; +import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; import { DomSanitizer } from '@angular/platform-browser'; import { PaperlessDocument } from 'src/app/data/paperless-document'; +import { PaperlessTag } from 'src/app/data/paperless-tag'; import { DocumentService } from 'src/app/services/rest/document.service'; @Component({ @@ -18,6 +19,12 @@ export class DocumentCardLargeComponent implements OnInit { @Input() details: any + @Output() + clickTag = new EventEmitter() + + @Output() + clickCorrespondent = new EventEmitter() + ngOnInit(): void { } 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 85dc94dd8..83dbe8839 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 @@ -2,14 +2,16 @@

- +
-

- {{document.correspondent? document.correspondent.name + ': ' : ''}} {{document.title}} + + {{document.correspondent.name}}: + + {{document.title}}