2022-05-12 20:34:32 -07:00
< app-page-header title = "{{ typeNamePlural | titlecase }}" >
2022-12-17 20:09:29 -08:00
< button type = "button" class = "btn btn-sm btn-outline-primary" ( click ) = " openCreateDialog ( ) " * appIfPermissions = "{ action: PermissionAction.Add, type: permissionType }" i18n > Create< / button >
2020-10-27 01:10:18 +01:00
< / app-page-header >
2021-01-19 14:00:15 +01:00
< div class = "row" >
< div class = "col-md mb-2 mb-xl-0" >
< div class = "form-inline d-flex align-items-center" >
2022-02-20 01:21:30 +01:00
< label class = "text-muted me-2 mb-0" i18n > Filter by:< / label >
2022-03-07 09:45:58 -08:00
< input class = "form-control form-control-sm flex-fill w-auto" type = "text" autofocus [ ( ngModel ) ] = " nameFilter " ( keyup ) = " onNameFilterKeyUp ( $ event ) " placeholder = "Name" i18n-placeholder >
2021-01-19 14:00:15 +01:00
< / div >
< / div >
2023-02-06 11:21:10 +01:00
< ngb-pagination class = "col-auto" [ pageSize ] = " 25 " [ collectionSize ] = " collectionSize " [ ( page ) ] = " page " [ maxSize ] = " 5 " ( pageChange ) = " reloadData ( ) " aria-label = "Default pagination" > < / ngb-pagination >
2020-11-22 20:00:58 +01:00
< / div >
2020-10-27 01:10:18 +01:00
2022-02-19 23:48:49 -08:00
< table class = "table table-striped align-middle border shadow-sm" >
2020-10-27 01:10:18 +01:00
< thead >
< tr >
2022-12-15 22:48:16 -08:00
< th scope = "col" appSortable = "name" [ currentSortField ] = " sortField " [ currentSortReverse ] = " sortReverse " ( sort ) = " onSort ( $ event ) " i18n > Name< / th >
< th scope = "col" class = "d-none d-sm-table-cell" appSortable = "matching_algorithm" [ currentSortField ] = " sortField " [ currentSortReverse ] = " sortReverse " ( sort ) = " onSort ( $ event ) " i18n > Matching< / th >
< th scope = "col" appSortable = "document_count" [ currentSortField ] = " sortField " [ currentSortReverse ] = " sortReverse " ( sort ) = " onSort ( $ event ) " i18n > Document count< / th >
< th scope = "col" * ngFor = "let column of extraColumns" appSortable = "{{column.key}}" [ currentSortField ] = " sortField " [ currentSortReverse ] = " sortReverse " ( sort ) = " onSort ( $ event ) " > {{column.name}}< / th >
2020-12-23 15:09:39 +01:00
< th scope = "col" i18n > Actions< / th >
2020-10-27 01:10:18 +01:00
< / tr >
< / thead >
< tbody >
2022-03-22 22:01:46 -07:00
< tr * ngFor = "let object of data" >
< td scope = "row" > {{ object.name }}< / td >
2022-05-03 13:00:42 -07:00
< td scope = "row" class = "d-none d-sm-table-cell" > {{ getMatching(object) }}< / td >
2022-03-22 22:01:46 -07:00
< td scope = "row" > {{ object.document_count }}< / td >
< td scope = "row" * ngFor = "let column of extraColumns" >
< div * ngIf = "column.rendersHtml; else colValue" [ innerHtml ] = " column . valueFn . call ( null , object ) | safeHtml " > < / div >
< ng-template # colValue > {{ column.valueFn.call(null, object) }}< / ng-template >
< / td >
2020-10-27 01:10:18 +01:00
< td scope = "row" >
2022-05-03 13:00:42 -07:00
< div class = "btn-group d-block d-sm-none" >
< div ngbDropdown class = "d-inline-block" >
< button type = "button" class = "btn btn-link" id = "actionsMenuMobile" ngbDropdownToggle >
< svg class = "toolbaricon" fill = "currentColor" >
< use xlink:href = "assets/bootstrap-icons.svg#three-dots-vertical" / >
< / svg >
< / button >
< div ngbDropdownMenu aria-labelledby = "actionsMenuMobile" >
2022-12-17 20:09:29 -08:00
< button ( click ) = " filterDocuments ( object ) " * appIfPermissions = "{ action: PermissionAction.View, type: PermissionType.Document }" ngbDropdownItem i18n > Filter Documents< / button >
< button ( click ) = " openEditDialog ( object ) " * appIfPermissions = "{ action: PermissionAction.Change, type: permissionType }" ngbDropdownItem i18n > Edit< / button >
< button class = "text-danger" ( click ) = " openDeleteDialog ( object ) " * appIfPermissions = "{ action: PermissionAction.Delete, type: permissionType }" ngbDropdownItem i18n > Delete< / button >
2022-05-03 13:00:42 -07:00
< / div >
< / div >
< / div >
< div class = "btn-group d-none d-sm-block" >
2022-12-17 20:09:29 -08:00
< button class = "btn btn-sm btn-outline-secondary" ( click ) = " filterDocuments ( object ) " * appIfPermissions = "{ action: PermissionAction.View, type: PermissionType.Document }" >
2020-12-16 02:12:58 +01:00
< svg xmlns = "http://www.w3.org/2000/svg" width = "16" height = "16" fill = "currentColor" class = "bi bi-funnel" viewBox = "0 0 16 16" >
< path fill-rule = "evenodd" d = "M1.5 1.5A.5.5 0 0 1 2 1h12a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-.128.334L10 8.692V13.5a.5.5 0 0 1-.342.474l-3 1A.5.5 0 0 1 6 14.5V8.692L1.628 3.834A.5.5 0 0 1 1.5 3.5v-2zm1 .5v1.308l4.372 4.858A.5.5 0 0 1 7 8.5v5.306l2-.666V8.5a.5.5 0 0 1 .128-.334L13.5 3.308V2h-11z" / >
2020-12-23 15:09:39 +01:00
< / svg > < ng-container i18n > Documents< / ng-container >
2020-12-16 02:12:58 +01:00
< / button >
2022-12-17 20:09:29 -08:00
< button class = "btn btn-sm btn-outline-secondary" ( click ) = " openEditDialog ( object ) " * appIfPermissions = "{ action: PermissionAction.Change, type: permissionType }" [ disabled ] = " ! userCanEdit ( object ) " >
2020-12-16 02:12:58 +01:00
< svg width = "1em" height = "1em" viewBox = "0 0 16 16" class = "bi bi-pencil" fill = "currentColor" xmlns = "http://www.w3.org/2000/svg" >
< path fill-rule = "evenodd" d = "M12.146.146a.5.5 0 0 1 .708 0l3 3a.5.5 0 0 1 0 .708l-10 10a.5.5 0 0 1-.168.11l-5 2a.5.5 0 0 1-.65-.65l2-5a.5.5 0 0 1 .11-.168l10-10zM11.207 2.5L13.5 4.793 14.793 3.5 12.5 1.207 11.207 2.5zm1.586 3L10.5 3.207 4 9.707V10h.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.5h.293l6.5-6.5zm-9.761 5.175l-.106.106-1.528 3.821 3.821-1.528.106-.106A.5.5 0 0 1 5 12.5V12h-.5a.5.5 0 0 1-.5-.5V11h-.5a.5.5 0 0 1-.468-.325z" / >
2020-12-23 15:09:39 +01:00
< / svg > < ng-container i18n > Edit< / ng-container >
2020-12-16 02:12:58 +01:00
< / button >
2022-12-17 20:09:29 -08:00
< button class = "btn btn-sm btn-outline-danger" ( click ) = " openDeleteDialog ( object ) " * appIfPermissions = "{ action: PermissionAction.Delete, type: permissionType }" [ disabled ] = " ! userCanDelete ( object ) " >
2020-12-16 02:12:58 +01:00
< svg xmlns = "http://www.w3.org/2000/svg" width = "16" height = "16" fill = "currentColor" class = "bi bi-trash" viewBox = "0 0 16 16" >
< path d = "M5.5 5.5A.5.5 0 0 1 6 6v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5zm2.5 0a.5.5 0 0 1 .5.5v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5zm3 .5a.5.5 0 0 0-1 0v6a.5.5 0 0 0 1 0V6z" / >
< path fill-rule = "evenodd" d = "M14.5 3a1 1 0 0 1-1 1H13v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V4h-.5a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1H6a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1h3.5a1 1 0 0 1 1 1v1zM4.118 4L4 4.059V13a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V4.059L11.882 4H4.118zM2.5 3V2h11v1h-11z" / >
2020-12-23 15:09:39 +01:00
< / svg > < ng-container i18n > Delete< / ng-container >
2020-12-16 02:12:58 +01:00
< / button >
2020-10-27 01:10:18 +01:00
< / div >
< / td >
< / tr >
< / tbody >
2021-06-13 10:48:46 -04:00
< / table >
2022-03-15 10:17:19 -07:00
< div class = "d-flex" >
2022-05-12 20:34:32 -07:00
< div i18n * ngIf = "collectionSize > 0" > {collectionSize, plural, =1 {One {{typeName}}} other {{{collectionSize || 0}} total {{typeNamePlural}}}}< / div >
2023-02-06 11:21:10 +01:00
< ngb-pagination * ngIf = "collectionSize > 20" class = "ms-auto" [ pageSize ] = " 25 " [ collectionSize ] = " collectionSize " [ ( page ) ] = " page " [ maxSize ] = " 5 " ( pageChange ) = " reloadData ( ) " aria-label = "Default pagination" > < / ngb-pagination >
2022-03-15 10:17:19 -07:00
< / div >