2020-11-08 00:07:31 +01:00
< app-page-header [ title ] = " getTitle ( ) " >
2020-10-27 01:10:18 +01:00
2020-11-22 20:32:41 +01:00
< div class = "btn-group btn-group-toggle" ngbRadioGroup [ ( ngModel ) ] = " displayMode "
2020-10-30 22:46:43 +01:00
(ngModelChange)="saveDisplayMode()">
2020-11-22 16:33:26 +01:00
< label ngbButtonLabel class = "btn-outline-primary btn-sm" >
2020-10-27 01:10:18 +01:00
< input ngbButton type = "radio" class = "btn btn-sm" value = "details" >
< svg class = "toolbaricon" fill = "currentColor" >
2020-10-30 22:46:43 +01:00
< use xlink:href = "assets/bootstrap-icons.svg#list-ul" / >
2020-10-27 01:10:18 +01:00
< / svg >
< / label >
2020-11-22 16:33:26 +01:00
< label ngbButtonLabel class = "btn-outline-primary btn-sm" >
2020-10-27 01:10:18 +01:00
< input ngbButton type = "radio" class = "btn btn-sm" value = "smallCards" >
< svg class = "toolbaricon" fill = "currentColor" >
2020-10-30 22:46:43 +01:00
< use xlink:href = "assets/bootstrap-icons.svg#grid" / >
2020-10-27 01:10:18 +01:00
< / svg >
< / label >
2020-11-22 16:33:26 +01:00
< label ngbButtonLabel class = "btn-outline-primary btn-sm" >
2020-10-27 01:10:18 +01:00
< input ngbButton type = "radio" class = "btn btn-sm" value = "largeCards" >
< svg class = "toolbaricon" fill = "currentColor" >
2020-10-30 22:46:43 +01:00
< use xlink:href = "assets/bootstrap-icons.svg#hdd-stack" / >
2020-10-27 01:10:18 +01:00
< / svg >
< / label >
< / div >
2020-11-28 21:27:04 +01:00
< div class = "btn-group btn-group-toggle ml-2" ngbRadioGroup [ ( ngModel ) ] = " list . sortDirection " >
2020-10-27 01:10:18 +01:00
< div ngbDropdown class = "btn-group" >
2020-11-22 16:33:26 +01:00
< button class = "btn btn-outline-primary btn-sm" id = "dropdownBasic1" ngbDropdownToggle > Sort by< / button >
2020-10-27 01:10:18 +01:00
< div ngbDropdownMenu aria-labelledby = "dropdownBasic1" >
2020-11-28 21:27:04 +01:00
< button * ngFor = "let f of getSortFields()" ngbDropdownItem ( click ) = " list . sortField = f.field"
[class.active]="list.sortField == f.field">{{f.name}}< / button >
2020-10-27 01:10:18 +01:00
< / div >
< / div >
2020-11-22 16:33:26 +01:00
< label ngbButtonLabel class = "btn-outline-primary btn-sm" >
2020-10-27 01:10:18 +01:00
< input ngbButton type = "radio" class = "btn btn-sm" value = "asc" >
< svg class = "toolbaricon" fill = "currentColor" >
2020-10-30 22:46:43 +01:00
< use xlink:href = "assets/bootstrap-icons.svg#sort-alpha-down" / >
2020-10-27 01:10:18 +01:00
< / svg >
< / label >
2020-11-22 16:33:26 +01:00
< label ngbButtonLabel class = "btn-outline-primary btn-sm" >
2020-10-27 01:10:18 +01:00
< input ngbButton type = "radio" class = "btn btn-sm" value = "des" >
< svg class = "toolbaricon" fill = "currentColor" >
2020-10-30 22:46:43 +01:00
< use xlink:href = "assets/bootstrap-icons.svg#sort-alpha-up-alt" / >
2020-10-27 01:10:18 +01:00
< / svg >
< / label >
< / div >
2020-11-28 21:27:04 +01:00
< div class = "btn-group ml-2" >
2020-10-30 22:46:43 +01:00
2020-11-22 16:33:26 +01:00
< button type = "button" class = "btn btn-sm btn-outline-primary" ( click ) = " showFilter = !showFilter" >
2020-10-30 22:46:43 +01:00
< svg class = "toolbaricon" fill = "currentColor" >
< use xlink:href = "assets/bootstrap-icons.svg#funnel" / >
< / svg >
Filter
< / button >
< div class = "btn-group" ngbDropdown role = "group" >
2020-11-22 16:33:26 +01:00
< button class = "btn btn-sm btn-outline-primary dropdown-toggle-split" ngbDropdownToggle > < / button >
2020-10-30 22:46:43 +01:00
< div class = "dropdown-menu" ngbDropdownMenu >
2020-11-28 21:27:04 +01:00
< ng-container * ngIf = "!list.savedViewId" >
< button ngbDropdownItem * ngFor = "let config of savedViewConfigService.getConfigs()" ( click ) = " loadViewConfig ( config ) " > {{config.title}}< / button >
< div class = "dropdown-divider" * ngIf = "savedViewConfigService.getConfigs().length > 0" > < / div >
< / ng-container >
< button ngbDropdownItem ( click ) = " saveViewConfig ( ) " * ngIf = "list.savedViewId" > Save "{{list.savedViewTitle}}"< / button >
< button ngbDropdownItem ( click ) = " saveViewConfigAs ( ) " > Save as...< / button >
2020-10-30 22:46:43 +01:00
< / div >
< / div >
< / div >
2020-10-27 01:10:18 +01:00
< / app-page-header >
< div class = "card w-100 mb-3" [ hidden ] = " ! showFilter " >
< div class = "card-body" >
< h5 class = "card-title" > Filter< / h5 >
2020-10-30 22:46:43 +01:00
< app-filter-editor [ ( filterRules ) ] = " filterRules " ( apply ) = " applyFilterRules ( ) " > < / app-filter-editor >
2020-10-27 01:10:18 +01:00
< / div >
< / div >
2020-11-22 20:00:58 +01:00
< div class = "row m-0 justify-content-end" >
2020-11-28 21:27:04 +01:00
< ngb-pagination [ pageSize ] = " list . currentPageSize " [ collectionSize ] = " list . collectionSize " [ ( page ) ] = " list . currentPage " [ maxSize ] = " 5 "
[rotate]="true" (pageChange)="list.reload()" aria-label="Default pagination">< / ngb-pagination >
2020-11-22 20:00:58 +01:00
< / div >
2020-10-27 01:10:18 +01:00
< div * ngIf = "displayMode == 'largeCards'" >
2020-11-28 21:27:04 +01:00
< app-document-card-large * ngFor = "let d of list.documents" [ document ] = " d " [ details ] = " d . content " ( clickTag ) = " filterByTag ( $ event ) " ( clickCorrespondent ) = " filterByCorrespondent ( $ event ) " >
2020-10-27 01:10:18 +01:00
< / app-document-card-large >
< / div >
2020-11-22 21:14:30 +01:00
< table class = "table table-hover table-sm border shadow" * ngIf = "displayMode == 'details'" >
2020-10-27 01:10:18 +01:00
< thead >
2020-11-22 20:00:58 +01:00
< th class = "d-none d-lg-table-cell" > ASN< / th >
< th class = "d-none d-md-table-cell" > Correspondent< / th >
2020-10-27 01:10:18 +01:00
< th > Title< / th >
2020-11-22 20:00:58 +01:00
< th class = "d-none d-xl-table-cell" > Document type< / th >
2020-11-12 15:23:07 +01:00
< th > Created< / th >
2020-11-22 20:00:58 +01:00
< th class = "d-none d-xl-table-cell" > Added< / th >
2020-10-27 01:10:18 +01:00
< / thead >
< tbody >
2020-11-28 21:27:04 +01:00
< tr * ngFor = "let d of list.documents" routerLink = "/documents/{{d.id}}" >
2020-11-22 20:00:58 +01:00
< td class = "d-none d-lg-table-cell" > {{d.archive_serial_number}}< / td >
< td class = "d-none d-md-table-cell" > {{d.correspondent ? d.correspondent.name : ''}}< / td >
< td > {{d.title}}< app-tag [ tag ] = " t " * ngFor = "let t of d.tags" class = "ml-1" > < / app-tag > < / td >
< td class = "d-none d-xl-table-cell" > {{d.document_type ? d.document_type.name : ''}}< / td >
2020-10-27 01:10:18 +01:00
< td > {{d.created | date}}< / td >
2020-11-22 20:00:58 +01:00
< td class = "d-none d-xl-table-cell" > {{d.added | date}}< / td >
2020-10-27 01:10:18 +01:00
< / tr >
< / tbody >
< / table >
2020-11-22 19:30:55 +01:00
< div class = " m-n2 row" * ngIf = "displayMode == 'smallCards'" >
2020-11-28 21:27:04 +01:00
< app-document-card-small [ document ] = " d " * ngFor = "let d of list.documents" ( clickTag ) = " filterByTag ( $ event ) " ( clickCorrespondent ) = " filterByCorrespondent ( $ event ) " > < / app-document-card-small >
2020-10-27 01:10:18 +01:00
< / div >
2020-11-28 21:27:04 +01:00
< p * ngIf = "list.documents.length == 0" class = "mx-auto" > No results< / p >