[Trunk|Library]: Refactor isRouteEnabled to check if a page is enable on portals too. Add on deposit first page bottom content.

git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@56630 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
k.triantafyllou 2019-07-18 16:02:01 +00:00
parent ddb5d82677
commit 1d64ec947a
2 changed files with 10 additions and 6 deletions

View File

@ -130,14 +130,15 @@ import {PiwikService} from "../utils/piwik/piwik.service";
</div> </div>
</div> </div>
<div class="uk-section uk-section-muted uk-margin-large-top uk-padding-remove-bottom uk-padding-remove-top"> <!--<div class="uk-section uk-section-muted uk-margin-large-top uk-padding-remove-bottom uk-padding-remove-top">
<!-- grey-background--> &lt;!&ndash; grey-background&ndash;&gt;
<div class="uk-margin-top uk-padding-small"> <div class="uk-margin-top uk-padding-small">
<div class="uk-align-center uk-container uk-container-large uk-margin-top uk-margin-bottom"> <div class="uk-align-center uk-container uk-container-large uk-margin-top uk-margin-bottom">
<helper position="bottom"></helper> <helper *ngIf="pageContents && pageContents['bottom']" [texts]="pageContents['bottom']"></helper>
</div>
</div> </div>
</div> </div>
</div>-->
<helper *ngIf="pageContents && pageContents['bottom']" [texts]="pageContents['bottom']"></helper>
` `
}) })
@ -146,6 +147,9 @@ export class DepositFirstPageComponent {
@Input() piwikSiteId = null; @Input() piwikSiteId = null;
piwiksub:any; piwiksub:any;
@Input() pageContents = null;
@Input() divContents = null;
public keyword: string; public keyword: string;
public depositRoute = "/search-deposit"; public depositRoute = "/search-deposit";
public searchPlaceHolder = "Search for repositories by title, country, organization, subject..."; public searchPlaceHolder = "Search for repositories by title, country, organization, subject...";

View File

@ -39,8 +39,8 @@ export class IsRouteEnabled implements CanActivate {
} }
return res; return res;
}),mergeMap(prop => { }),mergeMap(prop => {
if (!community) { // no community to check - return true if (!community) {
return observableOf(true); community = prop.adminToolsCommunity;
} }
return this.config.isPageEnabled(prop, community, '/' + path.split('?')[0].substring(1)); return this.config.isPageEnabled(prop, community, '/' + path.split('?')[0].substring(1));
}),); }),);