2021-01-02 01:13:34 +01:00
< app-page-header title = "Settings" i18n-title >
2020-10-27 01:10:18 +01:00
</ app-page-header >
2020-10-30 22:46:43 +01:00
<!-- <p>items per page, documents per view type</p> -->
2020-11-04 19:28:08 +01:00
< form [ formGroup ]=" settingsForm " ( ngSubmit )=" saveSettings ()" >
< ul ngbNav # nav = "ngbNav" class = "nav-tabs" >
< li [ ngbNavItem ]=" 1 " >
2020-12-23 15:09:39 +01:00
< a ngbNavLink i18n > General settings</ a >
2020-11-04 19:28:08 +01:00
< ng-template ngbNavContent >
2020-12-27 23:05:19 -08:00
< h4 i18n > Appearance</ h4 >
2021-01-15 12:50:34 +01:00
< div class = "form-row form-group" >
< div class = "col-md-3 col-form-label" >
< span i18n > Display language</ span >
</ div >
< div class = "col" >
< select class = "form-control" formControlName = "displayLanguage" >
2021-01-17 00:15:45 +01:00
< option * ngFor = "let lang of displayLanguageOptions" [ ngValue ]=" lang . code " > {{lang.name}}< span * ngIf = "lang.code" > ({{lang.englishName}})</ span ></ option >
2021-01-15 12:50:34 +01:00
</ select >
< small class = "form-text text-muted" i18n > You need to reload the page after applying a new language.</ small >
</ div >
</ div >
2021-01-17 00:15:45 +01:00
< div class = "form-row form-group" >
< div class = "col-md-3 col-form-label" >
< span i18n > Date display</ span >
</ div >
< div class = "col" >
< select class = "form-control" formControlName = "dateLocale" >
< option * ngFor = "let lang of dateLocaleOptions" [ ngValue ]=" lang . code " > {{lang.name}}< span * ngIf = "lang.code" > ({{today | date:'shortDate':null:lang.code}})</ span ></ option >
</ select >
</ div >
</ div >
< div class = "form-row form-group" >
< div class = "col-md-3 col-form-label" >
< span i18n > Date format</ span >
</ div >
< div class = "col" >
< div class = "custom-control custom-radio" >
< input type = "radio" id = "dateFormatShort" name = "dateFormat" class = "custom-control-input" formControlName = "dateFormat" value = "shortDate" >
2021-01-17 12:14:19 +01:00
< label class = "custom-control-label" for = "dateFormatShort" i18n > Short: {{today | customDate:'shortDate':null:computedDateLocale}}</ label >
2021-01-17 00:15:45 +01:00
</ div >
< div class = "custom-control custom-radio" >
< input type = "radio" id = "dateFormatMedium" name = "dateFormat" class = "custom-control-input" formControlName = "dateFormat" value = "mediumDate" >
2021-01-17 12:14:19 +01:00
< label class = "custom-control-label" for = "dateFormatMedium" i18n > Medium: {{today | customDate:'mediumDate':null:computedDateLocale}}</ label >
2021-01-17 00:15:45 +01:00
</ div >
< div class = "custom-control custom-radio" >
< input type = "radio" id = "dateFormatLong" name = "dateFormat" class = "custom-control-input" formControlName = "dateFormat" value = "longDate" >
2021-01-17 12:14:19 +01:00
< label class = "custom-control-label" for = "dateFormatLong" i18n > Long: {{today | customDate:'longDate':null:computedDateLocale}}</ label >
2021-01-17 00:15:45 +01:00
</ div >
</ div >
</ div >
2020-11-04 19:28:08 +01:00
< div class = "form-row form-group" >
< div class = "col-md-3 col-form-label" >
2020-12-23 15:09:39 +01:00
< span i18n > Items per page</ span >
2020-11-04 19:28:08 +01:00
</ div >
< div class = "col" >
2020-12-27 23:05:19 -08:00
2020-11-04 19:28:08 +01:00
< select class = "form-control" formControlName = "documentListItemPerPage" >
< option [ ngValue ]=" 10 " > 10</ option >
< option [ ngValue ]=" 25 " > 25</ option >
< option [ ngValue ]=" 50 " > 50</ option >
< option [ ngValue ]=" 100 " > 100</ option >
</ select >
2020-12-27 23:05:19 -08:00
</ div >
</ div >
2021-01-14 13:35:21 +01:00
< div class = "form-row form-group" >
< div class = "col-md-3 col-form-label" >
< span i18n > Document editor</ span >
</ div >
< div class = "col" >
< app-input-check i18n-title title = "Use PDF viewer provided by the browser" i18n-hint hint = "This is usually faster for displaying large PDF documents, but it might not work on some browsers." formControlName = "useNativePdfViewer" ></ app-input-check >
</ div >
</ div >
2020-12-27 23:05:19 -08:00
< div class = "form-row form-group" >
< div class = "col-md-3 col-form-label" >
< span i18n > Dark mode</ span >
</ div >
< div class = "col" >
2021-01-14 13:35:21 +01:00
< app-input-check i18n-title title = "Use system settings" formControlName = "darkModeUseSystem" ></ app-input-check >
< app-input-check [ hidden ]=" settingsForm . value . darkModeUseSystem " i18n-title title = "Enable dark mode" formControlName = "darkModeEnabled" ></ app-input-check >
2020-11-04 19:28:08 +01:00
</ div >
</ div >
2020-12-29 16:58:19 -08:00
< h4 class = "mt-4" i18n > Bulk editing</ h4 >
2020-12-29 17:09:07 +01:00
2020-12-29 16:58:19 -08:00
< div class = "form-row form-group" >
< div class = "offset-md-3 col" >
< app-input-check i18n-title title = "Show confirmation dialogs" formControlName = "bulkEditConfirmationDialogs" i18n-hint hint = "Deleting documents will always ask for confirmation." ></ app-input-check >
< app-input-check i18n-title title = "Apply on close" formControlName = "bulkEditApplyOnClose" ></ app-input-check >
</ div >
</ div >
2020-12-29 17:09:07 +01:00
2020-11-04 19:28:08 +01:00
</ ng-template >
</ li >
< li [ ngbNavItem ]=" 2 " >
2020-12-23 15:09:39 +01:00
< a ngbNavLink i18n > Saved views</ a >
2020-11-04 19:28:08 +01:00
< ng-template ngbNavContent >
2020-12-15 02:35:04 +01:00
< div formGroupName = "savedViews" >
2020-12-27 23:05:19 -08:00
2020-12-15 02:35:04 +01:00
< div * ngFor = "let view of savedViews" [ formGroupName ]=" view . id " class = "form-row" >
< div class = "form-group col-4 mr-3" >
2020-12-23 15:09:39 +01:00
< label for = "name_{{view.id}}" i18n > Name</ label >
2020-12-15 02:35:04 +01:00
< input type = "text" class = "form-control" formControlName = "name" id = "name_{{view.id}}" >
</ div >
< div class = "form-group col-auto mr-3" >
2020-12-23 15:09:39 +01:00
< label for = "show_on_dashboard_{{view.id}}" i18n > Appears on</ label >
2020-12-15 02:35:04 +01:00
< div class = "custom-control custom-switch" >
< input type = "checkbox" class = "custom-control-input" id = "show_on_dashboard_{{view.id}}" formControlName = "show_on_dashboard" >
2020-12-23 15:09:39 +01:00
< label class = "custom-control-label" for = "show_on_dashboard_{{view.id}}" i18n > Show on dashboard</ label >
2020-12-15 02:35:04 +01:00
</ div >
< div class = "custom-control custom-switch" >
< input type = "checkbox" class = "custom-control-input" id = "show_in_sidebar_{{view.id}}" formControlName = "show_in_sidebar" >
2020-12-23 15:09:39 +01:00
< label class = "custom-control-label" for = "show_in_sidebar_{{view.id}}" i18n > Show in sidebar</ label >
2020-12-15 02:35:04 +01:00
</ div >
</ div >
< div class = "form-group col-auto" >
2020-12-23 15:09:39 +01:00
< label for = "name_{{view.id}}" i18n > Actions</ label >
< button type = "button" class = "btn btn-sm btn-outline-danger form-control" ( click )=" deleteSavedView ( view )" i18n > Delete</ button >
2020-12-15 02:35:04 +01:00
</ div >
</ div >
2020-12-23 15:09:39 +01:00
< div * ngIf = "savedViews.length == 0" i18n > No saved views defined.</ div >
2020-12-27 23:05:19 -08:00
2020-12-15 02:35:04 +01:00
</ div >
2020-11-04 19:28:08 +01:00
</ ng-template >
</ li >
</ ul >
2020-11-22 21:14:30 +01:00
< div [ ngbNavOutlet ]=" nav " class = "border-left border-right border-bottom p-3 mb-3 shadow" ></ div >
2020-11-04 19:28:08 +01:00
2021-01-25 19:23:03 -08:00
< button type = "submit" class = "btn btn-primary" [ disabled ]="!( isDirty $ | async )" i18n > Save</ button >
2020-12-27 23:05:19 -08:00
</ form >