Skip to content

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

Apply suggestions from code review

GruberViktor6cbbd0c5150f
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 ff2e30d6e..19403b9e4 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
@@ -34,22 +34,22 @@
</svg>&nbsp;<span class="d-none d-lg-inline" i18n>More like this</span>
</button>
- <button type="button" class="btn btn-sm btn-outline-primary me-2" (click)="close()">
+ <button type="button" class="btn btn-sm btn-outline-primary me-2" i18n-title title="Close" (click)="close()">
<svg class="buttonicon" fill="currentColor">
<use xlink:href="assets/bootstrap-icons.svg#x" />
</svg>&nbsp;<span class="d-none d-lg-inline" i18n>Close</span>
</button>
<div class="button-group">
- <button type="button" class="btn btn-sm btn-outline-primary me-2" (click)="previousDoc()" [disabled]="!hasPrevious()">
+ <button type="button" class="btn btn-sm btn-outline-primary me-2" i18n-title title="Previous" (click)="previousDoc()" [disabled]="!hasPrevious()">
<svg class="buttonicon" fill="currentColor">
<use xlink:href="assets/bootstrap-icons.svg#arrow-left" />
- </svg>&nbsp;
+ </svg>
</button>
- <button type="button" class="btn btn-sm btn-outline-primary" (click)="nextDoc()" [disabled]="!hasNext()">
+ <button type="button" class="btn btn-sm btn-outline-primary" i18n-title title="Next" (click)="nextDoc()" [disabled]="!hasNext()">
<svg class="buttonicon" fill="currentColor">
<use xlink:href="assets/bootstrap-icons.svg#arrow-right" />
- </svg>&nbsp;
+ </svg>
</button>
</div>
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 70d8a19df..4455520f6 100644
--- a/src-ui/src/app/services/document-list-view.service.ts
+++ b/src-ui/src/app/services/document-list-view.service.ts
@@ -265,7 +265,7 @@ export class DocumentListViewService {
hasPrevious(doc: number) {
if (this.documents) {
let index = this.documents.findIndex(d => d.id == doc)
- return !(index == 0 && this.currentPage == 1)
+ return index != -1 && !(index == 0 && this.currentPage == 1)
}
}