2020-11-08 00:07:31 +01:00
< app-page-header [ title ] = " getTitle ( ) " >
2020-10-27 01:10:18 +01:00
2021-01-11 12:52:42 -08:00
< div ngbDropdown class = "mr-2 flex-fill d-flex" >
< button class = "btn btn-sm btn-outline-primary flex-fill" id = "dropdownSelect" ngbDropdownToggle >
2021-01-11 16:15:55 -08:00
< svg class = "toolbaricon" fill = "currentColor" >
2020-11-29 16:33:33 +01:00
< use xlink:href = "assets/bootstrap-icons.svg#text-indent-left" / >
2021-01-11 12:52:42 -08:00
< / svg > < ng-container i18n > Select< / ng-container >
2020-11-29 16:33:33 +01:00
< / button >
2020-12-14 23:14:19 -08:00
< div ngbDropdownMenu aria-labelledby = "dropdownSelect" class = "shadow" >
2020-12-28 15:39:53 +01:00
< button ngbDropdownItem ( click ) = " list . selectNone ( ) " i18n > Select none< / button >
< button ngbDropdownItem ( click ) = " list . selectPage ( ) " i18n > Select page< / button >
< button ngbDropdownItem ( click ) = " list . selectAll ( ) " i18n > Select all< / button >
2020-11-29 16:33:33 +01:00
< / div >
< / div >
2021-01-11 12:52:42 -08:00
< div class = "btn-group btn-group-toggle flex-fill" 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-12-08 23:08:02 -08:00
2021-01-11 12:52:42 -08:00
< div ngbDropdown class = "btn-group ml-2 flex-fill" >
< button class = "btn btn-outline-primary btn-sm" id = "dropdownBasic1" ngbDropdownToggle i18n > Sort< / button >
< div ngbDropdownMenu aria-labelledby = "dropdownBasic1" class = "shadow dropdown-menu-right" >
< div class = "w-100 d-flex btn-group-toggle pb-2 mb-1 border-bottom" ngbRadioGroup [ ( ngModel ) ] = " list . sortReverse " >
< label ngbButtonLabel class = "btn-outline-primary btn-sm mx-2 flex-fill" >
< input ngbButton type = "radio" class = "btn btn-sm" [ value ] = " false " >
< svg class = "toolbaricon" fill = "currentColor" >
< use xlink:href = "assets/bootstrap-icons.svg#sort-alpha-down" / >
< / svg >
< / label >
< label ngbButtonLabel class = "btn-outline-primary btn-sm mr-2 flex-fill" >
< input ngbButton type = "radio" class = "btn btn-sm" [ value ] = " true " >
< svg class = "toolbaricon" fill = "currentColor" >
< use xlink:href = "assets/bootstrap-icons.svg#sort-alpha-up-alt" / >
< / svg >
< / label >
< / div >
< div >
< 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 >
< / div >
2020-10-30 22:46:43 +01:00
2021-01-11 12:52:42 -08:00
< div class = "btn-group ml-2 flex-fill" ngbDropdown role = "group" >
< button class = "btn btn-sm btn-outline-primary dropdown-toggle flex-fill" ngbDropdownToggle i18n > Views< / button >
< div class = "dropdown-menu shadow dropdown-menu-right" ngbDropdownMenu >
2021-02-18 17:29:21 +01:00
< ng-container * ngIf = "!list.activeSavedViewId" >
2021-01-11 12:52:42 -08:00
< button ngbDropdownItem * ngFor = "let view of savedViewService.allViews" ( click ) = " loadViewConfig ( view ) " > {{view.name}}< / button >
< div class = "dropdown-divider" * ngIf = "savedViewService.allViews.length > 0" > < / div >
< / ng-container >
2020-12-08 23:08:02 -08:00
2021-02-18 17:29:21 +01:00
< button ngbDropdownItem ( click ) = " saveViewConfig ( ) " * ngIf = "list.activeSavedViewId" i18n > Save "{{list.activeSavedViewTitle}}"< / button >
2021-01-11 12:52:42 -08:00
< button ngbDropdownItem ( click ) = " saveViewConfigAs ( ) " i18n > Save as...< / button >
2020-10-30 22:46:43 +01:00
< / div >
< / div >
2020-12-08 23:08:02 -08:00
2020-10-27 01:10:18 +01:00
< / app-page-header >
2020-12-18 14:55:21 -08:00
< div class = "w-100 mb-2 mb-sm-4" >
2021-01-06 07:53:48 -08:00
< app-filter-editor [ hidden ] = " isBulkEditing " [ ( filterRules ) ] = " list . filterRules " [ rulesModified ] = " filterRulesModified " ( filterRulesChange ) = " rulesChanged ( ) " ( reset ) = " resetFilters ( ) " # filterEditor > < / app-filter-editor >
2020-12-30 23:34:21 +01:00
< app-bulk-editor [ hidden ] = " ! isBulkEditing " > < / app-bulk-editor >
2020-12-18 21:19:49 -08:00
< / div >
< div class = "d-flex justify-content-between align-items-center" >
2021-01-03 23:56:13 +01:00
< p >
< span i18n * ngIf = "list.selected.size > 0" > {list.collectionSize, plural, =1 {Selected {{list.selected.size}} of one document} other {Selected {{list.selected.size}} of {{list.collectionSize || 0}} documents}}< / span >
< span i18n * ngIf = "list.selected.size == 0" > {list.collectionSize, plural, =1 {One document} other {{{list.collectionSize || 0}} documents}}< / span > < span i18n * ngIf = "isFiltered" > (filtered)< / span >
< / p >
2020-12-18 21:19:49 -08:00
< ngb-pagination [ pageSize ] = " list . currentPageSize " [ collectionSize ] = " list . collectionSize " [ ( page ) ] = " list . currentPage " [ maxSize ] = " 5 "
2021-02-18 17:29:21 +01:00
[rotate]="true" aria-label="Default pagination">< / ngb-pagination >
2020-12-14 23:14:19 -08:00
< / div >
2020-10-27 01:10:18 +01:00
< div * ngIf = "displayMode == 'largeCards'" >
2021-01-14 10:56:30 -08:00
< app-document-card-large [ selected ] = " list . isSelected ( d ) " ( toggleSelected ) = " toggleSelected ( d , $ event ) " * ngFor = "let d of list.documents; trackBy: trackByDocumentId" [ document ] = " d " [ details ] = " d . content " ( clickTag ) = " clickTag ( $ event ) " ( clickCorrespondent ) = " clickCorrespondent ( $ event ) " >
2020-10-27 01:10:18 +01:00
< / app-document-card-large >
< / div >
2020-12-09 13:44:37 +01:00
< table class = "table table-sm border shadow-sm" * ngIf = "displayMode == 'details'" >
2020-10-27 01:10:18 +01:00
< thead >
2020-12-11 14:49:22 +01:00
< th > < / th >
2021-01-04 17:08:52 +01:00
< th class = "d-none d-lg-table-cell"
sortable="archive_serial_number"
[currentSortField]="list.sortField"
[currentSortReverse]="list.sortReverse"
(sort)="onSort($event)"
2021-01-05 14:57:56 +01:00
i18n>ASN< / th >
2021-01-04 17:08:52 +01:00
< th class = "d-none d-md-table-cell"
sortable="correspondent__name"
[currentSortField]="list.sortField"
[currentSortReverse]="list.sortReverse"
(sort)="onSort($event)"
2021-01-05 14:57:56 +01:00
i18n>Correspondent< / th >
2021-01-04 17:08:52 +01:00
< th
sortable="title"
[currentSortField]="list.sortField"
[currentSortReverse]="list.sortReverse"
(sort)="onSort($event)"
2021-01-05 14:57:56 +01:00
i18n>Title< / th >
2021-01-04 17:08:52 +01:00
< th class = "d-none d-xl-table-cell"
sortable="document_type__name"
[currentSortField]="list.sortField"
[currentSortReverse]="list.sortReverse"
(sort)="onSort($event)"
2021-01-05 14:57:56 +01:00
i18n>Document type< / th >
2021-01-04 17:08:52 +01:00
< th
sortable="created"
[currentSortField]="list.sortField"
[currentSortReverse]="list.sortReverse"
(sort)="onSort($event)"
2021-01-05 14:57:56 +01:00
i18n>Created< / th >
2021-01-04 17:08:52 +01:00
< th class = "d-none d-xl-table-cell"
sortable="added"
[currentSortField]="list.sortField"
[currentSortReverse]="list.sortReverse"
(sort)="onSort($event)"
2021-01-05 14:57:56 +01:00
i18n>Added< / th >
2020-10-27 01:10:18 +01:00
< / thead >
< tbody >
2021-01-15 01:10:01 -08:00
< tr * ngFor = "let d of list.documents; trackBy: trackByDocumentId" ( click ) = " toggleSelected ( d , $ event ) " [ ngClass ] = " list . isSelected ( d ) ? ' table-row-selected ' : ' ' " >
2020-12-11 14:49:22 +01:00
< td >
< div class = "custom-control custom-checkbox" >
2021-01-14 10:56:30 -08:00
< input type = "checkbox" class = "custom-control-input" id = "docCheck{{d.id}}" [ checked ] = " list . isSelected ( d ) " ( click ) = " toggleSelected ( d , $ event ) " >
2020-12-11 14:49:22 +01:00
< label class = "custom-control-label" for = "docCheck{{d.id}}" > < / label >
< / div >
< / td >
2020-11-28 22:14:12 +01:00
< td class = "d-none d-lg-table-cell" >
{{d.archive_serial_number}}
< / td >
< td class = "d-none d-md-table-cell" >
< ng-container * ngIf = "d.correspondent" >
2021-01-15 01:10:01 -08:00
< a [ routerLink ] = " " ( click ) = " clickCorrespondent ( d . correspondent ) ; $ event . stopPropagation ( ) " title = "Filter by correspondent" > {{(d.correspondent$ | async)?.name}}< / a >
2020-11-28 22:14:12 +01:00
< / ng-container >
< / td >
< td >
2020-12-11 17:57:56 +01:00
< a routerLink = "/documents/{{d.id}}" title = "Edit document" style = "overflow-wrap: anywhere;" > {{d.title | documentTitle}}< / a >
2021-01-20 14:29:30 +01:00
< app-tag [ tag ] = " t " * ngFor = "let t of d.tags$ | async" class = "ml-1" clickable = "true" linkTitle = "Filter by tag" ( click ) = " clickTag ( t . id ) ; $ event . stopPropagation ( ) " > < / app-tag >
2020-11-28 22:14:12 +01:00
< / td >
< td class = "d-none d-xl-table-cell" >
< ng-container * ngIf = "d.document_type" >
2021-01-15 01:10:01 -08:00
< a [ routerLink ] = " " ( click ) = " clickDocumentType ( d . document_type ) ; $ event . stopPropagation ( ) " title = "Filter by document type" > {{(d.document_type$ | async)?.name}}< / a >
2020-11-28 22:14:12 +01:00
< / ng-container >
< / td >
< td >
2021-01-17 00:15:45 +01:00
{{d.created | customDate}}
2020-11-28 22:14:12 +01:00
< / td >
< td class = "d-none d-xl-table-cell" >
2021-01-17 00:15:45 +01:00
{{d.added | customDate}}
2020-11-28 22:14:12 +01:00
< / td >
2020-10-27 01:10:18 +01:00
< / tr >
< / tbody >
< / table >
2020-12-16 16:18:41 -08:00
< div class = "m-n2 row row-cols-paperless-cards" * ngIf = "displayMode == 'smallCards'" >
2021-03-11 15:54:30 -08:00
< app-document-card-small [ selected ] = " list . isSelected ( d ) " ( toggleSelected ) = " toggleSelected ( d , $ event ) " [ document ] = " d " * ngFor = "let d of list.documents; trackBy: trackByDocumentId" ( clickTag ) = " clickTag ( $ event ) " ( clickCorrespondent ) = " clickCorrespondent ( $ event ) " ( clickDocumentType ) = " clickDocumentType ( $ event ) " > < / app-document-card-small >
2020-10-27 01:10:18 +01:00
< / div >