import {AdminLocalSplashComponent} from './admin-local-splash.component';
import {AddressAlertComponent} from './address-alert.component';
import {AdminCarouselComponent} from './admin-carousel.component';
-import {OpenAthensIdentityComponent} from './openathens-identity.component';
import {ClonePortalEntriesDialogComponent} from './staff_portal_page/clone-portal-entries-dialog.component';
import {AdminStaffPortalPageComponent} from './staff_portal_page/staff-portal-page.component';
import {StandingPenaltyComponent} from './standing-penalty.component';
AdminCarouselComponent,
StandingPenaltyComponent,
ClonePortalEntriesDialogComponent,
- AdminStaffPortalPageComponent,
- OpenAthensIdentityComponent
+ AdminStaffPortalPageComponent
],
imports: [
AdminCommonModule,
+++ /dev/null
-<ng-template #successStrTmpl i18n>{{idlClassDef.label}} Update Succeeded</ng-template>
-<eg-string #successString [template]="successStrTmpl"></eg-string>
-
-<ng-template #updateFailedStrTmpl i18n>Update of {{idlClassDef.label}} failed</ng-template>
-<eg-string #updateFailedString [template]="updateFailedStrTmpl"></eg-string>
-
-<ng-template #deleteFailedStrTmpl i18n>Delete of {{idlClassDef.label}} failed or was not allowed</ng-template>
-<eg-string #deleteFailedString [template]="deleteFailedStrTmpl"></eg-string>
-
-<ng-template #deleteSuccessStrTmpl i18n>{{idlClassDef.label}} Successfully Deleted</ng-template>
-<eg-string #deleteSuccessString [template]="deleteSuccessStrTmpl"></eg-string>
-
-<ng-template #createStrTmpl i18n>{{idlClassDef.label}} Succeessfully Created</ng-template>
-<eg-string #createString [template]="createStrTmpl"></eg-string>
-
-<ng-template #createErrStrTmpl i18n>Failed to create new {{idlClassDef.label}}</ng-template>
-<eg-string #createErrString [template]="createErrStrTmpl"></eg-string>
-
-<eg-title i18n-prefix prefix="{{classLabel}} Administration">
-</eg-title>
-<eg-staff-banner bannerText="{{classLabel}} Configuration" i18n-bannerText>
-</eg-staff-banner>
-
-<ng-container *ngIf="orgField">
- <eg-org-family-select
- [limitPerms]="viewPerms"
- [selectedOrgId]="contextOrg.id()"
- [(ngModel)]="searchOrgs"
- (ngModelChange)="grid.reload()">
- </eg-org-family-select>
- <hr/>
-</ng-container>
-
-<eg-grid #grid idlClass="{{idlClass}}" [dataSource]="dataSource"
- [sortable]="true" persistKey="{{persistKey}}" [showLinkSelectors]="true">
- <eg-grid-toolbar-button [disabled]="!canCreate"
- label="New {{idlClassDef.label}}" i18n-label (onClick)="createNew()">
- </eg-grid-toolbar-button>
- <eg-grid-toolbar-button [disabled]="translatableFields.length == 0"
- label="Apply Translations" i18n-label [action]="translate">
- </eg-grid-toolbar-button>
- <eg-grid-toolbar-action label="Edit Selected" i18n-label (onClick)="editSelected($event)">
- </eg-grid-toolbar-action>
- <eg-grid-toolbar-action label="Delete Selected" i18n-label (onClick)="deleteSelected($event)">
- </eg-grid-toolbar-action>
-</eg-grid>
-
-<ng-template #orgTemplate
- let-field="field" let-record="record">
- <eg-multi-select idlClass="aou"
- [startValue]="record['owning_lib_filter']()"
- (onChange)="record['owning_lib_filter']($event)">
- </eg-multi-select>
-</ng-template>
-
-<eg-fm-record-editor #editDialog
- idlClass="{{idlClass}}"
- [preloadLinkedValues]="true"
- [fieldOptions]="{owning_lib_filter:{customTemplate:{template:orgTemplate}}}"
- fieldOrder="id,org_unit,active,api_key,connection_id,connection_uri,auto_signon_enabled,auto_signout_enabled,unique_identifier,display_name,release_prefix,release_first_given_name,release_second_given_name,release_family_name,release_suffix,release_email,release_home_ou,release_barcode"
-></eg-fm-record-editor>
+++ /dev/null
-import {Component, OnInit} from '@angular/core';
-import {Location} from '@angular/common';
-import {ActivatedRoute} from '@angular/router';
-import {FormatService} from '@eg/core/format.service';
-import {AdminPageComponent} from '@eg/staff/share/admin-page/admin-page.component';
-import {IdlService, IdlObject} from '@eg/core/idl.service';
-import {PcrudService} from '@eg/core/pcrud.service';
-import {OrgService} from '@eg/core/org.service';
-import {PermService} from '@eg/core/perm.service';
-import {AuthService} from '@eg/core/auth.service';
-import {ToastService} from '@eg/share/toast/toast.service';
-
-@Component({
- templateUrl: './openathens-identity.component.html'
-})
-export class OpenAthensIdentityComponent extends AdminPageComponent implements OnInit {
-
- idlClass = 'coai';
- classLabel: string;
-
- constructor(
- route: ActivatedRoute,
- ngLocation: Location,
- format: FormatService,
- idl: IdlService,
- org: OrgService,
- auth: AuthService,
- pcrud: PcrudService,
- perm: PermService,
- toast: ToastService,
- ) {
- super(route, ngLocation, format, idl, org, auth, pcrud, perm, toast);
- }
-
- ngOnInit() {
- super.ngOnInit();
-
- this.classLabel = this.idlClassDef.label;
- this.includeOrgDescendants = true;
- }
-
- createNew = () => {
- this.editDialog.recordId = null;
- this.editDialog.record = null;
-
- const rec = this.idl.create('coai');
- rec.active(true);
- rec.auto_signon_enabled(true);
- rec.unique_identifier(1);
- rec.display_name(1);
- this.editDialog.record = rec;
-
- this.editDialog.open({size: this.dialogSize}).subscribe(
- ok => {
- this.createString.current()
- .then(str => this.toast.success(str));
- this.grid.reload();
- },
- rejection => {
- if (!rejection.dismissed) {
- this.createErrString.current()
- .then(str => this.toast.danger(str));
- }
- }
- );
- }
-
- deleteSelected = (entries: IdlObject[]) => {
- super.deleteSelected(entries);
- }
-}
import {BasicAdminPageComponent} from '@eg/staff/admin/basic-admin-page.component';
import {AddressAlertComponent} from './address-alert.component';
import {AdminCarouselComponent} from './admin-carousel.component';
-import {OpenAthensIdentityComponent} from './openathens-identity.component';
import {AdminStaffPortalPageComponent} from './staff_portal_page/staff-portal-page.component';
import {StandingPenaltyComponent} from './standing-penalty.component';
import {CourseTermMapComponent} from './course-reserves/course-term-map.component';
import('./circ_limit_set/circ_limit_set.module').then(m => m.CircLimitSetModule)
}, {
path: 'config/openathens_identity',
- component: OpenAthensIdentityComponent
+ component: BasicAdminPageComponent,
+ data: [{
+ schema: 'config',
+ table: 'openathens_identity',
+ fieldOrder: 'id,org_unit,active,api_key,connection_id,connection_uri,auto_signon_enabled,auto_signout_enabled,' +
+ 'unique_identifier,display_name,release_prefix,release_first_given_name,release_second_given_name,' +
+ 'release_family_name,release_suffix,release_email,release_home_ou,release_barcode',
+ defaultNewRecord: {
+ active: true,
+ auto_signon_enabled: true,
+ unique_identifier: 1,
+ display_name: 1
+ }
+ }]
}, {
path: 'config/standing_penalty',
component: StandingPenaltyComponent