Skip to content

A community-supported supercharged document management system: scan, index and archive all your documents

checboxes for small cards. does not work yet.

jonaswinklerd1d09ac6acf8
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 da469ebc4..8993674ba 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,7 +1,16 @@
-<div class="col p-2 h-100" style="width: 16rem;">
+<div class="col p-2 h-100 document-card" style="width: 16rem;">
<div class="card h-100 shadow-sm">
<div class="border-bottom">
<img class="card-img doc-img" [src]="getThumbUrl()">
+
+ <div style="top: 0; left: 0" class="position-absolute border-right border-bottom bg-light p-1" [class.document-card-check]="!selected">
+ <div class="custom-control custom-checkbox">
+ <input type="checkbox" class="custom-control-input" id="smallCardCheck{{document.id}}" [(ngModel)]="selected">
+ <label class="custom-control-label" for="smallCardCheck{{document.id}}">L</label>
+ </div>
+ </div>
+
+
<div style="top: 0; right: 0; font-size: large" class="text-right position-absolute mr-1">
<div *ngFor="let t of getTagsLimited$() | async">
<app-tag [tag]="t" (click)="clickTag.emit(t.id)" [clickable]="true" linkTitle="Filter by tag"></app-tag>
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..ba7190615 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
@@ -2,4 +2,12 @@
object-fit: cover;
object-position: top;
height: 200px;
+}
+
+.document-card-check {
+ display: none
+}
+
+.document-card:hover .document-card-check {
+ display: block;
}
\ 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 d60552d4f..037c02cf0 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
@@ -13,6 +13,8 @@ export class DocumentCardSmallComponent implements OnInit {
constructor(private documentService: DocumentService) { }
+ selected = false
+
@Input()
document: PaperlessDocument