Merge branch 'new-theme' of code-repo.d4science.org:MaDgIK/openaire-library into new-theme

This commit is contained in:
Konstantinos Triantafyllou 2022-08-02 11:24:03 +03:00
commit 39ddba0eba
2 changed files with 7 additions and 4 deletions

View File

@ -14,6 +14,7 @@ import { properties } from 'src/environments/environment';
<li [class.uk-active]="tab === 'entity'"><a routerLink="../entities">Entities</a></li>
<li *ngIf="portal && type === 'community'" [class.uk-active]="tab === 'menu'"><a routerLink="../menu">Menu</a></li>
<li *ngIf="isPortalAdmin && !portal" [class.uk-active]="tab === 'class'"><a routerLink="../classes">Classes</a></li>
<li *ngIf="isPortalAdmin && portal=='connect'" [class.uk-active]="tab === 'customization'"><a routerLink="../customization">Customization</a></li>
</ul>
`
})
@ -25,7 +26,7 @@ export class AdminTabsComponent implements OnInit {
@Input()
public user: User;
@Input()
public tab: "portal" | "page" | "entity" | "menu" | "class" = 'page';
public tab: "portal" | "page" | "entity" | "menu" | "class" | "customization"= 'page';
private subscriptions: any[] = [];
constructor(private route: ActivatedRoute, private userManagementService: UserManagementService) {

View File

@ -24,9 +24,9 @@ export class LayoutService {
return this.http.post(connectPortalUrl + "/build-css/" + (layout?"preview/":"") + pid + (suffix?("/"+ suffix):""), layout );
}
saveLayout(properties: EnvProperties, pid: string, layout: Layout): Observable<Layout> {
saveLayout(properties: EnvProperties, pid: string, layout: Layout, portalType = null): Observable<Layout> {
LayoutService.removeNulls(layout);
return this.http.post<Layout>(properties.adminToolsAPIURL + '/' + properties.adminToolsPortalType + '/'
return this.http.post<Layout>(properties.adminToolsAPIURL + '/' + (portalType?portalType: properties.adminToolsPortalType) + '/'
+ pid + '/layout', layout, CustomOptions.getAuthOptionsWithBody());
}
@ -34,7 +34,9 @@ export class LayoutService {
return this.http.get<Layout>(properties.adminToolsAPIURL+"/" + properties.adminToolsPortalType + '/'
+ pid + '/layout');
}
getLayouts(properties: EnvProperties): Observable<Layout[]> {
return this.http.get<Layout[]>(properties.adminToolsAPIURL+'/community/layouts');
}
mockLayout(): any {
return this.http.get('./assets/customizationOptions.json') ;