diff --git a/README.md b/README.md index e8ae8feb2..32ff2ab4a 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,10 @@ Here's what you get: * Includes a dashboard that shows basic statistics and has document upload. * Filtering by tags, correspondents, types, and more. * Customizable views can be saved and displayed on the dashboard. - * Full text search with auto completion, scored results and query highlighting allows you to quickly find what you need. +* Full text search helps you find what you need. + * Auto completion suggests relevant words from your documents. + * Results are sorted by relevance to your search query. + * Highlighting shows you which parts of the document matched the query. * Email processing: Paperless adds documents from your email accounts. * Configure multiple accounts and filters for each account. * When adding documents from mails, paperless can move these mails to a new folder, mark them as read, flag them or delete them. @@ -51,6 +54,8 @@ For a complete list of changes from paperless, check out the [changelog](https:/ # Roadmap for 1.0 +- **Bulk editing**. Add/remove metadata from multiple documents at once. + - Make the front end nice (except mobile). - Test coverage at 90%. - Fix whatever bugs I and you find. @@ -59,7 +64,6 @@ For a complete list of changes from paperless, check out the [changelog](https:/ These are things that I want to add to paperless eventually. They are sorted by priority. -- **Bulk editing**. Add/remove metadata from multiple documents at once. - **More search.** The search backend is incredibly versatile and customizable. Searching is the most important feature of this project and thus, I want to implement things like: - Group and limit search results by correspondent, show “more from this” links in the results. - Ability to search for “Similar documents” in the search results @@ -68,6 +72,9 @@ These are things that I want to add to paperless eventually. They are sorted by - With live updates ans websockets. This already works on a dev branch, but requires a lot of new dependencies, which I'm not particular happy about. - Notifications when a document was added with buttons to open the new document right away. - **Arbitrary tag colors**. Allow the selection of any color with a color picker. +- **More file types**. Possibly allow more file types to be processed by paperless, such as office .odt, .doc, .docx documents. + +Apart from that, paperless is pretty much feature complete. ## On the chopping block. diff --git a/docker/hub/docker-compose.postgres.yml b/docker/hub/docker-compose.postgres.yml index d33e4c38d..e7a32bec0 100644 --- a/docker/hub/docker-compose.postgres.yml +++ b/docker/hub/docker-compose.postgres.yml @@ -15,7 +15,7 @@ services: POSTGRES_PASSWORD: paperless webserver: - image: jonaswinkler/paperless-ng:0.9.8 + image: jonaswinkler/paperless-ng:0.9.9 restart: always depends_on: - db diff --git a/docker/hub/docker-compose.sqlite.yml b/docker/hub/docker-compose.sqlite.yml index c130dfef6..98b7d70a2 100644 --- a/docker/hub/docker-compose.sqlite.yml +++ b/docker/hub/docker-compose.sqlite.yml @@ -5,7 +5,7 @@ services: restart: always webserver: - image: jonaswinkler/paperless-ng:0.9.8 + image: jonaswinkler/paperless-ng:0.9.9 restart: always depends_on: - broker diff --git a/docs/changelog.rst b/docs/changelog.rst index a993eb530..e63c19d7d 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -6,6 +6,40 @@ Changelog ********* +paperless-ng 0.9.9 +################## + +Christmas release! + +* Bulk editing + + * Paperless now supports bulk editing. + * The following operations are available: Add and remove correspondents, tags, document types from selected documents, as well as mass-deleting documents. + * We've got a more fancy UI in the works that makes these features more accessible, but that's not quite ready yet. + +* Searching + + * Paperless now supports searching for similar documents ("More like this") both from the document detail page as well as from individual search results. + * A search score indicates how well a document matches the search query, or how similar a document is to a given reference document. + +* Other additions and changes + + * Clarification in the UI that the fields "Match" and "Is insensitive" are not relevant for the Auto matching algorithm. + * New select interface for tags, types and correspondents allows filtering. This also improves tag selection. Thanks again to `Michael Shamoon`_! + * Page navigation controls for the document viewer, thanks to `Michael Shamoon`_. + * Layout changes to the small cards document list. + * The dashboard now displays the username (or full name if specified in the admin) on the dashboard. + +* Fixes + + * An error that caused the document importer to crash was fixed. + * An issue with changes not being possible when ``PAPERLESS_COOKIE_PREFIX`` is used was fixed. + * The date selection filters now allow manual entry of dates. + +* Feature Removal + + * Most of the guesswork features have been removed. Paperless no longer tries to extract correspondents and tags from file names. + paperless-ng 0.9.8 ################## diff --git a/docs/scanners.rst b/docs/scanners.rst index d4ad4dfb1..5551fe55d 100644 --- a/docs/scanners.rst +++ b/docs/scanners.rst @@ -25,6 +25,8 @@ that works right for you based on recommendations from other Paperless users. +---------+----------------+-----+-----+-----+----------------+ | Fujitsu | `ix500`_ | yes | | yes | `eonist`_ | +---------+----------------+-----+-----+-----+----------------+ +| Epson | `WF-7710DWF`_ | yes | | yes | `Skylinar`_ | ++---------+----------------+-----+-----+-----+----------------+ | Fujitsu | `S1300i`_ | yes | | yes | `jonaswinkler`_| +---------+----------------+-----+-----+-----+----------------+ @@ -32,7 +34,8 @@ that works right for you based on recommendations from other Paperless users. .. _MFC-J6930DW: https://www.brother.ca/en/p/MFCJ6930DW .. _MFC-J5910DW: https://www.brother.co.uk/printers/inkjet-printers/mfcj5910dw .. _MFC-9142CDN: https://www.brother.co.uk/printers/laser-printers/mfc9140cdn -.. _ix500: https://www.fujitsu.com/global/products/computing/peripheral/scanners/scansnap/ix500/ +.. _ix500: http://www.fujitsu.com/us/products/computing/peripheral/scanners/scansnap/ix500/ +.. _WF-7710DWF: https://www.epson.de/en/products/printers/inkjet-printers/for-home/workforce-wf-7710dwf .. _S1300i: https://www.fujitsu.com/global/products/computing/peripheral/scanners/soho/s1300i/ .. _danielquinn: https://github.com/danielquinn @@ -40,4 +43,5 @@ that works right for you based on recommendations from other Paperless users. .. _bmsleight: https://github.com/bmsleight .. _eonist: https://github.com/eonist .. _REOLDEV: https://github.com/REOLDEV +.. _Skylinar: https://github.com/Skylinar .. _jonaswinkler: https://github.com/jonaswinkler diff --git a/docs/setup.rst b/docs/setup.rst index e5e6526ea..4d29ce640 100644 --- a/docs/setup.rst +++ b/docs/setup.rst @@ -120,6 +120,8 @@ The `bare metal route`_ is more complicated to setup but makes it easier should you want to contribute some code back. You need to configure and run the above mentioned components yourself. +.. _setup-docker_route: + Docker Route ============ @@ -460,6 +462,15 @@ management commands as below. load data from an old database schema in SQLite into a newer database schema in PostgreSQL, you will run into trouble. +.. warning:: + + On some database fields, PostgreSQL enforces predefined limits on maximum + length, whereas SQLite does not. The fields in question are the title of documents + (128 characters), names of document types, tags and correspondents (128 characters), + and filenames (1024 characters). If you have data in these fields that surpasses these + limits, migration to PostgreSQL is not possible and will fail with an error. + + 1. Stop paperless, if it is running. 2. Tell paperless to use PostgreSQL: diff --git a/docs/troubleshooting.rst b/docs/troubleshooting.rst index dc5bf7f5d..4c06ec4cd 100644 --- a/docs/troubleshooting.rst +++ b/docs/troubleshooting.rst @@ -39,7 +39,7 @@ Operation not permitted You might see errors such as: -.. code:: +.. code:: shell-session chown: changing ownership of '../export': Operation not permitted @@ -49,3 +49,29 @@ to these folders. This happens when pointing these directories to NFS shares, for example. Ensure that `chown` is possible on these directories. + +Classifier error: No training data available +############################################ + +This indicates that the Auto matching algorithm found no documents to learn from. +This may have two reasons: + +* You don't use the Auto matching algorithm: The error can be safely ignored in this case. +* You are using the Auto matching algorithm: The classifier explicitly excludes documents + with Inbox tags. Verify that there are documents in your archive without inbox tags. + The algorithm will only learn from documents not in your inbox. + +Permission denied errors in the consumption directory +##################################################### + +You might encounter errors such as: + +.. code:: shell-session + + The following error occured while consuming document.pdf: [Errno 13] Permission denied: '/usr/src/paperless/src/../consume/document.pdf' + +This happens when paperless does not have permission to delete files inside the consumption directory. +Ensure that ``USERMAP_UID`` and ``USERMAP_GID`` are set to the user id and group id you use on the host operating system, if these are +different from ``1000``. See :ref:`setup-docker_route`. + +Also ensure that you are able to read and write to the consumption directory on the host. diff --git a/src-ui/src/app/app.module.ts b/src-ui/src/app/app.module.ts index d9c3800d6..37b3a027d 100644 --- a/src-ui/src/app/app.module.ts +++ b/src-ui/src/app/app.module.ts @@ -55,6 +55,7 @@ import { FilterPipe } from './pipes/filter.pipe'; import { DocumentTitlePipe } from './pipes/document-title.pipe'; import { MetadataCollapseComponent } from './components/document-detail/metadata-collapse/metadata-collapse.component'; import { NgSelectModule } from '@ng-select/ng-select'; +import { SelectDialogComponent } from './components/common/select-dialog/select-dialog.component'; @NgModule({ declarations: [ @@ -100,7 +101,8 @@ import { NgSelectModule } from '@ng-select/ng-select'; FileSizePipe, FilterPipe, DocumentTitlePipe, - MetadataCollapseComponent + MetadataCollapseComponent, + SelectDialogComponent ], imports: [ BrowserModule, diff --git a/src-ui/src/app/components/app-frame/app-frame.component.html b/src-ui/src/app/components/app-frame/app-frame.component.html index 2458005f4..5fe42fc40 100644 --- a/src-ui/src/app/components/app-frame/app-frame.component.html +++ b/src-ui/src/app/components/app-frame/app-frame.component.html @@ -1,7 +1,7 @@ @@ -28,136 +28,122 @@ - - Dashboard +  Dashboard diff --git a/src-ui/src/app/components/common/confirm-dialog/confirm-dialog.component.html b/src-ui/src/app/components/common/confirm-dialog/confirm-dialog.component.html index 53b613244..f4dffa7d1 100644 --- a/src-ui/src/app/components/common/confirm-dialog/confirm-dialog.component.html +++ b/src-ui/src/app/components/common/confirm-dialog/confirm-dialog.component.html @@ -10,5 +10,8 @@ \ No newline at end of file + + diff --git a/src-ui/src/app/components/common/confirm-dialog/confirm-dialog.component.ts b/src-ui/src/app/components/common/confirm-dialog/confirm-dialog.component.ts index e207f4598..4791d0e77 100644 --- a/src-ui/src/app/components/common/confirm-dialog/confirm-dialog.component.ts +++ b/src-ui/src/app/components/common/confirm-dialog/confirm-dialog.component.ts @@ -28,6 +28,21 @@ export class ConfirmDialogComponent implements OnInit { @Input() btnCaption = "Confirm" + confirmButtonEnabled = true + seconds = 0 + + delayConfirm(seconds: number) { + this.confirmButtonEnabled = false + this.seconds = seconds + setTimeout(() => { + if (this.seconds <= 1) { + this.confirmButtonEnabled = true + } else { + this.delayConfirm(seconds - 1) + } + }, 1000) + } + ngOnInit(): void { } diff --git a/src-ui/src/app/components/common/input/select/select.component.html b/src-ui/src/app/components/common/input/select/select.component.html index d33dae425..780dc5686 100644 --- a/src-ui/src/app/components/common/input/select/select.component.html +++ b/src-ui/src/app/components/common/input/select/select.component.html @@ -5,6 +5,7 @@ [disabled]="disabled" [style.color]="textColor" [style.background]="backgroundColor" + [clearable]="allowNull" (change)="onChange(value)" (blur)="onTouched()"> {{i.name}} diff --git a/src-ui/src/app/components/common/select-dialog/select-dialog.component.html b/src-ui/src/app/components/common/select-dialog/select-dialog.component.html new file mode 100644 index 000000000..8bde38d61 --- /dev/null +++ b/src-ui/src/app/components/common/select-dialog/select-dialog.component.html @@ -0,0 +1,15 @@ + + + \ No newline at end of file diff --git a/src-ui/src/app/components/common/select-dialog/select-dialog.component.scss b/src-ui/src/app/components/common/select-dialog/select-dialog.component.scss new file mode 100644 index 000000000..e69de29bb diff --git a/src-ui/src/app/components/common/select-dialog/select-dialog.component.spec.ts b/src-ui/src/app/components/common/select-dialog/select-dialog.component.spec.ts new file mode 100644 index 000000000..3810bcbea --- /dev/null +++ b/src-ui/src/app/components/common/select-dialog/select-dialog.component.spec.ts @@ -0,0 +1,25 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { SelectDialogComponent } from './select-dialog.component'; + +describe('SelectDialogComponent', () => { + let component: SelectDialogComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ SelectDialogComponent ] + }) + .compileComponents(); + }); + + beforeEach(() => { + fixture = TestBed.createComponent(SelectDialogComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src-ui/src/app/components/common/select-dialog/select-dialog.component.ts b/src-ui/src/app/components/common/select-dialog/select-dialog.component.ts new file mode 100644 index 000000000..76b23491c --- /dev/null +++ b/src-ui/src/app/components/common/select-dialog/select-dialog.component.ts @@ -0,0 +1,34 @@ +import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; +import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; +import { ObjectWithId } from 'src/app/data/object-with-id'; + +@Component({ + selector: 'app-select-dialog', + templateUrl: './select-dialog.component.html', + styleUrls: ['./select-dialog.component.scss'] +}) + +export class SelectDialogComponent implements OnInit { + constructor(public activeModal: NgbActiveModal) { } + + @Output() + public selectClicked = new EventEmitter() + + @Input() + title = "Select" + + @Input() + message = "Please select an object" + + @Input() + objects: ObjectWithId[] = [] + + selected: number + + ngOnInit(): void { + } + + cancelClicked() { + this.activeModal.close() + } +} diff --git a/src-ui/src/app/components/dashboard/dashboard.component.html b/src-ui/src/app/components/dashboard/dashboard.component.html index 541255a68..5b76dd242 100644 --- a/src-ui/src/app/components/dashboard/dashboard.component.html +++ b/src-ui/src/app/components/dashboard/dashboard.component.html @@ -1,4 +1,4 @@ - + diff --git a/src-ui/src/app/components/dashboard/dashboard.component.ts b/src-ui/src/app/components/dashboard/dashboard.component.ts index db9b5d425..0dca25d8a 100644 --- a/src-ui/src/app/components/dashboard/dashboard.component.ts +++ b/src-ui/src/app/components/dashboard/dashboard.component.ts @@ -24,15 +24,15 @@ export class DashboardComponent implements OnInit { } else if (tagUsername && tagUsername.content) { return tagUsername.content } else { - return null + return "null" } } get subtitle() { if (this.displayName) { - return `Hello ${this.displayName}, welcome to Paperless-ng!` + return $localize`Hello ${this.displayName}, welcome to Paperless-ng!` } else { - return `Welcome to Paperless-ng!` + return $localize`Welcome to Paperless-ng!` } } diff --git a/src-ui/src/app/components/dashboard/widgets/saved-view-widget/saved-view-widget.component.html b/src-ui/src/app/components/dashboard/widgets/saved-view-widget/saved-view-widget.component.html index f50708af3..1bf06b60f 100644 --- a/src-ui/src/app/components/dashboard/widgets/saved-view-widget/saved-view-widget.component.html +++ b/src-ui/src/app/components/dashboard/widgets/saved-view-widget/saved-view-widget.component.html @@ -1,13 +1,13 @@ - Show all + Show all - - + + diff --git a/src-ui/src/app/components/dashboard/widgets/saved-view-widget/saved-view-widget.component.ts b/src-ui/src/app/components/dashboard/widgets/saved-view-widget/saved-view-widget.component.ts index 5bfecc640..f200d8db9 100644 --- a/src-ui/src/app/components/dashboard/widgets/saved-view-widget/saved-view-widget.component.ts +++ b/src-ui/src/app/components/dashboard/widgets/saved-view-widget/saved-view-widget.component.ts @@ -23,7 +23,7 @@ export class SavedViewWidgetComponent implements OnInit { documents: PaperlessDocument[] = [] ngOnInit(): void { - this.documentService.list(1,10,this.savedView.sort_field, this.savedView.sort_reverse, this.savedView.filter_rules).subscribe(result => { + this.documentService.listFiltered(1,10,this.savedView.sort_field, this.savedView.sort_reverse, this.savedView.filter_rules).subscribe(result => { this.documents = result.results }) } diff --git a/src-ui/src/app/components/dashboard/widgets/statistics-widget/statistics-widget.component.html b/src-ui/src/app/components/dashboard/widgets/statistics-widget/statistics-widget.component.html index 50d844b36..0ad0005ea 100644 --- a/src-ui/src/app/components/dashboard/widgets/statistics-widget/statistics-widget.component.html +++ b/src-ui/src/app/components/dashboard/widgets/statistics-widget/statistics-widget.component.html @@ -1,6 +1,6 @@ - + -

