A community-supported supercharged document management system: scan, index and archive all your documents
Python aiangulararchivingdjangodmsdocument-managementdocument-management-systemllmmachine-learningocroptical-character-recognitionpdf
Quick toggle for tags / doctypes etc on doc view
Michael Shamoon5f10d86f04ab
diff --git a/src-ui/messages.xlf b/src-ui/messages.xlfindex f4c0d6598..b69d864e1 100644--- a/src-ui/messages.xlf+++ b/src-ui/messages.xlf@@ -102,35 +102,35 @@<source>»»</source><context-group purpose="location"><context context-type="sourcefile">node_modules/src/pagination/pagination.ts</context>- <context context-type="linenumber">313,316</context>+ <context context-type="linenumber">312</context></context-group></trans-unit><trans-unit id="ngb.pagination.first-aria" datatype="html"><source>First</source><context-group purpose="location"><context context-type="sourcefile">node_modules/src/pagination/pagination.ts</context>- <context context-type="linenumber">332,333</context>+ <context context-type="linenumber">330</context></context-group></trans-unit><trans-unit id="ngb.pagination.previous-aria" datatype="html"><source>Previous</source><context-group purpose="location"><context context-type="sourcefile">node_modules/src/pagination/pagination.ts</context>- <context context-type="linenumber">347,348</context>+ <context context-type="linenumber">343,345</context></context-group></trans-unit><trans-unit id="ngb.pagination.next-aria" datatype="html"><source>Next</source><context-group purpose="location"><context context-type="sourcefile">node_modules/src/pagination/pagination.ts</context>- <context context-type="linenumber">363</context>+ <context context-type="linenumber">357</context></context-group></trans-unit><trans-unit id="ngb.pagination.last-aria" datatype="html"><source>Last</source><context-group purpose="location"><context context-type="sourcefile">node_modules/src/pagination/pagination.ts</context>- <context context-type="linenumber">379,380</context>+ <context context-type="linenumber">378,379</context></context-group></trans-unit><trans-unit id="ngb.progressbar.value" datatype="html">@@ -368,7 +368,7 @@</context-group><context-group purpose="location"><context context-type="sourcefile">src/app/components/document-list/document-list.component.ts</context>- <context context-type="linenumber">68</context>+ <context context-type="linenumber">65</context></context-group><context-group purpose="location"><context context-type="sourcefile">src/app/components/manage/management-list/management-list.component.html</context>@@ -872,7 +872,7 @@</context-group><context-group purpose="location"><context context-type="sourcefile">src/app/components/manage/storage-path-list/storage-path-list.component.ts</context>- <context context-type="linenumber">36</context>+ <context context-type="linenumber">35</context></context-group></trans-unit><trans-unit id="6625768491622252297" datatype="html">@@ -1592,7 +1592,7 @@<source>Confirm delete</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/document-detail/document-detail.component.ts</context>- <context context-type="linenumber">469</context>+ <context context-type="linenumber">467</context></context-group><context-group purpose="location"><context context-type="sourcefile">src/app/components/manage/management-list/management-list.component.ts</context>@@ -1603,28 +1603,28 @@<source>Do you really want to delete document "<x id="PH" equiv-text="this.document.title"/>"?</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/document-detail/document-detail.component.ts</context>- <context context-type="linenumber">470</context>+ <context context-type="linenumber">468</context></context-group></trans-unit><trans-unit id="6691075929777935948" datatype="html"><source>The files for this document will be deleted permanently. This operation cannot be undone.</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/document-detail/document-detail.component.ts</context>- <context context-type="linenumber">471</context>+ <context context-type="linenumber">469</context></context-group></trans-unit><trans-unit id="719892092227206532" datatype="html"><source>Delete document</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/document-detail/document-detail.component.ts</context>- <context context-type="linenumber">473</context>+ <context context-type="linenumber">471</context></context-group></trans-unit><trans-unit id="1844801255494293730" datatype="html"><source>Error deleting document: <x id="PH" equiv-text="JSON.stringify(error)"/></source><context-group purpose="location"><context context-type="sourcefile">src/app/components/document-detail/document-detail.component.ts</context>- <context context-type="linenumber">489</context>+ <context context-type="linenumber">487</context></context-group></trans-unit><trans-unit id="6857598786757174736" datatype="html">@@ -1882,10 +1882,6 @@<context context-type="sourcefile">src/app/components/document-list/document-card-large/document-card-large.component.html</context><context context-type="linenumber">20</context></context-group>- <context-group purpose="location">- <context context-type="sourcefile">src/app/components/document-list/document-card-small/document-card-small.component.html</context>- <context context-type="linenumber">24</context>- </context-group><context-group purpose="location"><context context-type="sourcefile">src/app/components/document-list/document-list.component.html</context><context context-type="linenumber">173</context>@@ -1897,10 +1893,6 @@<context context-type="sourcefile">src/app/components/document-list/document-card-large/document-card-large.component.html</context><context context-type="linenumber">24</context></context-group>- <context-group purpose="location">- <context context-type="sourcefile">src/app/components/document-list/document-card-small/document-card-small.component.html</context>- <context context-type="linenumber">14</context>- </context-group><context-group purpose="location"><context context-type="sourcefile">src/app/components/document-list/document-list.component.html</context><context context-type="linenumber">178</context>@@ -1962,10 +1954,6 @@<context context-type="sourcefile">src/app/components/document-list/document-card-large/document-card-large.component.html</context><context context-type="linenumber">63</context></context-group>- <context-group purpose="location">- <context context-type="sourcefile">src/app/components/document-list/document-card-small/document-card-small.component.html</context>- <context context-type="linenumber">31</context>- </context-group><context-group purpose="location"><context context-type="sourcefile">src/app/components/document-list/document-list.component.html</context><context context-type="linenumber">182</context>@@ -1977,10 +1965,6 @@<context context-type="sourcefile">src/app/components/document-list/document-card-large/document-card-large.component.html</context><context context-type="linenumber">70</context></context-group>- <context-group purpose="location">- <context context-type="sourcefile">src/app/components/document-list/document-card-small/document-card-small.component.html</context>- <context context-type="linenumber">38</context>- </context-group><context-group purpose="location"><context context-type="sourcefile">src/app/components/document-list/document-list.component.html</context><context context-type="linenumber">187</context>@@ -2026,6 +2010,34 @@<context context-type="linenumber">98</context></context-group></trans-unit>+ <trans-unit id="3661756380991326939" datatype="html">+ <source>Toggle tag filter</source>+ <context-group purpose="location">+ <context context-type="sourcefile">src/app/components/document-list/document-card-small/document-card-small.component.html</context>+ <context context-type="linenumber">14</context>+ </context-group>+ </trans-unit>+ <trans-unit id="4648526799630820486" datatype="html">+ <source>Toggle correspondent filter</source>+ <context-group purpose="location">+ <context context-type="sourcefile">src/app/components/document-list/document-card-small/document-card-small.component.html</context>+ <context context-type="linenumber">24</context>+ </context-group>+ </trans-unit>+ <trans-unit id="5319701482646590642" datatype="html">+ <source>Toggle document type filter</source>+ <context-group purpose="location">+ <context context-type="sourcefile">src/app/components/document-list/document-card-small/document-card-small.component.html</context>+ <context context-type="linenumber">31</context>+ </context-group>+ </trans-unit>+ <trans-unit id="8950368321707344185" datatype="html">+ <source>Toggle storage path filter</source>+ <context-group purpose="location">+ <context context-type="sourcefile">src/app/components/document-list/document-card-small/document-card-small.component.html</context>+ <context context-type="linenumber">38</context>+ </context-group>+ </trans-unit><trans-unit id="5145213156408463657" datatype="html"><source>Select none</source><context-group purpose="location">@@ -2144,14 +2156,14 @@<source>View "<x id="PH" equiv-text="this.list.activeSavedViewTitle"/>" saved successfully.</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/document-list/document-list.component.ts</context>- <context context-type="linenumber">197</context>+ <context context-type="linenumber">180</context></context-group></trans-unit><trans-unit id="6837554170707123455" datatype="html"><source>View "<x id="PH" equiv-text="savedView.name"/>" created successfully.</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/document-list/document-list.component.ts</context>- <context context-type="linenumber">227</context>+ <context context-type="linenumber">210</context></context-group></trans-unit><trans-unit id="6849725902312323996" datatype="html">@@ -2829,21 +2841,21 @@<source>storage path</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/manage/storage-path-list/storage-path-list.component.ts</context>- <context context-type="linenumber">31</context>+ <context context-type="linenumber">30</context></context-group></trans-unit><trans-unit id="22235115124223314" datatype="html"><source>storage paths</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/manage/storage-path-list/storage-path-list.component.ts</context>- <context context-type="linenumber">32</context>+ <context context-type="linenumber">31</context></context-group></trans-unit><trans-unit id="1569070683025071137" datatype="html"><source>Do you really want to delete the storage path "<x id="PH" equiv-text="object.name"/>"?</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/manage/storage-path-list/storage-path-list.component.ts</context>- <context context-type="linenumber">46</context>+ <context context-type="linenumber">45</context></context-group></trans-unit><trans-unit id="6402703264596649214" datatype="html">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.htmlindex a27b23d37..813447f2d 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@@ -11,7 +11,7 @@</div><div class="tags d-flex flex-column text-end position-absolute me-1 fs-6">- <app-tag *ngFor="let t of getTagsLimited$() | async" [tag]="t" (click)="clickTag.emit(t.id);$event.stopPropagation()" [clickable]="true" linkTitle="Filter by tag" i18n-linkTitle></app-tag>+ <app-tag *ngFor="let t of getTagsLimited$() | async" [tag]="t" (click)="clickTag.emit(t.id);$event.stopPropagation()" [clickable]="true" linkTitle="Toggle tag filter" i18n-linkTitle></app-tag><div *ngIf="moreTags"><span class="badge badge-secondary">+ {{moreTags}}</span></div>@@ -21,21 +21,21 @@<div class="card-body p-2"><p class="card-text"><ng-container *ngIf="document.correspondent">- <a title="Filter by correspondent" 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}}</a>:</ng-container>{{document.title | documentTitle}}</p></div><div class="card-footer pt-0 pb-2 px-2"><div class="list-group list-group-flush border-0 pt-1 pb-2 card-info">- <button *ngIf="document.document_type" type="button" class="list-group-item list-group-item-action bg-transparent ps-0 p-1 border-0" title="Filter by document type" i18n-title+ <button *ngIf="document.document_type" type="button" class="list-group-item list-group-item-action bg-transparent ps-0 p-1 border-0" title="Toggle document type filter" i18n-title(click)="clickDocumentType.emit(document.document_type);$event.stopPropagation()"><svg class="metadata-icon me-2 text-muted bi bi-file-earmark" viewBox="0 0 16 16" fill="currentColor"><path d="M14 4.5V14a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V2a2 2 0 0 1 2-2h5.5L14 4.5zm-3 0A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V4.5h-2z"/></svg><small>{{(document.document_type$ | async)?.name}}</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="Filter by storage path" i18n-title+ <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 bi bi-folder" viewBox="0 0 16 16" fill="currentColor"><path d="M0 2a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1v7.5a2.5 2.5 0 0 1-2.5 2.5h-9A2.5 2.5 0 0 1 1 12.5V5a1 1 0 0 1-1-1V2zm2 3v7.5A1.5 1.5 0 0 0 3.5 14h9a1.5 1.5 0 0 0 1.5-1.5V5H2zm13-3H1v2h14V2zM5 7.5a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 0 1h-5a.5.5 0 0 1-.5-.5z"/>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.tsindex e27f14b14..0ad48f702 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@@ -229,22 +229,22 @@ export class DocumentListComponent implements OnInit, OnDestroy {clickTag(tagID: number) {this.list.selectNone()- this.filterEditor.addTag(tagID)+ this.filterEditor.toggleTag(tagID)}clickCorrespondent(correspondentID: number) {this.list.selectNone()- this.filterEditor.addCorrespondent(correspondentID)+ this.filterEditor.toggleCorrespondent(correspondentID)}clickDocumentType(documentTypeID: number) {this.list.selectNone()- this.filterEditor.addDocumentType(documentTypeID)+ this.filterEditor.toggleDocumentType(documentTypeID)}clickStoragePath(storagePathID: number) {this.list.selectNone()- this.filterEditor.addStoragePath(storagePathID)+ this.filterEditor.toggleStoragePath(storagePathID)}clickMoreLike(documentID: number) {diff --git a/src-ui/src/app/components/document-list/filter-editor/filter-editor.component.ts b/src-ui/src/app/components/document-list/filter-editor/filter-editor.component.tsindex 421cd0693..ebf69abf2 100644--- a/src-ui/src/app/components/document-list/filter-editor/filter-editor.component.ts+++ b/src-ui/src/app/components/document-list/filter-editor/filter-editor.component.ts@@ -550,29 +550,20 @@ export class FilterEditorComponent implements OnInit, OnDestroy {this.updateRules()}- addTag(tagId: number) {- this.tagSelectionModel.set(tagId, ToggleableItemState.Selected)+ toggleTag(tagId: number) {+ this.tagSelectionModel.toggle(tagId)}- addCorrespondent(correspondentId: number) {- this.correspondentSelectionModel.set(- correspondentId,- ToggleableItemState.Selected- )+ toggleCorrespondent(correspondentId: number) {+ this.correspondentSelectionModel.toggle(correspondentId)}- addDocumentType(documentTypeId: number) {- this.documentTypeSelectionModel.set(- documentTypeId,- ToggleableItemState.Selected- )+ toggleDocumentType(documentTypeId: number) {+ this.documentTypeSelectionModel.toggle(documentTypeId)}- addStoragePath(storagePathID: number) {- this.storagePathSelectionModel.set(- storagePathID,- ToggleableItemState.Selected- )+ toggleStoragePath(storagePathID: number) {+ this.storagePathSelectionModel.toggle(storagePathID)}onTagsDropdownOpen() {