Skip to content

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

a couple small changes

Jonas Winkler2d0c0247fb1e
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 1b8276c58..f7558be49 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
@@ -24,7 +24,7 @@
<div ngbDropdown class="btn-group">
<button class="btn btn-outline-secondary btn-sm" id="dropdownBasic1" ngbDropdownToggle>Sort by</button>
<div ngbDropdownMenu aria-labelledby="dropdownBasic1">
- <button *ngFor="let f of getSortFields()" ngbDropdownItem (click)="setSort(f.field)">{{f.name}}</button>
+ <button *ngFor="let f of getSortFields()" ngbDropdownItem (click)="setSort(f.field)" [class.active]="docs.currentSortField == f.field">{{f.name}}</button>
</div>
</div>
<label ngbButtonLabel class="btn-outline-secondary btn-sm">
@@ -55,7 +55,14 @@
</div>
</div>
-<ngb-pagination [pageSize]="25" [collectionSize]="docs.collectionSize" [(page)]="docs.currentPage" (pageChange)="reload()"
+<ngb-pagination
+ [pageSize]="25"
+ [collectionSize]="docs.collectionSize"
+ [(page)]="docs.currentPage"
+ [maxSize]="5"
+ [rotate]="true"
+ [boundaryLinks]="true"
+ (pageChange)="reload()"
aria-label="Default pagination"></ngb-pagination>
<div *ngIf="displayMode == 'largeCards'">
diff --git a/src-ui/src/app/components/filter-editor/filter-editor.component.html b/src-ui/src/app/components/filter-editor/filter-editor.component.html
index 19cee21c8..de65b1150 100644
--- a/src-ui/src/app/components/filter-editor/filter-editor.component.html
+++ b/src-ui/src/app/components/filter-editor/filter-editor.component.html
@@ -45,6 +45,9 @@
<div class="col-auto">
<button (click)="newRuleClicked()" class="btn btn-sm btn-outline-secondary">Add</button>
</div>
+ <div class="col-auto">
+ <button (click)="clearClicked()" class="btn btn-sm btn-outline-secondary">Clear</button>
+ </div>
<div class="col-auto">
<button (click)="applyClicked()" class="btn btn-sm btn-outline-secondary">Apply</button>
</div>
diff --git a/src-ui/src/app/components/filter-editor/filter-editor.component.ts b/src-ui/src/app/components/filter-editor/filter-editor.component.ts
index 4a5b9bd7c..a5d73a3a3 100644
--- a/src-ui/src/app/components/filter-editor/filter-editor.component.ts
+++ b/src-ui/src/app/components/filter-editor/filter-editor.component.ts
@@ -106,6 +106,11 @@ export class FilterEditorComponent implements OnInit {
this.apply.next()
}
+ clearClicked() {
+ this.ruleSet.rules.splice(0,this.ruleSet.rules.length)
+ this.apply.next()
+ }
+
ngOnInit(): void {
this.correspondentService.list().subscribe(result => {this.correspondents = result.results})
this.tagService.list().subscribe(result => this.tags = result.results)