[Trunk | Admin]:
1. domain/divId.ts & divId-form.component: Add "connect", "communities", "openaire" options 2. help-content.service: "getPagesWithDivIds()" method: Query for specific community when available parameter. git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-admin-portal/trunk@56294 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
5031733e77
commit
9cc6eab2c4
|
@ -4,6 +4,9 @@ export interface DivId {
|
|||
_id: string;
|
||||
name: string;
|
||||
pages: string[] | Page[];
|
||||
connect: boolean;
|
||||
communities: boolean;
|
||||
openaire: boolean;
|
||||
}
|
||||
|
||||
export interface CheckDivId {
|
||||
|
|
|
@ -42,5 +42,29 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group uk-grid">
|
||||
<label class="uk-width-2-3">Select if this class exists in OpenAIRE portal</label>
|
||||
<label class="uk-width-1-3 checkbox">
|
||||
<span style="font-weight: normal;">openaire</span>
|
||||
<input tabindex="0" type="checkbox" formControlName="openaire">
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group uk-grid uk-margin-remove-top">
|
||||
<label class="uk-width-2-3">Select if this class exists in connect portals</label>
|
||||
<label class="uk-width-1-3 checkbox">
|
||||
<span style="font-weight: normal;">connect</span>
|
||||
<input tabindex="0" type="checkbox" formControlName="connect">
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group uk-grid uk-margin-remove-top">
|
||||
<label class="uk-width-2-3">Select if this class exists in connect portals (community specific)</label>
|
||||
<label class="uk-width-1-3 checkbox">
|
||||
<span style="font-weight: normal;">communities</span>
|
||||
<input tabindex="0" type="checkbox" formControlName="communities">
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<input type="hidden" formControlName="_id">
|
||||
</form>
|
||||
|
|
|
@ -108,6 +108,9 @@ export class DivIdFormComponent implements OnInit{
|
|||
_id: '',
|
||||
name : ['', Validators.required],
|
||||
pages: this._fb.array([]),
|
||||
openaire: true,
|
||||
connect: false,
|
||||
communities: true,
|
||||
isCollapsed: [true]
|
||||
});
|
||||
}
|
||||
|
@ -116,6 +119,9 @@ export class DivIdFormComponent implements OnInit{
|
|||
this.myForm.patchValue({
|
||||
_id : '',
|
||||
name : '',
|
||||
openaire: true,
|
||||
connect: false,
|
||||
communities: true,
|
||||
isCollapsed: [true]
|
||||
});
|
||||
|
||||
|
|
|
@ -114,7 +114,7 @@ export class PagesComponent implements OnInit {
|
|||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
||||
} else {
|
||||
this._helpContentService.getPagesWithDivIds(community_pid, this.properties.adminToolsAPIURL).subscribe(
|
||||
pages => {
|
||||
pages => {
|
||||
this.pageWithDivIds = pages;
|
||||
this.showLoading = false;
|
||||
},
|
||||
|
|
|
@ -120,7 +120,8 @@ export class HelpContentService {
|
|||
}
|
||||
|
||||
getPagesWithDivIds(community_pid: string, helpContentUrl:string) {
|
||||
return this.http.get<Array<string>>(helpContentUrl + 'div/pages')
|
||||
let parameters = (community_pid ? "?communityId="+community_pid : "");
|
||||
return this.http.get<Array<string>>(helpContentUrl + 'div/pages'+parameters)
|
||||
//.map(res => <Map<string, Set<string>>> res.json())
|
||||
.pipe(catchError(this.handleError));
|
||||
}
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
|
||||
"cacheUrl" :"http://scoobydoo.di.uoa.gr:3000/get?url=",
|
||||
|
||||
"adminToolsAPIURL" :"http://mpagasas.di.uoa.gr:8080/uoa-admin-tools/",
|
||||
"adminToolsAPIURL" :"http://duffy.di.uoa.gr:8080/uoa-admin-tools/",
|
||||
|
||||
"adminToolsCommunity" :"openaire",
|
||||
"communityAPI": "https://dev-openaire.d4science.org/openaire/community/",
|
||||
|
|
Loading…
Reference in New Issue