diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts
index 4e17aed31c..d0e5a3098c 100644
--- a/src/app/app-routing.module.ts
+++ b/src/app/app-routing.module.ts
@@ -1,13 +1,13 @@
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
-
-import { AuthGuard } from './main/guard/auth.guard';
+import { HintComponent } from './main/action/hint/hint.component';
+import { LoginFormComponent } from './main/action/login-form/login-form.component';
import { CookiePolicyComponent } from './main/cookie-policy/cookie-policy.component';
-import { StatusComponent } from './main/status/status.component';
+import { AuthGuard } from './main/guard/auth.guard';
import { HelpComponent } from './main/help/help.component';
-import { LoginFormComponent } from './main/action/login-form/login-form.component';
import { MainComponent } from './main/main.component';
-
+import { StatusComponent } from './main/status/status.component';
+import { OntologyClassInstanceComponent } from './project/beta/ontology-classes/ontology-class-instance/ontology-class-instance.component';
// project
import { BoardComponent } from './project/board/board.component';
import { CollaborationComponent } from './project/collaboration/collaboration.component';
@@ -15,20 +15,17 @@ import { ListComponent } from './project/list/list.component';
import { OntologyComponent } from './project/ontology/ontology.component';
import { PermissionComponent } from './project/permission/permission.component';
import { ProjectComponent } from './project/project.component';
-
+import { ProjectsComponent } from './system/projects/projects.component';
+// system
+import { SystemComponent } from './system/system.component';
+import { UsersComponent } from './system/users/users.component';
// user
import { DashboardComponent } from './user/dashboard/dashboard.component';
import { UserComponent } from './user/user.component';
-
// search results and resource viewer
import { ResourceComponent } from './workspace/resource/resource.component';
import { ResultsComponent } from './workspace/results/results.component';
-// system
-import { SystemComponent } from './system/system.component';
-import { ProjectsComponent } from './system/projects/projects.component';
-import { UsersComponent } from './system/users/users.component';
-
const routes: Routes = [
{
path: '',
@@ -102,6 +99,75 @@ const routes: Routes = [
}
]
},
+ {
+ path: 'beta/project/:shortcode',
+ component: ProjectComponent,
+ children: [
+ {
+ path: '',
+ component: BoardComponent
+ },
+ {
+ path: 'info', // old path setup to avoid 404 when typing beta in front of project
+ redirectTo: ''
+ },
+ {
+ path: 'ontology',
+ component: HintComponent,
+ data: { topic: 'ontology' }
+ },
+ {
+ path: 'ontology/:onto',
+ component: OntologyComponent,
+ canActivate: [AuthGuard]
+ },
+ {
+ path: 'ontology/:onto/:class',
+ component: OntologyClassInstanceComponent,
+ },
+ {
+ path: 'ontology/:onto/:class/conf',
+ component: StatusComponent,
+ data: { status: 501, comment: 'Here you will be able to configure the resource class.' },
+ canActivate: [AuthGuard]
+ },
+ {
+ path: 'ontology/:onto/:class/:instance',
+ component: OntologyClassInstanceComponent,
+ },
+ {
+ path: 'list',
+ component: HintComponent,
+ data: { topic: 'list' }
+ },
+ {
+ path: 'list/:list',
+ component: ListComponent,
+ canActivate: [AuthGuard]
+ },
+ {
+ path: 'settings',
+ component: StatusComponent,
+ data: { status: 501, comment: 'Here you will be able to configure the project: e.g. setup collaboration and permissions.' },
+ canActivate: [AuthGuard]
+ },
+ {
+ path: 'settings/collaboration',
+ component: CollaborationComponent,
+ canActivate: [AuthGuard]
+ },
+ {
+ path: 'settings/permissions',
+ component: PermissionComponent,
+ canActivate: [AuthGuard]
+ },
+ {
+ path: '**',
+ component: StatusComponent,
+ data: { status: 404 }
+ }
+ ]
+ },
/*
{
path: 'user/:name',
diff --git a/src/app/app.module.ts b/src/app/app.module.ts
index 04a6369c08..6d14d74683 100644
--- a/src/app/app.module.ts
+++ b/src/app/app.module.ts
@@ -161,6 +161,9 @@ import { FulltextSearchComponent } from './workspace/search/fulltext-search/full
import { SearchPanelComponent } from './workspace/search/search-panel/search-panel.component';
import { HintComponent } from './main/action/hint/hint.component';
import { TextComponent } from './workspace/resource/representation/text/text.component';
+import { OntologyClassesComponent } from './project/beta/ontology-classes/ontology-classes.component';
+import { OntologyClassItemComponent } from './project/beta/ontology-classes/ontology-class-item/ontology-class-item.component';
+import { OntologyClassInstanceComponent } from './project/beta/ontology-classes/ontology-class-instance/ontology-class-instance.component';
// translate: AoT requires an exported function for factories
export function httpLoaderFactory(httpClient: HttpClient) {
@@ -308,7 +311,10 @@ export function httpLoaderFactory(httpClient: HttpClient) {
VideoComponent,
VideoPreviewComponent,
HintComponent,
- TextComponent
+ TextComponent,
+ OntologyClassesComponent,
+ OntologyClassItemComponent,
+ OntologyClassInstanceComponent
],
imports: [
AngularSplitModule.forRoot(),
diff --git a/src/app/main/action/hint/hint.component.scss b/src/app/main/action/hint/hint.component.scss
index 1ff304cfbb..3acd9f206b 100644
--- a/src/app/main/action/hint/hint.component.scss
+++ b/src/app/main/action/hint/hint.component.scss
@@ -1,3 +1,8 @@
+:host {
+ padding: 16px;
+ display: block;
+}
+
a {
margin: 16px auto;
diff --git a/src/app/main/action/hint/hint.component.spec.ts b/src/app/main/action/hint/hint.component.spec.ts
index 1f29135540..6cb1f0e58d 100644
--- a/src/app/main/action/hint/hint.component.spec.ts
+++ b/src/app/main/action/hint/hint.component.spec.ts
@@ -1,5 +1,6 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { MatIconModule } from '@angular/material/icon';
+import { RouterTestingModule } from '@angular/router/testing';
import { HintComponent } from './hint.component';
@@ -13,7 +14,8 @@ describe('HintComponent', () => {
HintComponent
],
imports: [
- MatIconModule
+ MatIconModule,
+ RouterTestingModule
]
})
.compileComponents();
diff --git a/src/app/main/action/hint/hint.component.ts b/src/app/main/action/hint/hint.component.ts
index fe382771ea..91c847e726 100644
--- a/src/app/main/action/hint/hint.component.ts
+++ b/src/app/main/action/hint/hint.component.ts
@@ -1,4 +1,5 @@
import { Component, Input, OnInit } from '@angular/core';
+import { ActivatedRoute } from '@angular/router';
@Component({
selector: 'app-hint',
@@ -13,9 +14,18 @@ export class HintComponent implements OnInit {
documentation: string;
- constructor() { }
+ constructor(
+ private _route: ActivatedRoute
+ ) { }
ngOnInit(): void {
+ if (!this.topic) {
+ // but status is defined in app.routing
+ this._route.data.subscribe(data => {
+ this.topic = data.topic;
+ });
+ }
+
this.content = this._getHint(this.topic);
}
@@ -43,6 +53,25 @@ export class HintComponent implements OnInit {
`;
break;
+ case 'ontology':
+ this.documentation = 'https://docs.dasch.swiss/DSP-APP/user-guide/project/#data-model';
+ return `
Data Model
+
+ The definition of the data model (ontology) is the most important step.
+ The data model is indispensable for structuring your data. Our platform
+ provides a tool for an easy creation of one or more project data models.
+ First, you have to know which data and sources you want to work with.
+ The data model can be flexible and customizable.
+