Revision 56621
Added by Konstantinos Triantafyllou almost 5 years ago
learn-how.component.ts | ||
---|---|---|
3 | 3 |
import {Title} from '@angular/platform-browser'; |
4 | 4 |
import {PiwikService} from '../openaireLibrary/utils/piwik/piwik.service'; |
5 | 5 |
import {EnvProperties} from '../openaireLibrary/utils/properties/env-properties'; |
6 |
import {FAQ} from "../openaireLibrary/utils/entities/FAQ";
|
|
6 |
import {HelperService} from "../openaireLibrary/utils/helper/helper.service";
|
|
7 | 7 |
|
8 | 8 |
@Component({ |
9 | 9 |
selector: 'learn-how', |
10 | 10 |
template: ` |
11 |
<helper *ngIf="pageContents && pageContents['top']" [texts]="pageContents['top']"></helper> |
|
11 | 12 |
<ng-template #one> |
12 | 13 |
<h5 class="uk-text-bold uk-margin-small-bottom">1. Understanding your needs</h5> |
13 | 14 |
<div> |
... | ... | |
96 | 97 |
</div> |
97 | 98 |
</div> |
98 | 99 |
</div> |
99 |
<helper position="bottom"></helper> |
|
100 | 100 |
</div> |
101 | 101 |
` |
102 | 102 |
}) |
103 | 103 |
export class LearnHowComponent { |
104 | 104 |
public piwiksub: any; |
105 | 105 |
public gifs: {"gif": string, "header": string, "text"}[] = []; |
106 |
public pageContents = null; |
|
107 |
public divContents = null; |
|
106 | 108 |
|
107 | 109 |
|
108 | 110 |
private pageTitle = "OpenAIRE - Connect | Learn How"; |
... | ... | |
113 | 115 |
private route: ActivatedRoute, |
114 | 116 |
private _router: Router, |
115 | 117 |
private _title: Title, |
116 |
private _piwikService: PiwikService) {
|
|
117 |
var description = "OpenAIRE - Connect, Community Dashboard, research community";
|
|
118 |
private _piwikService: PiwikService,
|
|
119 |
private helper: HelperService) {
|
|
118 | 120 |
this._title.setTitle(this.pageTitle); |
119 | 121 |
} |
120 | 122 |
|
... | ... | |
125 | 127 |
if(this.properties.enablePiwikTrack && (typeof document !== 'undefined')){ |
126 | 128 |
this.piwiksub = this._piwikService.trackView(this.properties, "OpenAIRE Connect | Create and manage your community page", this.properties.piwikSiteId).subscribe(); |
127 | 129 |
} |
130 |
//this.getDivContents(); |
|
131 |
this.getPageContents(); |
|
128 | 132 |
}); |
129 | 133 |
this.createGifs(); |
130 | 134 |
} |
131 | 135 |
|
136 |
public getPageContents() { |
|
137 |
this.helper.getPageHelpContents(this._router.url, this.properties, 'connect').subscribe(contents => { |
|
138 |
this.pageContents = contents; |
|
139 |
}) |
|
140 |
} |
|
141 |
|
|
142 |
public getDivContents() { |
|
143 |
this.helper.getDivHelpContents(this._router.url, this.properties, 'connect').subscribe(contents => { |
|
144 |
this.divContents = contents; |
|
145 |
}) |
|
146 |
} |
|
147 |
|
|
132 | 148 |
public ngOnDestroy() { |
133 | 149 |
if(this.piwiksub){ |
134 | 150 |
this.piwiksub.unsubscribe(); |
Also available in: Unified diff
[Trunk|Connect]: Add help texts on home,about,learnInDepth and contact us. Add new page /helper-test for testing.