mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-02 13:45:10 -05:00
Apply suggestions from code review
Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com>
This commit is contained in:
parent
1259911275
commit
6cbbd0c515
@ -34,22 +34,22 @@
|
|||||||
</svg> <span class="d-none d-lg-inline" i18n>More like this</span>
|
</svg> <span class="d-none d-lg-inline" i18n>More like this</span>
|
||||||
</button>
|
</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">
|
<svg class="buttonicon" fill="currentColor">
|
||||||
<use xlink:href="assets/bootstrap-icons.svg#x" />
|
<use xlink:href="assets/bootstrap-icons.svg#x" />
|
||||||
</svg> <span class="d-none d-lg-inline" i18n>Close</span>
|
</svg> <span class="d-none d-lg-inline" i18n>Close</span>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<div class="button-group">
|
<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">
|
<svg class="buttonicon" fill="currentColor">
|
||||||
<use xlink:href="assets/bootstrap-icons.svg#arrow-left" />
|
<use xlink:href="assets/bootstrap-icons.svg#arrow-left" />
|
||||||
</svg>
|
</svg>
|
||||||
</button>
|
</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">
|
<svg class="buttonicon" fill="currentColor">
|
||||||
<use xlink:href="assets/bootstrap-icons.svg#arrow-right" />
|
<use xlink:href="assets/bootstrap-icons.svg#arrow-right" />
|
||||||
</svg>
|
</svg>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -265,7 +265,7 @@ export class DocumentListViewService {
|
|||||||
hasPrevious(doc: number) {
|
hasPrevious(doc: number) {
|
||||||
if (this.documents) {
|
if (this.documents) {
|
||||||
let index = this.documents.findIndex(d => d.id == doc)
|
let index = this.documents.findIndex(d => d.id == doc)
|
||||||
return !(index == 0 && this.currentPage == 1)
|
return index != -1 && !(index == 0 && this.currentPage == 1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user