Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
37 changed files
with
3,823 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
src/app/+admin/admin-access-control/admin-access-control-routing.module.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { RouterModule } from '@angular/router'; | ||
import { EPeopleRegistryComponent } from './epeople-registry/epeople-registry.component'; | ||
import { GroupFormComponent } from './group-registry/group-form/group-form.component'; | ||
import { GroupsRegistryComponent } from './group-registry/groups-registry.component'; | ||
|
||
@NgModule({ | ||
imports: [ | ||
RouterModule.forChild([ | ||
{ path: 'epeople', component: EPeopleRegistryComponent, data: { title: 'admin.access-control.epeople.title' } }, | ||
{ path: 'groups', component: GroupsRegistryComponent, data: { title: 'admin.access-control.groups.title' } }, | ||
{ | ||
path: 'groups/:groupId', | ||
component: GroupFormComponent, | ||
data: {title: 'admin.registries.schema.title'} | ||
}, | ||
{ | ||
path: 'groups/newGroup', | ||
component: GroupFormComponent, | ||
data: {title: 'admin.registries.schema.title'} | ||
}, | ||
]) | ||
] | ||
}) | ||
/** | ||
* Routing module for the AccessControl section of the admin sidebar | ||
*/ | ||
export class AdminAccessControlRoutingModule { | ||
|
||
} |
37 changes: 37 additions & 0 deletions
37
src/app/+admin/admin-access-control/admin-access-control.module.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import { CommonModule } from '@angular/common'; | ||
import { NgModule } from '@angular/core'; | ||
import { RouterModule } from '@angular/router'; | ||
import { TranslateModule } from '@ngx-translate/core'; | ||
import { SharedModule } from '../../shared/shared.module'; | ||
import { AdminAccessControlRoutingModule } from './admin-access-control-routing.module'; | ||
import { EPeopleRegistryComponent } from './epeople-registry/epeople-registry.component'; | ||
import { EPersonFormComponent } from './epeople-registry/eperson-form/eperson-form.component'; | ||
import { GroupFormComponent } from './group-registry/group-form/group-form.component'; | ||
import { MembersListComponent } from './group-registry/group-form/members-list/members-list.component'; | ||
import { SubgroupsListComponent } from './group-registry/group-form/subgroup-list/subgroups-list.component'; | ||
import { GroupsRegistryComponent } from './group-registry/groups-registry.component'; | ||
|
||
@NgModule({ | ||
imports: [ | ||
CommonModule, | ||
SharedModule, | ||
RouterModule, | ||
TranslateModule, | ||
AdminAccessControlRoutingModule | ||
], | ||
declarations: [ | ||
EPeopleRegistryComponent, | ||
EPersonFormComponent, | ||
GroupsRegistryComponent, | ||
GroupFormComponent, | ||
SubgroupsListComponent, | ||
MembersListComponent | ||
], | ||
entryComponents: [] | ||
}) | ||
/** | ||
* This module handles all components related to the access control pages | ||
*/ | ||
export class AdminAccessControlModule { | ||
|
||
} |
49 changes: 49 additions & 0 deletions
49
src/app/+admin/admin-access-control/epeople-registry/epeople-registry.actions.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
import { Action } from '@ngrx/store'; | ||
import { EPerson } from '../../../core/eperson/models/eperson.model'; | ||
import { type } from '../../../shared/ngrx/type'; | ||
|
||
/** | ||
* For each action type in an action group, make a simple | ||
* enum object for all of this group's action types. | ||
* | ||
* The 'type' utility function coerces strings into string | ||
* literal types and runs a simple check to guarantee all | ||
* action types in the application are unique. | ||
*/ | ||
export const EPeopleRegistryActionTypes = { | ||
|
||
EDIT_EPERSON: type('dspace/epeople-registry/EDIT_EPERSON'), | ||
CANCEL_EDIT_EPERSON: type('dspace/epeople-registry/CANCEL_EDIT_EPERSON'), | ||
}; | ||
|
||
/* tslint:disable:max-classes-per-file */ | ||
/** | ||
* Used to edit an EPerson in the EPeople registry | ||
*/ | ||
export class EPeopleRegistryEditEPersonAction implements Action { | ||
type = EPeopleRegistryActionTypes.EDIT_EPERSON; | ||
|
||
eperson: EPerson; | ||
|
||
constructor(eperson: EPerson) { | ||
this.eperson = eperson; | ||
} | ||
} | ||
|
||
/** | ||
* Used to cancel the editing of an EPerson in the EPeople registry | ||
*/ | ||
export class EPeopleRegistryCancelEPersonAction implements Action { | ||
type = EPeopleRegistryActionTypes.CANCEL_EDIT_EPERSON; | ||
} | ||
|
||
/* tslint:enable:max-classes-per-file */ | ||
|
||
/** | ||
* Export a type alias of all actions in this action group | ||
* so that reducers can easily compose action types | ||
* These are all the actions to perform on the EPeople registry state | ||
*/ | ||
export type EPeopleRegistryAction | ||
= EPeopleRegistryEditEPersonAction | ||
| EPeopleRegistryCancelEPersonAction |
Oops, something went wrong.