Revision 58574
Added by Konstantina Galouni almost 4 years ago
modules/uoa-connect-portal/trunk/src/app/subjects/subjects-routing.module.ts | ||
---|---|---|
1 |
import { NgModule} from '@angular/core'; |
|
2 |
import { RouterModule } from '@angular/router'; |
|
3 |
import {SubjectsComponent} from "./subjects.component"; |
|
4 |
import {IsRouteEnabled} from "../openaireLibrary/error/isRouteEnabled.guard"; |
|
5 |
import {PreviousRouteRecorder} from "../openaireLibrary/utils/piwik/previousRouteRecorder.guard"; |
|
6 |
|
|
7 |
@NgModule({ |
|
8 |
imports: [ |
|
9 |
RouterModule.forChild([ |
|
10 |
{ path: '', component: SubjectsComponent, canActivate: [IsRouteEnabled], canDeactivate: [PreviousRouteRecorder]} |
|
11 |
]) |
|
12 |
] |
|
13 |
}) |
|
14 |
export class SubjectsRoutingModule { |
|
15 |
} |
modules/uoa-connect-portal/trunk/src/app/subjects/subjects.component.ts | ||
---|---|---|
1 |
import {Component, Input} from '@angular/core'; |
|
2 |
import {EnvProperties} from '../openaireLibrary/utils/properties/env-properties'; |
|
3 |
import {ActivatedRoute, Router} from "@angular/router"; |
|
4 |
import {CommunityService} from "../openaireLibrary/connect/community/community.service"; |
|
5 |
import {ConnectHelper} from "../openaireLibrary/connect/connectHelper"; |
|
6 |
import {HelperFunctions} from "../openaireLibrary/utils/HelperFunctions.class"; |
|
7 |
import {HelperService} from "../openaireLibrary/utils/helper/helper.service"; |
|
8 |
import {Meta, Title} from "@angular/platform-browser"; |
|
9 |
import {SEOService} from "../openaireLibrary/sharedComponents/SEO/SEO.service"; |
|
10 |
import {PiwikService} from "../openaireLibrary/utils/piwik/piwik.service"; |
|
11 |
import {PiwikHelper} from "../utils/piwikHelper"; |
|
12 |
import {StringUtils} from "../openaireLibrary/utils/string-utils.class"; |
|
13 |
import {Breadcrumb} from "../openaireLibrary/utils/breadcrumbs/breadcrumbs.component"; |
|
14 |
|
|
15 |
@Component({ |
|
16 |
selector: 'subjects', |
|
17 |
template: ` |
|
18 |
<schema2jsonld *ngIf="url" [URL]="url" [name]="pageTitle" type="other"></schema2jsonld> |
|
19 |
|
|
20 |
<div style=" min-height: 650px;" class="communityBackground"> |
|
21 |
<div class="uk-section uk-padding-remove-top uk-padding-remove-bottom"> |
|
22 |
<breadcrumbs addClass="uk-margin-large-left uk-margin-remove-bottom uk-margin-small-top" [breadcrumbs]="breadcrumbs"></breadcrumbs> |
|
23 |
<!-- <div *ngIf="communityId != null && communityId != ''" --> |
|
24 |
<!-- class="uk-container uk-container-large uk-margin-top white-box-with-border">--> |
|
25 |
|
|
26 |
<div class="uk-container uk-container-large"> |
|
27 |
<div *ngIf="showLoading"> |
|
28 |
<div class="uk-animation-fade uk-width-1-1" role="alert"><span |
|
29 |
class="loading-gif uk-align-center"></span></div> |
|
30 |
</div> |
|
31 |
<div *ngIf="!showLoading"> |
|
32 |
<div class="uk-h2 uk-margin-bottom uk-margin-medium-top"> |
|
33 |
<span>Subjects</span> |
|
34 |
</div> |
|
35 |
|
|
36 |
<div style=" min-height: 250px;" class="white-box-with-border uk-padding uk-list"> |
|
37 |
<helper *ngIf="pageContents && pageContents['top'] && pageContents['top'].length > 0" |
|
38 |
[texts]="pageContents['top']"></helper> |
|
39 |
|
|
40 |
<span *ngFor="let subject of subjects let i=index"> |
|
41 |
<span *ngIf="subject != ''"> |
|
42 |
<a class="portal-link" |
|
43 |
[queryParams]="{f0:'resultsubject',fv0:createParams(subject)}" |
|
44 |
routerLinkActive="router-link-active" [routerLink]="properties.searchLinkToAdvancedResults" > |
|
45 |
<span>{{subject}}</span> |
|
46 |
</a> |
|
47 |
<span *ngIf="i < subjects.length-1">, </span> |
|
48 |
</span> |
|
49 |
</span> |
|
50 |
</div> |
|
51 |
</div> |
|
52 |
</div> |
|
53 |
</div> |
|
54 |
</div> |
|
55 |
` |
|
56 |
|
|
57 |
}) |
|
58 |
|
|
59 |
export class SubjectsComponent { |
|
60 |
public subjects: string[]; |
|
61 |
@Input() communityId = null; |
|
62 |
public showLoading = true; |
|
63 |
|
|
64 |
public properties: EnvProperties; |
|
65 |
public pageContents = null; |
|
66 |
public divContents = null; |
|
67 |
|
|
68 |
public piwiksub: any; |
|
69 |
public url: string = null; |
|
70 |
public pageTitle: string = "Subjects"; |
|
71 |
|
|
72 |
public breadcrumbs: Breadcrumb[] = [{name: 'home', route: '/'}, {name: 'about - subjects'}]; |
|
73 |
|
|
74 |
constructor (private route: ActivatedRoute, |
|
75 |
private communityService: CommunityService, |
|
76 |
private _router: Router, |
|
77 |
private helper: HelperService, |
|
78 |
private _meta: Meta, |
|
79 |
private _title: Title, |
|
80 |
private seoService: SEOService, |
|
81 |
private _piwikService: PiwikService) {} |
|
82 |
|
|
83 |
ngOnInit() { |
|
84 |
this.route.data.subscribe((data: { envSpecific: EnvProperties }) => { |
|
85 |
this.showLoading = true; |
|
86 |
this.properties = data.envSpecific; |
|
87 |
|
|
88 |
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) { |
|
89 |
this.piwiksub = this._piwikService.trackView(this.properties, this.pageTitle, PiwikHelper.getSiteId(this.communityId, this.properties.environment)).subscribe(); |
|
90 |
} |
|
91 |
this.url = this.properties.baseLink + this._router.url; |
|
92 |
this.seoService.createLinkForCanonicalURL(this.url); |
|
93 |
this.updateUrl(this.url); |
|
94 |
this.updateTitle(this.pageTitle); |
|
95 |
this.updateDescription("OpenAIRE - Connect, Community Gateway, research community"); |
|
96 |
|
|
97 |
this.route.queryParams.subscribe(data => { |
|
98 |
this.communityId = ConnectHelper.getCommunityFromDomain(this.properties.domain); |
|
99 |
if(!this.communityId) { |
|
100 |
this.communityId = data['communityId']; |
|
101 |
} |
|
102 |
//this.getDivContents(); |
|
103 |
this.getPageContents(); |
|
104 |
this.communityService.getCommunity(this.properties, this.properties.communityAPI + this.communityId).subscribe(community => { |
|
105 |
this.subjects = community.subjects; |
|
106 |
this.showLoading = false; |
|
107 |
HelperFunctions.scroll(); |
|
108 |
}); |
|
109 |
}); |
|
110 |
}); |
|
111 |
} |
|
112 |
|
|
113 |
createParams(param) { |
|
114 |
return StringUtils.quote(StringUtils.URIEncode(param)); |
|
115 |
} |
|
116 |
|
|
117 |
ngOnDestroy() { |
|
118 |
if(this.piwiksub) { |
|
119 |
this.piwiksub.unsubscribe(); |
|
120 |
} |
|
121 |
} |
|
122 |
|
|
123 |
private getPageContents() { |
|
124 |
this.helper.getPageHelpContents(this.properties, this.communityId, this._router.url).subscribe(contents => { |
|
125 |
this.pageContents = contents; |
|
126 |
}) |
|
127 |
} |
|
128 |
|
|
129 |
private getDivContents() { |
|
130 |
this.helper.getDivHelpContents(this.properties, this.communityId, this._router.url).subscribe(contents => { |
|
131 |
this.divContents = contents; |
|
132 |
}) |
|
133 |
} |
|
134 |
|
|
135 |
private updateDescription(description: string) { |
|
136 |
this._meta.updateTag({content: description}, "name='description'"); |
|
137 |
this._meta.updateTag({content: description}, "property='og:description'"); |
|
138 |
} |
|
139 |
|
|
140 |
private updateTitle(title: string) { |
|
141 |
var _title = ((title.length > 50) ? title.substring(0, 50) : title); |
|
142 |
this._title.setTitle(_title); |
|
143 |
this._meta.updateTag({content: _title}, "property='og:title'"); |
|
144 |
} |
|
145 |
|
|
146 |
private updateUrl(url: string) { |
|
147 |
this._meta.updateTag({content: url}, "property='og:url'"); |
|
148 |
} |
|
149 |
} |
modules/uoa-connect-portal/trunk/src/app/subjects/subjects.module.ts | ||
---|---|---|
1 |
import { NgModule} from '@angular/core'; |
|
2 |
import { CommonModule } from '@angular/common'; |
|
3 |
import { FormsModule } from '@angular/forms'; |
|
4 |
import { RouterModule } from '@angular/router'; |
|
5 |
|
|
6 |
import {SubjectsComponent} from './subjects.component'; |
|
7 |
import {SubjectsRoutingModule} from "./subjects-routing.module"; |
|
8 |
import {CommunityService} from "../openaireLibrary/connect/community/community.service"; |
|
9 |
import {HelperModule} from "../openaireLibrary/utils/helper/helper.module"; |
|
10 |
import {Schema2jsonldModule} from "../openaireLibrary/sharedComponents/schema2jsonld/schema2jsonld.module"; |
|
11 |
import {SEOServiceModule} from "../openaireLibrary/sharedComponents/SEO/SEOService.module"; |
|
12 |
import {PiwikServiceModule} from "../openaireLibrary/utils/piwik/piwikService.module"; |
|
13 |
import {BreadcrumbsModule} from "../openaireLibrary/utils/breadcrumbs/breadcrumbs.module"; |
|
14 |
|
|
15 |
@NgModule({ |
|
16 |
imports: [ |
|
17 |
CommonModule, FormsModule, RouterModule, |
|
18 |
SubjectsRoutingModule, HelperModule, |
|
19 |
Schema2jsonldModule, SEOServiceModule, PiwikServiceModule, |
|
20 |
BreadcrumbsModule |
|
21 |
], |
|
22 |
declarations: [ |
|
23 |
SubjectsComponent |
|
24 |
], |
|
25 |
providers: [CommunityService], |
|
26 |
exports: [ |
|
27 |
SubjectsComponent |
|
28 |
] |
|
29 |
}) |
|
30 |
export class SubjectsModule {} |
modules/uoa-connect-portal/trunk/src/app/community/community.component.html | ||
---|---|---|
189 | 189 |
<div *ngIf="communityInfo" class="uk-section uk-padding-remove-top uk-padding-remove-bottom"> |
190 | 190 |
<div class="uk-padding-small"> |
191 | 191 |
<div class="uk-container uk-container-large uk-margin-top" |
192 |
*ngIf="communityId != null && communityId != '' && community != null">
|
|
192 |
*ngIf="communityId"> |
|
193 | 193 |
<div> |
194 | 194 |
<div class="uk-margin-large-bottom"> |
195 |
<div *ngIf="community.title != null" class="uk-h2 uk-margin-remove">
|
|
195 |
<div *ngIf="community.title" class="uk-h2 uk-margin-remove"> |
|
196 | 196 |
{{community.title}} |
197 | 197 |
</div> |
198 |
<div *ngIf="community.shortTitle != null && community.title != community.shortTitle"
|
|
198 |
<div *ngIf="community.shortTitle && community.title != community.shortTitle" |
|
199 | 199 |
class="subtitle uk-margin-remove"> |
200 | 200 |
{{community.shortTitle}} |
201 | 201 |
</div> |
... | ... | |
205 | 205 |
<curators [longView]="false" [managers]="community.managers" [communityId]="communityId"></curators> |
206 | 206 |
</div> |
207 | 207 |
<div> |
208 |
<span *ngIf="projectTotal != null && projectTotal > 0 && isEntityEnabled('project') && isRouteEnabled(searchLinkToProjects)">
|
|
208 |
<span *ngIf="projectTotal && projectTotal > 0 && isEntityEnabled('project') && isRouteEnabled(searchLinkToProjects)"> |
|
209 | 209 |
<span class="uk-text-muted">Projects: </span> |
210 | 210 |
<a class="uk-margin-auto-vertical uk-margin-auto portal-link" [queryParams]=params |
211 | 211 |
routerLinkActive="router-link-active" [routerLink]="searchLinkToProjects"> |
212 | 212 |
{{projectTotal|number}} |
213 | 213 |
</a> |
214 | 214 |
</span> |
215 |
<span *ngIf="contentProviderTotal != null && contentProviderTotal > 0 && isEntityEnabled('datasource') && isRouteEnabled(searchLinkToDataProviders)"
|
|
216 |
[class]="'uk-display-inline-block '+((projectTotal != null && projectTotal > 0 && isEntityEnabled('project') && isRouteEnabled(searchLinkToProjects)) ? 'uk-margin-left' : '')">
|
|
215 |
<span *ngIf="contentProviderTotal && contentProviderTotal > 0 && isEntityEnabled('datasource') && isRouteEnabled(searchLinkToDataProviders)" |
|
216 |
[class]="'uk-display-inline-block '+((projectTotal && projectTotal > 0 && isEntityEnabled('project') && isRouteEnabled(searchLinkToProjects)) ? 'uk-margin-left' : '')"> |
|
217 | 217 |
<span class="uk-text-muted">Content Providers: </span> |
218 | 218 |
<a class="uk-margin-auto-vertical uk-margin-auto portal-link" [queryParams]=params |
219 | 219 |
routerLinkActive="router-link-active" [routerLink]="searchLinkToDataProviders"> |
... | ... | |
221 | 221 |
</a> |
222 | 222 |
</span> |
223 | 223 |
<span *ngIf="projectsCalculated && contentProvidersCalculated && |
224 |
((projectTotal != null && projectTotal > 0 && isEntityEnabled('project') && isRouteEnabled(searchLinkToProjects))
|
|
225 |
|| (contentProviderTotal != null && contentProviderTotal > 0 && isEntityEnabled('datasource') && isRouteEnabled(searchLinkToDataProviders)))"
|
|
224 |
((projectTotal && projectTotal > 0 && isEntityEnabled('project') && isRouteEnabled(searchLinkToProjects)) |
|
225 |
|| (contentProviderTotal && contentProviderTotal > 0 && isEntityEnabled('datasource') && isRouteEnabled(searchLinkToDataProviders)))" |
|
226 | 226 |
class="uk-icon uk-text-muted uk-margin-small-left" |
227 | 227 |
title="{{buildProjectsAndContentProvidesTooltip()}}" |
228 | 228 |
uk-tooltip="pos:bottom-right; delay:10; cls: community-page-tooltip uk-width-medium"> |
... | ... | |
253 | 253 |
</div> |
254 | 254 |
<div> |
255 | 255 |
<div class="main-tabs-div"> |
256 |
<ul uk-tab class="main-tabs uk-margin-remove uk-child-width-expand uk-width-3-4" uk-switcher="connect: .main-tabs-content"> |
|
256 |
<ul uk-tab class="uk-text-truncate main-tabs uk-margin-remove uk-child-width-expand uk-width-3-4" uk-switcher="connect: .main-tabs-content">
|
|
257 | 257 |
<li class="uk-padding-remove"> |
258 | 258 |
<a class="uk-width-1-1 uk-height-1-1"> |
259 | 259 |
<div class="uk-text-bold">Summary</div> |
260 | 260 |
</a> |
261 | 261 |
</li> |
262 |
<li *ngIf="publicationTotal != null && publicationTotal > 0 && isEntityEnabled('publication')"
|
|
262 |
<li *ngIf="publicationTotal && publicationTotal > 0 && isEntityEnabled('publication')" |
|
263 | 263 |
class="uk-padding-remove" (click)="show='overview'; searchResearchResults('publication', publicationTotal, publicationResults)"> |
264 | 264 |
<a class="uk-width-1-1 uk-height-1-1"> |
265 |
<div class="uk-text-bold">Publications</div><div class="uk-margin-small-top number">{{publicationTotal|number}}</div>
|
|
265 |
<div class="uk-text-bold">Publications</div><div class="uk-margin-top number">{{publicationTotal|number}}</div> |
|
266 | 266 |
</a> |
267 | 267 |
</li> |
268 |
<li *ngIf="researchDataTotal != null && researchDataTotal > 0 && isEntityEnabled('dataset')"
|
|
268 |
<li *ngIf="researchDataTotal && researchDataTotal > 0 && isEntityEnabled('dataset')" |
|
269 | 269 |
class="uk-padding-remove" (click)="show='overview'; searchResearchResults('dataset', researchDataTotal, researchDataResults)"> |
270 | 270 |
<a class="uk-width-1-1 uk-height-1-1"> |
271 |
<div class="uk-text-bold">Research Data</div><div class="uk-margin-small-top number">{{researchDataTotal|number}}</div>
|
|
271 |
<div class="uk-text-bold">Research Data</div><div class="uk-margin-top number">{{researchDataTotal|number}}</div> |
|
272 | 272 |
</a> |
273 | 273 |
</li> |
274 |
<li *ngIf="softwareTotal != null && softwareTotal > 0 && isEntityEnabled('software')"
|
|
274 |
<li *ngIf="softwareTotal && softwareTotal > 0 && isEntityEnabled('software')" |
|
275 | 275 |
class="uk-padding-remove" (click)="show='overview'; searchResearchResults('software', softwareTotal, softwareResults)"> |
276 | 276 |
<a class="uk-width-1-1 uk-height-1-1"> |
277 |
<div class="uk-text-bold">Software</div><div class="uk-margin-small-top number">{{softwareTotal|number}}</div>
|
|
277 |
<div class="uk-text-bold">Software</div><div class="uk-margin-top number">{{softwareTotal|number}}</div> |
|
278 | 278 |
</a> |
279 | 279 |
</li> |
280 |
<li *ngIf="orpTotal != null && orpTotal > 0 && isEntityEnabled('orp')"
|
|
280 |
<li *ngIf="orpTotal && orpTotal > 0 && isEntityEnabled('orp')" |
|
281 | 281 |
class="uk-padding-remove" (click)="show='overview'; searchResearchResults('other', orpTotal, orpResults)"> |
282 | 282 |
<a class="uk-width-1-1 uk-height-1-1"> |
283 |
<div class="uk-text-bold">Other Research</div><div class="uk-margin-small-top number">{{orpTotal|number}}</div></a>
|
|
283 |
<div class="uk-text-bold">Other Research</div><div class="uk-margin-top number">{{orpTotal|number}}</div></a> |
|
284 | 284 |
</li> |
285 | 285 |
<li *ngIf="statistics && statistics.statisticsDisplay && statistics.statisticsDisplay.isActive" |
286 | 286 |
class="uk-padding-remove statistics" (click)="show='analysis'; activeTab='analytics'"> |
287 | 287 |
<a class="uk-width-1-1 uk-height-1-1"> |
288 | 288 |
<div class="uk-text-bold">Analytics</div> |
289 |
<div class="uk-margin-top number"> |
|
290 |
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"> |
|
291 |
<path d="M0 0h24v24H0z" fill="none"></path> |
|
292 |
<path d="M10 20h4V4h-4v16zm-6 0h4v-8H4v8zM16 9v11h4V9h-4z"></path> |
|
293 |
</svg> |
|
294 |
</div> |
|
289 | 295 |
</a> |
290 | 296 |
</li> |
291 | 297 |
</ul> |
292 | 298 |
</div> |
293 | 299 |
<ul class="uk-switcher main-tabs-content"> |
294 | 300 |
<li> |
295 |
<div class="uk-grid uk-margin-remove"> |
|
301 |
<div *ngIf="community" class="uk-grid uk-margin-remove">
|
|
296 | 302 |
<div class="uk-width-expand uk-padding uk-inline"> |
297 | 303 |
<div> |
298 |
<span *ngIf="community.date != null" class="uk-margin-right">
|
|
304 |
<span *ngIf="community.date" class="uk-margin-right"> |
|
299 | 305 |
<span class="lowOpacityColor uk-text-muted">Created: </span> {{community.date | date:'dd-MMM-yyyy'}} |
300 | 306 |
</span> |
301 |
<span class="uk-margin-right uk-display-inline-block">
|
|
302 |
<subscribe *ngIf="communityId != null" [communityId]="communityId" showNumbers=true class=""></subscribe>
|
|
307 |
<span> |
|
308 |
<subscribe *ngIf="communityId" [communityId]="communityId" showNumbers=true class=""></subscribe> |
|
303 | 309 |
</span> |
304 | 310 |
</div> |
305 |
<div *ngIf="community.description != null" class="uk-margin-bottom uk-margin-top"> |
|
311 |
<div *ngIf="community.description" |
|
312 |
[class]="'uk-margin-bottom '+ ((subscribeComponent && subscribeComponent.subscribers > 0) || community.date ? 'uk-margin-top' : '')"> |
|
306 | 313 |
<div class="uk-text-muted">Description</div> |
307 | 314 |
<div *ngIf="!showAllDescription" class=""> |
308 | 315 |
{{community.description.substring(0, 500)}}{{community.description.length > 500 ? '...' : ''}}</div> |
309 |
<div *ngIf="showAllDescription" class="uk-height-max-medium uk-overflow-auto">
|
|
310 |
{{community.description}}
|
|
316 |
<div *ngIf="showAllDescription" class="uk-overflow-auto"> |
|
317 |
<div class="uk-height-max-medium">{{community.description}}</div>
|
|
311 | 318 |
</div> |
312 | 319 |
<div *ngIf="!showAllDescription && community.description.length > 500 " |
313 | 320 |
class="uk-animation-fade uk-margin-small-top uk-padding uk-padding-remove-top uk-position-bottom-right"> |
... | ... | |
322 | 329 |
</div> |
323 | 330 |
</div> |
324 | 331 |
</div> |
325 |
<div *ngIf="community.subjects && community.subjects.length > 0" |
|
332 |
<div *ngIf="isRouteEnabled('/subjects') && community.subjects && community.subjects.length > 0"
|
|
326 | 333 |
class="uk-width-1-3 uk-padding right-column uk-inline"> |
327 |
<div class=""> |
|
334 |
<div class="uk-margin-bottom">
|
|
328 | 335 |
<div class="uk-text-muted">Subjects</div> |
329 | 336 |
<span *ngFor="let subject of community.subjects.slice(0,12) let i=index"> |
330 | 337 |
<span *ngIf="subject != ''"> |
... | ... | |
336 | 343 |
<span *ngIf="i < community.subjects.length-1 && i != 11">, </span> |
337 | 344 |
</span> |
338 | 345 |
</span> |
339 |
<div *ngIf="community.subjects.length > 12" |
|
340 |
class="uk-margin-top uk-animation-fade portal-link uk-padding uk-padding-remove-top uk-position-bottom-right"> |
|
341 |
<a routerLinkActive="router-link-active" [routerLink]="'/subjects'"> |
|
346 |
<div class="uk-margin-top uk-animation-fade uk-padding uk-padding-remove-top uk-position-bottom-right"> |
|
347 |
<a class="portal-link" routerLinkActive="router-link-active" [routerLink]="'/subjects'"> |
|
342 | 348 |
View all |
343 | 349 |
</a> |
344 | 350 |
</div> |
... | ... | |
346 | 352 |
</div> |
347 | 353 |
</div> |
348 | 354 |
</li> |
349 |
<li *ngIf="publicationTotal != null && publicationTotal > 0 && isEntityEnabled('publication')">
|
|
355 |
<li *ngIf="publicationTotal && publicationTotal > 0 && isEntityEnabled('publication')"> |
|
350 | 356 |
<ng-container *ngTemplateOutlet="tab_content; context: { |
351 | 357 |
resultType: 'publication', results: publicationResults, totalResults: publicationTotal, type: 'publication', typeName: 'publication'}"> |
352 | 358 |
</ng-container> |
353 | 359 |
</li> |
354 |
<li *ngIf="researchDataTotal != null && researchDataTotal > 0 && isEntityEnabled('dataset')">
|
|
360 |
<li *ngIf="researchDataTotal && researchDataTotal > 0 && isEntityEnabled('dataset')"> |
|
355 | 361 |
<ng-container *ngTemplateOutlet="tab_content; context: { |
356 | 362 |
resultType: 'dataset', results: researchDataResults, totalResults: researchDataTotal, type: 'dataset', typeName: 'research fata'}"> |
357 | 363 |
</ng-container> |
358 | 364 |
</li> |
359 |
<li *ngIf="softwareTotal != null && softwareTotal > 0 && isEntityEnabled('software')">
|
|
365 |
<li *ngIf="softwareTotal && softwareTotal > 0 && isEntityEnabled('software')"> |
|
360 | 366 |
<ng-container *ngTemplateOutlet="tab_content; context: { |
361 | 367 |
resultType: 'software', results: softwareResults, totalResults: softwareTotal, type: 'software', typeName: 'software'}"> |
362 | 368 |
</ng-container> |
363 | 369 |
</li> |
364 |
<li *ngIf="orpTotal != null && orpTotal > 0 && isEntityEnabled('orp')">
|
|
370 |
<li *ngIf="orpTotal && orpTotal > 0 && isEntityEnabled('orp')"> |
|
365 | 371 |
<ng-container *ngTemplateOutlet="tab_content; context: { |
366 | 372 |
resultType: 'other', results: orpResults, totalResults: orpTotal, type: 'orp', typeName: 'other products'}"> |
367 | 373 |
</ng-container> |
... | ... | |
748 | 754 |
<!-- </div>--> |
749 | 755 |
<!-- </div>--> |
750 | 756 |
<!--</div>--> |
751 |
<div class="uk-section tm-middle uk-container uk-margin-top uk-padding-remove-top" id="" *ngIf="communityId != null |
|
752 |
&& communityId != '' && community != null && communityInfo != null"> |
|
757 |
<div class="uk-section tm-middle uk-container uk-margin-top uk-padding-remove-top" id="" *ngIf="communityId && communityInfo"> |
|
753 | 758 |
<ng-container *ngIf=" isRouteEnabled('/organizations')"> |
754 | 759 |
<div class="uk-container uk-margin-bottom uk-grid"> |
755 | 760 |
<div class="uk-width-expand uk-padding-remove"> |
... | ... | |
768 | 773 |
class="uk-child-width-1-6@l uk-child-width-1-6@m uk-child-width-1-3@s uk-text-center uk-alert uk-alert-primary"> |
769 | 774 |
No community chosen |
770 | 775 |
</div> |
771 |
<div *ngIf="communityId != null && communityId != '' && community != null">
|
|
776 |
<div *ngIf="communityId"> |
|
772 | 777 |
|
773 | 778 |
</div> |
774 | 779 |
</article> |
modules/uoa-connect-portal/trunk/src/app/community/community.component.ts | ||
---|---|---|
21 | 21 |
import {RouterHelper} from "../openaireLibrary/utils/routerHelper.class"; |
22 | 22 |
import {SEOService} from "../openaireLibrary/sharedComponents/SEO/SEO.service"; |
23 | 23 |
import {UserManagementService} from "../openaireLibrary/services/user-management.service"; |
24 |
import {SubscribeComponent} from "../utils/subscribe/subscribe.component"; |
|
24 | 25 |
|
25 | 26 |
@Component({ |
26 | 27 |
selector: 'community', |
... | ... | |
81 | 82 |
public routerHelper: RouterHelper = new RouterHelper(); |
82 | 83 |
private user: User; |
83 | 84 |
|
85 |
@ViewChild(SubscribeComponent) subscribeComponent: SubscribeComponent = null; |
|
86 |
|
|
84 | 87 |
constructor( |
85 | 88 |
private element: ElementRef, |
86 | 89 |
private route: ActivatedRoute, |
modules/uoa-connect-portal/trunk/src/app/htmlPages/organizations/organizationsPage.component.ts | ||
---|---|---|
1 | 1 |
import {Component} from '@angular/core'; |
2 |
import {Breadcrumb} from "../../openaireLibrary/utils/breadcrumbs/breadcrumbs.component"; |
|
2 | 3 |
|
3 | 4 |
@Component({ |
4 | 5 |
selector: 'organizations', |
5 | 6 |
template: ` |
6 |
<div class=" uk-section tm-middle uk-container uk-padding-remove-top uk-margin-top" id="tm-main"> |
|
7 |
<div class="uk-container uk-margin-bottom"> |
|
8 |
<div class="uk-article-title custom-article-title uk-margin-bottom"> Organizations related to the community |
|
9 |
</div> |
|
10 |
<html-page description="Organizations" pageTitle="Related Organizations"></html-page> |
|
7 |
<div class="communityBackground uk-section tm-middle uk-padding-remove-top" id="tm-main"> |
|
8 |
<breadcrumbs [addClass]="'uk-margin-large-left uk-margin-remove-bottom uk-margin-small-top'" [breadcrumbs]="breadcrumbs"></breadcrumbs> |
|
9 |
|
|
10 |
<div class="uk-container uk-container-large uk-margin-bottom"> |
|
11 |
<div class="uk-h2 uk-margin-medium-top uk-margin-bottom">Supporting Organizations</div> |
|
12 |
<html-page description="Organizations" pageTitle="Supporting Organizations"></html-page> |
|
11 | 13 |
<affiliations [longView]="true" [getAffiliationsFromAPI]="true"></affiliations> |
12 | 14 |
</div> |
13 | 15 |
</div> |
14 | 16 |
` |
15 | 17 |
}) |
16 | 18 |
export class OrganizationsPageComponent { |
19 |
public breadcrumbs: Breadcrumb[] = [{name: 'home', route: '/'}, {name: 'about - supporting organizations'}]; |
|
20 |
|
|
17 | 21 |
constructor () {} |
18 | 22 |
public ngOnInit() { |
19 | 23 |
} |
modules/uoa-connect-portal/trunk/src/app/htmlPages/organizations/organizationsPage.module.ts | ||
---|---|---|
11 | 11 |
import {HelperModule} from "../../openaireLibrary/utils/helper/helper.module"; |
12 | 12 |
import {CommonModule} from "@angular/common"; |
13 | 13 |
import {HtmlPagesModule} from "../htmlPages.module"; |
14 |
import {BreadcrumbsModule} from "../../openaireLibrary/utils/breadcrumbs/breadcrumbs.module"; |
|
14 | 15 |
|
15 | 16 |
@NgModule({ |
16 | 17 |
imports: [ |
17 |
OrganizationsPageRoutingModule, AffiliationsModule, HelperModule, CommonModule, HtmlPagesModule |
|
18 |
OrganizationsPageRoutingModule, AffiliationsModule, HelperModule, CommonModule, HtmlPagesModule, |
|
19 |
BreadcrumbsModule |
|
18 | 20 |
], |
19 | 21 |
declarations: [ |
20 | 22 |
OrganizationsPageComponent |
modules/uoa-connect-portal/trunk/src/app/app.module.ts | ||
---|---|---|
30 | 30 |
import {PiwikService} from "./openaireLibrary/utils/piwik/piwik.service"; |
31 | 31 |
import {CommunityService} from "./openaireLibrary/connect/community/community.service"; |
32 | 32 |
import {InviteBasicModule} from "./utils/subscribe/invite/inviteBasic.module"; |
33 |
import {SubscribeService} from "./openaireLibrary/utils/subscribe/subscribe.service"; |
|
33 | 34 |
|
34 | 35 |
@NgModule({ |
35 | 36 |
|
... | ... | |
52 | 53 |
declarations: [ AppComponent, OpenaireErrorPageComponent, ThemeComponent, PageURLResolverComponent], |
53 | 54 |
exports: [ AppComponent ], |
54 | 55 |
providers:[ |
55 |
EnvironmentSpecificResolver, CommunitiesService, LayoutService, |
|
56 |
EnvironmentSpecificResolver, CommunitiesService, LayoutService, SubscribeService,
|
|
56 | 57 |
//FreeGuard, PreviousRouteRecorder, PiwikService, CommunityService, |
57 | 58 |
{ |
58 | 59 |
provide: HTTP_INTERCEPTORS, |
modules/uoa-connect-portal/trunk/src/app/utils/subscribe/subscribe.component.ts | ||
---|---|---|
25 | 25 |
<p>Please login first to subscribe</p> |
26 | 26 |
</div> |
27 | 27 |
<button *ngIf="!subscribed" [class]="'uk-button portal-button uk-button-small uk-width-1-1 ' + (loading ? ' uk-disabled' : '')" |
28 |
(click)="subscribe()"> Subscribe</button> |
|
28 |
(click)="subscribe()"> |
|
29 |
<span class="uk-icon uk-flex uk-flex-middle"> |
|
30 |
<svg height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> |
|
31 |
<path d="M0 0h24v24H0z" fill="none"></path> |
|
32 |
<path d="M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3zm-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3zm0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5zm8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5z"></path> |
|
33 |
</svg> |
|
34 |
<span class="space">Subscribe</span> |
|
35 |
</span> |
|
36 |
</button> |
|
29 | 37 |
<button *ngIf="subscribed" [class]="'subscribed-button uk-button uk-button-small uk-width-1-1 ' + (loading ? ' uk-disabled' : '')" |
30 |
(click)="confirmOpen()"> Subscribed</button> |
|
38 |
(click)="confirmOpen()"> |
|
39 |
<span class="uk-icon uk-flex uk-flex-middle"> |
|
40 |
<svg height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> |
|
41 |
<path d="M0 0h24v24H0z" fill="none"></path> |
|
42 |
<path d="M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3zm-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3zm0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5zm8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5z"></path> |
|
43 |
</svg> |
|
44 |
<span class="space">Subscribed</span> |
|
45 |
</span> |
|
46 |
</button> |
|
31 | 47 |
</span> |
32 | 48 |
|
33 |
<span *ngIf="showNumbers && subscribers !=null && subscribers > 0 && showTemplate"> |
|
49 |
<span *ngIf="showNumbers && subscribers !=null && subscribers > 0 && showTemplate" class="uk-display-inline-block">
|
|
34 | 50 |
<span class="lowOpacityColor uk-text-muted">Members: </span> {{subscribers}} |
35 | 51 |
</span> |
36 | 52 |
<modal-alert (alertOutput)="confirmClose($event)"> |
... | ... | |
90 | 106 |
//this.init(); |
91 | 107 |
} |
92 | 108 |
|
109 |
private isSubscribed() { |
|
110 |
this._subscribeService.isSubscribed.subscribe( |
|
111 |
res => { |
|
112 |
console.log("Subscribe component: isSubscribed: "+res); |
|
113 |
this.subscribed = res; |
|
114 |
if (this.subscribed) { |
|
115 |
this.subscribeEvent.emit({ |
|
116 |
value: "ok" |
|
117 |
}); |
|
118 |
} |
|
119 |
} |
|
120 |
); |
|
121 |
} |
|
122 |
|
|
93 | 123 |
private init() { |
94 | 124 |
if (!this.showNumbers) { |
95 | 125 |
let email = (this.user) ? this.user.email : null; |
... | ... | |
97 | 127 |
this.subscribed = false; |
98 | 128 |
} else { |
99 | 129 |
if (this.communityId) { |
100 |
this._subscribeService.isSubscribedToCommunity(this.properties, this.communityId).subscribe( |
|
101 |
res => { |
|
102 |
this.subscribed = res; |
|
103 |
if (this.subscribed) { |
|
104 |
this.subscribeEvent.emit({ |
|
105 |
value: "ok" |
|
106 |
}); |
|
107 |
} |
|
108 |
}, |
|
109 |
error => { |
|
110 |
this.handleError("Error getting response if email: " + email + " is subscribed to community with id: " + this.communityId, error); |
|
111 |
}); |
|
130 |
// this._subscribeService.isSubscribedToCommunity(this.properties, this.communityId).subscribe( |
|
131 |
// res => { |
|
132 |
// this.subscribed = res; |
|
133 |
// if (this.subscribed) { |
|
134 |
// this.subscribeEvent.emit({ |
|
135 |
// value: "ok" |
|
136 |
// }); |
|
137 |
// } |
|
138 |
// }, |
|
139 |
// error => { |
|
140 |
// this.handleError("Error getting response if email: " + email + " is subscribed to community with id: " + this.communityId, error); |
|
141 |
// }); |
|
142 |
|
|
143 |
this._subscribeService.initIsSubscribedToCommunity(this.properties, this.communityId); |
|
144 |
this.isSubscribed(); |
|
112 | 145 |
} |
113 | 146 |
} |
114 | 147 |
} else { |
modules/uoa-connect-portal/trunk/src/app/utils/subscribe/subscribe.module.ts | ||
---|---|---|
25 | 25 |
return { |
26 | 26 |
ngModule: SubscribeModule, |
27 | 27 |
providers: [ |
28 |
SubscribeService, EmailService, CommunityService
|
|
28 |
/*SubscribeService,*/ EmailService, CommunityService
|
|
29 | 29 |
] |
30 | 30 |
} |
31 | 31 |
} |
modules/uoa-connect-portal/trunk/src/app/utils/subscribe/invite/invite.component.html | ||
---|---|---|
1 | 1 |
<schema2jsonld *ngIf="url" [URL]="url" [name]="pageTitle" type="other"></schema2jsonld> |
2 | 2 |
|
3 |
<div *ngIf="longView == true"> |
|
4 |
<div class="uk-section uk-padding-remove-top tm-middle uk-container" id="tm-main"> |
|
3 |
<div *ngIf="longView == true" class="communityBackground"> |
|
4 |
<div class="uk-section uk-padding-remove-top tm-middle" id="tm-main"> |
|
5 |
<breadcrumbs addClass="uk-margin-large-left uk-margin-remove-bottom uk-margin-small-top" [breadcrumbs]="breadcrumbs"></breadcrumbs> |
|
5 | 6 |
|
6 | 7 |
<div class="uk-container uk-margin-bottom"> |
7 | 8 |
<helper *ngIf="pageContents && pageContents['top'] && pageContents['top'].length > 0" |
... | ... | |
153 | 154 |
</div> |
154 | 155 |
</div> |
155 | 156 |
</div> |
156 |
<div class=""> |
|
157 |
<button *ngIf="!longView" [class]=" ((buttonSizeSmall)?'uk-button-small':'') + ' uk-button portal-button uk-button-small uk-width-1-1'"> |
|
158 |
Invite users |
|
157 |
<div *ngIf="!longView" class="uk-margin-small-top"> |
|
158 |
<button [class]=" ((buttonSizeSmall)?'uk-button-small':'') + ' uk-button portal-button uk-button-small uk-width-1-1'"> |
|
159 |
<span class="uk-icon uk-flex uk-flex-middle"> |
|
160 |
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"> |
|
161 |
<path d="M0 0h24v24H0z" fill="none"></path> |
|
162 |
<path d="M8 10H5V7H3v3H0v2h3v3h2v-3h3v-2zm10 1c1.66 0 2.99-1.34 2.99-3S19.66 5 18 5c-.32 0-.63.05-.91.14.57.81.9 1.79.9 2.86s-.34 2.04-.9 2.86c.28.09.59.14.91.14zm-5 0c1.66 0 2.99-1.34 2.99-3S14.66 5 13 5c-1.66 0-3 1.34-3 3s1.34 3 3 3zm6.62 2.16c.83.73 1.38 1.66 1.38 2.84v2h3v-2c0-1.54-2.37-2.49-4.38-2.84zM13 13c-2 0-6 1-6 3v2h12v-2c0-2-4-3-6-3z"></path> |
|
163 |
</svg> |
|
164 |
<span class="space">Invite users</span> |
|
165 |
</span> |
|
159 | 166 |
</button> |
160 | 167 |
<div uk-dropdown="mode: click" class="uk-form uk-margin-small uk-alert uk-background-default" id="toggle-usage"> |
161 | 168 |
<div class="uk-margin-top"> |
modules/uoa-connect-portal/trunk/src/app/utils/subscribe/invite/invite.component.ts | ||
---|---|---|
22 | 22 |
import {PiwikService} from "../../../openaireLibrary/utils/piwik/piwik.service"; |
23 | 23 |
import {PiwikHelper} from "../../piwikHelper"; |
24 | 24 |
import {UserManagementService} from "../../../openaireLibrary/services/user-management.service"; |
25 |
import {Breadcrumb} from "../../../openaireLibrary/utils/breadcrumbs/breadcrumbs.component"; |
|
25 | 26 |
|
26 | 27 |
@Component({ |
27 | 28 |
selector: 'invite', |
... | ... | |
71 | 72 |
piwiksub: any; |
72 | 73 |
private user: User; |
73 | 74 |
|
75 |
public breadcrumbs: Breadcrumb[] = [{name: 'home', route: '/'}, {name: 'invite'}]; |
|
76 |
|
|
74 | 77 |
constructor( |
75 | 78 |
private route: ActivatedRoute, |
76 | 79 |
private _router: Router, |
modules/uoa-connect-portal/trunk/src/app/utils/subscribe/invite/inviteBasic.module.ts | ||
---|---|---|
16 | 16 |
import {Schema2jsonldModule} from "../../../openaireLibrary/sharedComponents/schema2jsonld/schema2jsonld.module"; |
17 | 17 |
import {SEOServiceModule} from "../../../openaireLibrary/sharedComponents/SEO/SEOService.module"; |
18 | 18 |
import {PiwikService} from "../../../openaireLibrary/utils/piwik/piwik.service"; |
19 |
import {BreadcrumbsModule} from "../../../openaireLibrary/utils/breadcrumbs/breadcrumbs.module"; |
|
19 | 20 |
|
20 | 21 |
@NgModule({ |
21 | 22 |
imports: [ |
22 | 23 |
RouterModule, CommonModule, FormsModule, CKEditorModule, ErrorMessagesModule, |
23 |
HelperModule, Schema2jsonldModule, SEOServiceModule |
|
24 |
HelperModule, Schema2jsonldModule, SEOServiceModule, BreadcrumbsModule
|
|
24 | 25 |
], |
25 | 26 |
declarations: [ |
26 | 27 |
InviteComponent |
modules/uoa-connect-portal/trunk/src/app/curators/curators.component.html | ||
---|---|---|
1 | 1 |
<schema2jsonld *ngIf="url" [URL]="url" [name]="pageTitle" type="other"></schema2jsonld> |
2 | 2 |
|
3 | 3 |
<ng-container *ngIf="longView else shortView"> |
4 |
<div class="image-front-topbar uk-section-default uk-position-relative" |
|
5 |
uk-scrollspy="{"target":"[uk-scrollspy-class]","cls":"uk-animation-fade","delay":false}" |
|
6 |
tm-header-transparent="light"> |
|
7 |
<div style=" min-height: 650px;" class="uk-section uk-padding-remove-bottom uk-flex uk-flex-middle"> |
|
4 |
<!-- <div class="image-front-topbar uk-section-default uk-position-relative"--> |
|
5 |
<!-- uk-scrollspy="{"target":"[uk-scrollspy-class]","cls":"uk-animation-fade","delay":false}"--> |
|
6 |
<!-- tm-header-transparent="light">--> |
|
7 |
<!-- uk-flex uk-flex-middle--> |
|
8 |
<div style=" min-height: 650px;" class="communityBackground uk-section uk-padding-remove-top uk-padding-remove-bottom "> |
|
8 | 9 |
<div class="uk-align-center"> |
9 |
<div class="uk-section"> |
|
10 |
<div class="uk-container"> |
|
11 |
<helper *ngIf="pageContents && pageContents['top'] && pageContents['top'].length > 0" |
|
12 |
[texts]="pageContents['top']"></helper> |
|
10 |
<breadcrumbs addClass="uk-margin-large-left uk-margin-remove-bottom uk-margin-small-top" [breadcrumbs]="breadcrumbs"></breadcrumbs> |
|
11 |
|
|
12 |
<div class="uk-container uk-container-large"> |
|
13 | 13 |
<div *ngIf="showLoading" class="uk-margin-large"> |
14 | 14 |
<div class="uk-animation-fade uk-margin-top uk-width-1-1" role="alert"><span |
15 | 15 |
class="loading-gif uk-align-center"></span></div> |
16 | 16 |
</div> |
17 |
<div *ngIf="!showLoading && curators.length > 0"> |
|
18 |
<h4 class="uk-margin-top uk-h4"> |
|
19 |
<span class="uk-text-bold">Curators</span> |
|
17 |
<!-- && curators.length > 0--> |
|
18 |
<div *ngIf="!showLoading"> |
|
19 |
<div class="uk-margin-medium-top uk-h2"> |
|
20 |
<span class="">Curators</span> |
|
20 | 21 |
<span> ({{curators.length}})</span> |
21 |
</h4> |
|
22 |
</div> |
|
23 |
<helper *ngIf="pageContents && pageContents['top'] && pageContents['top'].length > 0" |
|
24 |
[texts]="pageContents['top']"></helper> |
|
22 | 25 |
<div *ngFor="let curator of curators let i=index;" |
23 | 26 |
class="uk-width-1-1 uk-card uk-card-default uk-card-body uk-margin-top uk-animation-slide-top"> |
24 | 27 |
<div |
... | ... | |
83 | 86 |
<helper *ngIf="pageContents && pageContents['bottom'] && pageContents['bottom'].length > 0" |
84 | 87 |
[texts]="pageContents['bottom']"></helper> |
85 | 88 |
</div> |
86 |
</div> |
|
87 | 89 |
</div> |
88 | 90 |
</div> |
89 |
</div>
|
|
91 |
<!-- </div>-->
|
|
90 | 92 |
</ng-container> |
91 | 93 |
<ng-template #shortView> |
92 | 94 |
<div class="uk-grid"> |
... | ... | |
101 | 103 |
<!-- <img *ngIf="!curator.photo || curator.photo == ''" class="uk-border-circle curator-photo"--> |
102 | 104 |
<!-- src="../../assets/common-assets/curator-default.png" alt="Curator Photo">--> |
103 | 105 |
<!-- </span>--> |
104 |
<a>{{curator.name}}</a> |
|
106 |
|
|
107 |
<a> |
|
108 |
<span class="user-circle-background"> |
|
109 |
<svg height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"> |
|
110 |
<path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"></path> |
|
111 |
<path d="M0 0h24v24H0z" fill="none"></path> |
|
112 |
</svg> |
|
113 |
</span> |
|
114 |
{{curator.name}} |
|
115 |
</a> |
|
105 | 116 |
<span class="default-dropdown uk-margin-remove-top uk-padding-medium uk-width-medium" |
106 | 117 |
uk-dropdown="pos: bottom-left; mode:click; "> |
107 | 118 |
<span class="uk-grid uk-grid-stack"> |
modules/uoa-connect-portal/trunk/src/app/curators/curators.component.ts | ||
---|---|---|
11 | 11 |
import {SEOService} from "../openaireLibrary/sharedComponents/SEO/SEO.service"; |
12 | 12 |
import {PiwikService} from "../openaireLibrary/utils/piwik/piwik.service"; |
13 | 13 |
import {PiwikHelper} from "../utils/piwikHelper"; |
14 |
import {Breadcrumb} from "../openaireLibrary/utils/breadcrumbs/breadcrumbs.component"; |
|
14 | 15 |
|
15 | 16 |
@Component({ |
16 | 17 |
selector: 'curators', |
... | ... | |
38 | 39 |
public url: string = null; |
39 | 40 |
public pageTitle: string = "Curators"; |
40 | 41 |
|
42 |
public breadcrumbs: Breadcrumb[] = [{name: 'home', route: '/'}, {name: 'About - curators'}]; |
|
43 |
|
|
41 | 44 |
constructor (private route: ActivatedRoute, |
42 | 45 |
private curatorsService: CuratorService, |
43 | 46 |
private communitiesService: CommunitiesService, |
... | ... | |
106 | 109 |
} |
107 | 110 |
|
108 | 111 |
private getPageContents() { |
109 |
this.helper.getPageHelpContents(this.properties, 'connect', this._router.url).subscribe(contents => {
|
|
112 |
this.helper.getPageHelpContents(this.properties, this.communityId, this._router.url).subscribe(contents => {
|
|
110 | 113 |
this.pageContents = contents; |
111 | 114 |
}) |
112 | 115 |
} |
113 | 116 |
|
114 | 117 |
private getDivContents() { |
115 |
this.helper.getDivHelpContents(this.properties, 'connect', this._router.url).subscribe(contents => {
|
|
118 |
this.helper.getDivHelpContents(this.properties, this.communityId, this._router.url).subscribe(contents => {
|
|
116 | 119 |
this.divContents = contents; |
117 | 120 |
}) |
118 | 121 |
} |
modules/uoa-connect-portal/trunk/src/app/curators/curators.module.ts | ||
---|---|---|
12 | 12 |
import {SEOServiceModule} from "../openaireLibrary/sharedComponents/SEO/SEOService.module"; |
13 | 13 |
import {PiwikService} from "../openaireLibrary/utils/piwik/piwik.service"; |
14 | 14 |
import {PiwikServiceModule} from "../openaireLibrary/utils/piwik/piwikService.module"; |
15 |
import {BreadcrumbsModule} from "../openaireLibrary/utils/breadcrumbs/breadcrumbs.module"; |
|
15 | 16 |
|
16 | 17 |
@NgModule({ |
17 | 18 |
imports: [ |
18 | 19 |
CommonModule, FormsModule, RouterModule, |
19 | 20 |
CuratorsRoutingModule, AffiliationsModule, HelperModule, |
20 |
Schema2jsonldModule, SEOServiceModule, PiwikServiceModule |
|
21 |
Schema2jsonldModule, SEOServiceModule, PiwikServiceModule, |
|
22 |
BreadcrumbsModule |
|
21 | 23 |
], |
22 | 24 |
declarations: [ |
23 | 25 |
CuratorsComponent |
modules/uoa-connect-portal/trunk/src/app/app.component.ts | ||
---|---|---|
35 | 35 |
<router-outlet></router-outlet> |
36 | 36 |
</main> |
37 | 37 |
</div> |
38 |
<subscribe id="subscribeBtn" *ngIf="isClient && properties && communityId != null && communityId != ''" |
|
39 |
[communityId]="communityId" [properties]="properties"></subscribe> |
|
40 |
<!-- && managerOfCommunities --> |
|
41 |
<invite id="inviteBtn" *ngIf="isClient && properties && communityId != null && communityId != '' && managerOfCommunities" |
|
42 |
[longView]=false [buttonSizeSmall]=false [properties]="properties"></invite> |
|
43 |
|
|
38 |
<div id="subscribeAndInviteBtn" *ngIf="isClient && properties && communityId"> |
|
39 |
<subscribe [communityId]="communityId" [properties]="properties"></subscribe> |
|
40 |
<invite *ngIf="managerOfCommunities" [longView]=false [buttonSizeSmall]=false [properties]="properties"></invite> |
|
41 |
</div> |
|
44 | 42 |
<!--feedback *ngIf= "isClient && properties" portalName="Connect" [feedbackQuestionaire]=properties.feedbackQuestionaire></feedback--> |
45 | 43 |
<cookie-law *ngIf="isClient" position="bottom"> |
46 | 44 |
OpenAIRE uses cookies in order to function properly.<br> |
... | ... | |
201 | 199 |
new MenuItem("", "Sources and methology", "", "/content", false, [], ["/content"], this.properties.environment != "development" ? {} : {communityId: community.communityId}), |
202 | 200 |
new MenuItem("", "Projects and funding Opportunities", "", "/projects", false, [], ["/projects"], this.properties.environment != "development" ? {} : {communityId: community.communityId}), |
203 | 201 |
new MenuItem("", "National Bulletins", "", "/national-bulletins", false, [], ["/national-bulletins"], this.properties.environment != "development" ? {} : {communityId: community.communityId}), |
204 |
//new MenuItem("", "Subjects", "", "/subjects", false, [], ["/subjects"], this.properties.environment != "development" ? {} : {communityId: community.communityId}),
|
|
202 |
new MenuItem("", "Subjects", "", "/subjects", false, [], ["/subjects"], this.properties.environment != "development" ? {} : {communityId: community.communityId}), |
|
205 | 203 |
] |
206 | 204 |
}); |
207 | 205 |
if (isCommunityManager) { |
modules/uoa-connect-portal/trunk/src/app/login/libUser.module.ts | ||
---|---|---|
16 | 16 |
CommonModule, FormsModule, |
17 | 17 |
UserRoutingModule, UserModule, SubscribeModule |
18 | 18 |
], |
19 |
providers:[PreviousRouteRecorder, SubscribeService, EmailService],
|
|
19 |
providers:[PreviousRouteRecorder, /*SubscribeService,*/ EmailService],
|
|
20 | 20 |
declarations: [ |
21 | 21 |
OpenaireUserComponent |
22 | 22 |
|
modules/uoa-connect-portal/trunk/src/app/app-routing.module.ts | ||
---|---|---|
24 | 24 |
{ path: 'projects', loadChildren: './htmlPages/projects/projectsPage.module#ProjectsPageModule', resolve: { envSpecific: EnvironmentSpecificResolver }}, |
25 | 25 |
{ path: 'national-bulletins', loadChildren: './htmlPages/nationalBulletins/nationalBulletinsPage.module#NaionalBulletinPageModule', resolve: { envSpecific: EnvironmentSpecificResolver }}, |
26 | 26 |
{ path: 'curators', loadChildren: './curators/curators.module#CuratorsModule', resolve: { envSpecific: EnvironmentSpecificResolver }}, |
27 |
{ path: 'subjects', loadChildren: './subjects/subjects.module#SubjectsModule', resolve: { envSpecific: EnvironmentSpecificResolver }}, |
|
27 | 28 |
|
28 | 29 |
{ path: 'myCommunities', loadChildren: './my-communities/my-communities.module#MyCommunitiesModule', resolve: { envSpecific: EnvironmentSpecificResolver }}, |
29 | 30 |
|
modules/uoa-connect-portal/trunk/src/assets/connect-custom.css | ||
---|---|---|
238 | 238 |
|
239 | 239 |
/*CONNECT REDESIGN*/ |
240 | 240 |
|
241 |
#subscribeBtn, #inviteBtn { |
|
241 |
#subscribeAndInviteBtn { |
|
242 |
/*#subscribeBtn, #inviteBtn {*/ |
|
242 | 243 |
float: left; |
243 | 244 |
position: fixed; |
244 | 245 |
right: 0; |
245 | 246 |
z-index: 100; |
246 | 247 |
display: block; |
247 |
width: 110px;
|
|
248 |
top: calc(30% - 47px);
|
|
248 | 249 |
} |
249 | 250 |
|
250 |
#subscribeBtn { |
|
251 |
top: calc(35% - 47px); |
|
252 |
} |
|
253 |
|
|
254 |
#inviteBtn { |
|
255 |
top: calc(40% - 47px); |
|
256 |
} |
|
257 |
|
|
258 |
#subscribeBtn > * > button, #inviteBtn > * > button { |
|
251 |
#subscribeAndInviteBtn button { |
|
252 |
width: 125px; |
|
253 |
height: 35px; |
|
259 | 254 |
border-right: none; |
260 | 255 |
/*border-top-right-radius: 0;*/ |
261 | 256 |
/*border-bottom-right-radius: 0;*/ |
262 | 257 |
border-radius: 4px 0px 0px 4px; |
263 | 258 |
box-shadow: 0px 2px 6px #00000038; |
264 |
/*background-color: var(--portal-main-color);*/ |
|
265 | 259 |
} |
266 | 260 |
|
267 |
/*#subscribeBtn > * > button:hover, #inviteBtn > * > button:hover {*/ |
|
268 |
/* background-color: white;*/ |
|
269 |
/*}*/ |
|
270 |
|
|
271 | 261 |
.subscribed-button { |
272 | 262 |
background-color: #8AD15E !important; |
273 | 263 |
color: white !important; |
... | ... | |
287 | 277 |
z-index: 10000; |
288 | 278 |
} |
289 | 279 |
|
280 |
.user-circle-background { |
|
281 |
background-color: var(--portal-main-color); |
|
282 |
border-radius: 50%; |
|
283 |
height: 10px; |
|
284 |
width: 10px; |
|
285 |
display: inline-flex; |
|
286 |
padding: 2px; |
|
287 |
fill: white; |
|
288 |
} |
|
289 |
|
|
290 |
a:hover .user-circle-background { |
|
291 |
background-color: var(--portal-dark-color); |
|
292 |
} |
|
293 |
|
|
290 | 294 |
/*END OF CONNECT REDESIGN*/ |
291 | 295 |
|
292 | 296 |
.communityApp .uk-logo{ |
Also available in: Unified diff
[Trunk | Connect]:
1. app-routing.module.ts: Add route '/subjects'.
2. app.component.ts: Group subscribe and invite buttons under id="subscribeAndInviteBtn" (keep distance between them alwayes the same) | uncomment menu item 'Subjects' in About.
3. app.module.ts: import 'SubscribeService' (singleton service to update everywhere subscriber status).
4. libUser.module.ts & subscribe.module.ts: remove import of 'SubscribeService' (singleton service to update everywhere subscriber status).
5. community.component.html:
a. Improve some checks
b. In main tabs of the page (class main-tabs) add class 'uk-text-truncate' and remove class 'uk-width-3-4' (each tab has max-width)
c. Add icon in 'Analytics' tab
d. [Bug fix] In description, fix overflow and max height of box
6. community.component.ts: Add field '@ViewChild(SubscribeComponent) subscribeComponent: SubscribeComponent' to add some checks in html.
7. curators.component.html: Remove div with class 'image-front-topbar' | Update css for title | Add <breadcrumbs> | Add user icon for each curator.
8. curators.component.ts: Initialize breadcrumb | [Bug fix] In methods 'getPageContents()' and 'getDivContents()' use communityId (instead of 'connect').
9. curators.module.ts & organizationsPage.module.ts & inviteBasic.module.ts: import 'BreadcrumbsModule'.
10. organizationsPage.component.ts: Update css for title | Add <breadcrumbs> | Initialize breadcrumb.
11. subjects.component.ts, subjects.module.ts, subjects-routing.module.ts: Add page for Subjects.
12. invite.component.html: Add <breadcrumbs> in longView | Add icon in button 'Invite users'.
13. invite.component.ts: Initialize breadcrumb.
14. subscribe.component.ts:
a. Add icon in button "Subscribe"/ "Subscribed"
b. Add class 'uk-display-inline-block' in showNumbers (members)
c. Initialize and get subscriber status with new methods of service (initIsSubscribedToCommunity() & isSubscribed - BehaviorSubject instead of isSubscribedToCommunity())
15. connect-custom.css: Group css for #subscribeBtn, #inviteBtn into #subscribeAndInviteBtn | Add css for class 'user-circle-background' (background of user icon in curators).