Documents in inbox: {{statistics.documents_inbox}}

-

Total documents: {{statistics.documents_total}}

+

Documents in inbox: {{statistics.documents_inbox}}

+

Total documents: {{statistics.documents_total}}

\ No newline at end of file diff --git a/src-ui/src/app/components/dashboard/widgets/upload-file-widget/upload-file-widget.component.html b/src-ui/src/app/components/dashboard/widgets/upload-file-widget/upload-file-widget.component.html index 013486a47..91fff4e83 100644 --- a/src-ui/src/app/components/dashboard/widgets/upload-file-widget/upload-file-widget.component.html +++ b/src-ui/src/app/components/dashboard/widgets/upload-file-widget/upload-file-widget.component.html @@ -1,16 +1,16 @@ - +
- + browseBtnClassName="btn btn-sm btn-outline-primary ml-2" i18n-dropZoneLabel i18n-browseBtnLabel>
-

Uploading {{uploadStatus.length}} file(s)

+

Uploading {{uploadStatus.length}} file(s)

diff --git a/src-ui/src/app/components/dashboard/widgets/upload-file-widget/upload-file-widget.component.ts b/src-ui/src/app/components/dashboard/widgets/upload-file-widget/upload-file-widget.component.ts index 2ea4825f1..b80f9544e 100644 --- a/src-ui/src/app/components/dashboard/widgets/upload-file-widget/upload-file-widget.component.ts +++ b/src-ui/src/app/components/dashboard/widgets/upload-file-widget/upload-file-widget.component.ts @@ -60,7 +60,7 @@ export class UploadFileWidgetComponent implements OnInit { } else if (event.type == HttpEventType.Response) { this.uploadStatus.splice(this.uploadStatus.indexOf(uploadStatusObject), 1) this.completedFiles += 1 - this.toastService.showToast(Toast.make("Information", "The document has been uploaded and will be processed by the consumer shortly.")) + this.toastService.showToast(Toast.make("Information", $localize`The document has been uploaded and will be processed by the consumer shortly.`)) } }, error => { @@ -68,11 +68,11 @@ export class UploadFileWidgetComponent implements OnInit { this.completedFiles += 1 switch (error.status) { case 400: { - this.toastService.showToast(Toast.makeError(`There was an error while uploading the document: ${error.error.document}`)) + this.toastService.showToast(Toast.makeError($localize`There was an error while uploading the document: ${error.error.document}`)) break; } default: { - this.toastService.showToast(Toast.makeError("An error has occurred while uploading the document. Sorry!")) + this.toastService.showToast(Toast.makeError($localize`An error has occurred while uploading the document. Sorry!`)) break; } } diff --git a/src-ui/src/app/components/dashboard/widgets/welcome-widget/welcome-widget.component.html b/src-ui/src/app/components/dashboard/widgets/welcome-widget/welcome-widget.component.html index 0caf55f11..6c9c34d5b 100644 --- a/src-ui/src/app/components/dashboard/widgets/welcome-widget/welcome-widget.component.html +++ b/src-ui/src/app/components/dashboard/widgets/welcome-widget/welcome-widget.component.html @@ -1,16 +1,16 @@ - + -

Paperless is running! :)

-

You can start uploading documents by dropping them in the file upload box to the right or by dropping them in the configured consumption folder and they'll start showing up in the documents list. +

Paperless is running! :)

