Remove is Prior to option from edit and add page form.

git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-admin-portal/trunk@56583 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
k.triantafyllou 2019-07-17 09:56:47 +00:00
parent 842f33f9fb
commit 7ebc46f6cf
5 changed files with 29 additions and 13 deletions

View File

@ -8,6 +8,12 @@
<div *ngIf="showLoading" class="uk-animation-fade uk-width-1-1" role="alert">
<span class="loading-gif uk-align-center"></span>
</div>
<div *ngIf="curatorId != null && curator != null && !showLoading" class="uk-width-1-1 uk-margin-left">
<div class="uk-alert uk-alert-primary uk-margin-top-large">
<span class="uk-margin-small-right uk-icon" uk-icon="info"></span>
Edit your personal info and it will be visible in Curators' page of your Community Gateway.
</div>
</div>
<table *ngIf="curatorId != null && curator != null && !showLoading" class="uk-width-1-2@m uk-width-1-1@s uk-align-center">
<tbody class="uk-table uk-align-center">
<tr *ngIf="curator.email != null" >

View File

@ -59,14 +59,13 @@
<label for="orderTag">Order</label>
<input type="number" step="1" class="form-control" formControlName="order" id="orderTag" placeholder="Order (e.g. 2)">
</div>
<div class="form-group">
<!--<div class="form-group">
<label>Help text before existing content</label>
<label class="checkbox">
<span class="uk-margin-small-right" style="font-weight: normal;">Before</span>
<input tabindex="0" type="checkbox" formControlName="isPriorTo">
</label>
</div>
</div>-->
<div class="form-group">
<label>Select Status</label>
<label class="checkbox">

View File

@ -44,15 +44,26 @@ export class PageContentFormComponent implements OnInit{
if(!Session.isLoggedIn()){
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
this.myForm.valueChanges.subscribe(value => {
let pid = value.page;
this._helpContentService.getPage(pid,this.properties.adminToolsAPIURL).subscribe(page => {
if(this.pageId) {
this._helpContentService.getPage(this.pageId,this.properties.adminToolsAPIURL).subscribe(page => {
this.placements.top = page.top;
this.placements.bottom = page.bottom;
this.placements.left = page.left;
this.placements.right = page.right;
});
})
} else {
this.myForm.valueChanges.subscribe(value => {
let pid = value.page;
this._helpContentService.getPage(pid, this.properties.adminToolsAPIURL).subscribe(page => {
this.placements.top = page.top;
this.placements.bottom = page.bottom;
this.placements.left = page.left;
this.placements.right = page.right;
});
});
}
this._helpContentService.getPages(this.properties.adminToolsAPIURL, this.communityPid).subscribe(
pages => {
this.availablePages = pages;
@ -71,7 +82,7 @@ export class PageContentFormComponent implements OnInit{
content : ['', Validators.required],
order : [1, Validators.required],
isActive : true,
isPriorTo : false,
//isPriorTo : false,
_id : '',
});
}
@ -84,7 +95,7 @@ export class PageContentFormComponent implements OnInit{
content : [''],
order : 1,
isActive : true,
isPriorTo : false,
//isPriorTo : false,
_id : ''
});
this.myForm.markAsPristine();

View File

@ -89,7 +89,7 @@
<th>Content</th>
<th>Placement</th>
<th>Order</th>
<th>Before</th>
<!--<th>Before</th>-->
<th>Change status</th>
<th>Actions</th>
</tr>
@ -115,10 +115,10 @@
<div class="order" href="#">{{check.pageHelpContent.order}}
</div>
</td>
<td>
<!--<td>
<div class="isPriorTo" href="#">{{check.pageHelpContent.isPriorTo}}
</div>
</td>
</td>-->
<td>
<mat-slide-toggle [checked]="check.pageHelpContent.isActive"
(change)="($event.source.checked = check.pageHelpContent.isActive);togglePageHelpContents(!check.pageHelpContent.isActive,[check.pageHelpContent._id])"></mat-slide-toggle>

View File

@ -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/",