</div>
<div class="row" id="splash-nav">
+ <div class="col-lg-4" *ngFor="let col of portalEntries">
+ <div class="card">
+ <ng-container *ngFor="let entry of col">
+ <div class="card-header" *ngIf="entry.entry_type() === 'header'">
+ <h2 class="panel-title text-center" i18n>{{entry.label()}}</h2>
+ </div>
+ <div class="list-group-item border-0 p-2" *ngIf="entry.entry_type() === 'menuitem'">
+ <a href="{{entry.target_url()}}" i18n>
+ <img src="{{entry.image_url()}}" alt="" role="presentation"/>
+ {{entry.label()}}
+ </a>
+ </div>
+ </ng-container>
+ </div>
+ </div>
+ </div>
+
+ <div class="row" id="splash-nav">
<div class="col-lg-4">
<div class="card">
<div class="card-header">
import {Component, OnInit, Renderer2} from '@angular/core';
+import {PcrudService} from '@eg/core/pcrud.service';
import {Router} from '@angular/router';
@Component({
export class StaffSplashComponent implements OnInit {
catSearchQuery: string;
+ portalEntries: any[][] = [];
constructor(
private renderer: Renderer2,
+ private pcrud: PcrudService,
private router: Router
) {}
ngOnInit() {
+ this.pcrud.search('cusppe', {owner: 1}).subscribe(item => {
+ const page_col = item.page_col() - 1;
+ if (this.portalEntries[page_col] === undefined) {
+ this.portalEntries[page_col] = [];
+ }
+ this.portalEntries[page_col][item.col_pos()] = item;
+ });
+
// Focus catalog search form
this.renderer.selectRootElement('#catalog-search-input').focus();
}