+

You can start uploading documents by dropping them in the file upload box to the right or by dropping them in the configured consumption folder and they'll start showing up in the documents list. After you've added some metadata to your documents, use the filtering mechanisms of paperless to create custom views (such as 'Recently added', 'Tagged TODO') and have them displayed on the dashboard instead of this message.

-

Paperless offers some more features that try to make your life easier, such as:

+

Paperless offers some more features that try to make your life easier, such as:

    -
  • Once you've got a couple documents in paperless and added metadata to them, paperless can assign that metadata to new documents automatically.
  • -
  • You can configure paperless to read your mails and add documents from attached files.
  • +
  • Once you've got a couple documents in paperless and added metadata to them, paperless can assign that metadata to new documents automatically.
  • +
  • You can configure paperless to read your mails and add documents from attached files.
-

Consult the documentation on how to use these features. The section on basic usage also has some information on how to use paperless in general.

+

Consult the documentation on how to use these features. The section on basic usage also has some information on how to use paperless in general.

\ No newline at end of file diff --git a/src-ui/src/app/components/document-detail/document-detail.component.html b/src-ui/src/app/components/document-detail/document-detail.component.html index 228264378..f569c1033 100644 --- a/src-ui/src/app/components/document-detail/document-detail.component.html +++ b/src-ui/src/app/components/document-detail/document-detail.component.html @@ -1,19 +1,18 @@
-
Page
+
Page
-
of {{previewNumPages}}
+
of {{previewNumPages}}
@@ -21,14 +20,13 @@ - - Download +  Download @@ -37,15 +35,13 @@ @@ -57,27 +53,27 @@
CreatedTitleCreatedTitle
- + - + - + - + - + - + - + - +
Date modifiedDate modified {{document.modified | date:'medium'}}
Date addedDate added {{document.added | date:'medium'}}
Media filenameMedia filename {{metadata?.media_filename}}
Original MD5 ChecksumOriginal MD5 checksum {{metadata?.original_checksum}}
Original file sizeOriginal file size {{metadata?.original_size | fileSize}}
Original mime typeOriginal mime type {{metadata?.original_mime_type}}
Archive MD5 ChecksumArchive MD5 checksum {{metadata?.archive_checksum}}
Archive file sizeArchive file size {{metadata?.archive_size | fileSize}}
- - + + @@ -135,10 +131,9 @@
-   -   -   +   +   +   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 d705c3176..2efd32f27 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 @@ -158,11 +158,11 @@ export class DocumentDetailComponent implements OnInit { delete() { let modal = this.modalService.open(ConfirmDialogComponent, {backdrop: 'static'}) - modal.componentInstance.title = "Confirm delete" - modal.componentInstance.messageBold = `Do you really want to delete document '${this.document.title}'?` - modal.componentInstance.message = `The files for this document will be deleted permanently. This operation cannot be undone.` + modal.componentInstance.title = $localize`Confirm delete` + modal.componentInstance.messageBold = $localize`Do you really want to delete document '${this.document.title}'?` + modal.componentInstance.message = $localize`The files for this document will be deleted permanently. This operation cannot be undone.` modal.componentInstance.btnClass = "btn-danger" - modal.componentInstance.btnCaption = "Delete document" + modal.componentInstance.btnCaption = $localize`Delete document` modal.componentInstance.confirmClicked.subscribe(() => { this.documentsService.delete(this.document).subscribe(() => { modal.close() 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 5bf0c9af2..ac015cc52 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 @@ -1,7 +1,15 @@ -
+
-
- +
+ + +
+
+ + +
+
+
@@ -9,11 +17,11 @@
- {{(document.correspondent$ | async)?.name}} + {{(document.correspondent$ | async)?.name}} {{(document.correspondent$ | async)?.name}}: {{document.title | documentTitle}} - +
#{{document.archive_serial_number}}
@@ -28,37 +36,33 @@ - - More like this +  More like this - - Edit +  Edit - - View +  View - - Download +  Download
- Score: + Score: - Created: {{document.created | date}} + Created: {{document.created | date}}
diff --git a/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.scss b/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.scss index a20a56672..eb744d2af 100644 --- a/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.scss +++ b/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.scss @@ -1,5 +1,6 @@ +@import "/src/theme"; + .result-content { - color: darkgray; overflow-wrap: anywhere; } @@ -8,11 +9,31 @@ object-position: top; height: 100%; position: absolute; - + mix-blend-mode: multiply; } .search-score-bar { width: 100px; height: 5px; margin-top: 2px; +} + +.document-card-check { + display: none +} + +.document-card:hover .document-card-check { + display: block; +} + +.card-selected { + border-color: $primary; +} + +.doc-img-background { + background-color: white; +} + +.doc-img-background-selected { + background-color: $primaryFaded; } \ No newline at end of file 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 bcc1b1f3c..336af41da 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 @@ -12,6 +12,25 @@ export class DocumentCardLargeComponent implements OnInit { constructor(private documentService: DocumentService, private sanitizer: DomSanitizer) { } + _selected = false + + get selected() { + return this._selected + } + + @Input() + set selected(value: boolean) { + this._selected = value + this.selectedChange.emit(value) + } + + @Output() + selectedChange = new EventEmitter() + + get selectable() { + return this.selectedChange.observers.length > 0 + } + @Input() moreLikeThis: boolean = false 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 da0829349..4fd155559 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 @@ -1,10 +1,18 @@ -
-
-
- +
+
+
+ + +
+
+ + +
+
+
- +
+ {{moreTags}} @@ -15,7 +23,7 @@

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

@@ -24,18 +32,18 @@
- + - + - + diff --git a/src-ui/src/app/components/document-list/document-card-small/document-card-small.component.scss b/src-ui/src/app/components/document-list/document-card-small/document-card-small.component.scss index 0068667d0..36db2203c 100644 --- a/src-ui/src/app/components/document-list/document-card-small/document-card-small.component.scss +++ b/src-ui/src/app/components/document-list/document-card-small/document-card-small.component.scss @@ -1,5 +1,24 @@ +@import "/src/theme"; + .doc-img { object-fit: cover; object-position: top; height: 200px; + mix-blend-mode: multiply; +} + +.document-card-check { + display: none +} + +.document-card:hover .document-card-check { + display: block; +} + +.card-selected { + border-color: $primary; +} + +.doc-img-background-selected { + background-color: $primaryFaded; } \ No newline at end of file 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 d87eb4331..6b7f86614 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 @@ -12,6 +12,21 @@ export class DocumentCardSmallComponent implements OnInit { constructor(private documentService: DocumentService) { } + _selected = false + + get selected() { + return this._selected + } + + @Input() + set selected(value: boolean) { + this._selected = value + this.selectedChange.emit(value) + } + + @Output() + selectedChange = new EventEmitter() + @Input() document: PaperlessDocument 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 9657f35e3..888639b5e 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 @@ -1,4 +1,28 @@ + +
+ +
+ + + + + + + + + + + + +
+
+