[Monitor]: Delete connect folders
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-monitor-portal/trunk/monitor@57323 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
ff74c495bd
commit
8b69941b2b
|
@ -1,93 +0,0 @@
|
|||
<schema2jsonld *ngIf="url" [URL]="url" [name]="pageTitle" type="other"></schema2jsonld>
|
||||
|
||||
<ng-template #card let-organization="organization" let-fullView="fullView">
|
||||
<div class="affiliation-logo uk-flex uk-flex-middle uk-flex-center uk-padding-remove-horizontal"
|
||||
[ngClass]="(!fullView)?'uk-card-body':'uk-card-media-top uk-padding-small'">
|
||||
<div class="uk-align-center">
|
||||
<img *ngIf="organization.logo_url != null && organization.logo_url != '' "
|
||||
src="{{organization.logo_url}}" alt="{{(organization.name)?organization.name:''}} logo">
|
||||
<span *ngIf="organization.logo_url == null || organization.logo_url == ''" class="uk-icon">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" icon="image" ratio="2.5"><circle cx="16.1" cy="6.1"
|
||||
r="1.1"></circle><rect
|
||||
fill="none" stroke="#000" x="0.5" y="2.5" width="19" height="15"></rect><polyline fill="none" stroke="#000"
|
||||
stroke-width="1.01"
|
||||
points="4,13 8,9 13,14"></polyline><polyline
|
||||
fill="none" stroke="#000" stroke-width="1.01" points="11,12 12.5,10.5 16,14"></polyline></svg>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="organization.name && fullView" class="uk-card-body uk-padding-remove-horizontal uk-padding-remove-top">
|
||||
<span class="uk-text-bold uk-text-small">{{organization.name.slice(0, 100)}}</span><span
|
||||
*ngIf="organization.name.length > 100">...</span>
|
||||
</div>
|
||||
</ng-template>
|
||||
|
||||
<ng-container *ngIf="affiliations.length > 0">
|
||||
<div *ngIf="showLoading" class="uk-animation-fade uk-width-1-1" role="alert">
|
||||
<span class="loading-gif uk-align-center"></span>
|
||||
</div>
|
||||
<div *ngIf="longView"
|
||||
class="uk-child-width-1-5@l uk-child-width-1-3@m uk-child-width-1-2@s
|
||||
uk-text-center uk-grid-match uk-grid-small uk-grid-margin uk-margin-remove"
|
||||
uk-height-match="target: > div > .uk-card > .affiliation-content > .affiliation-logo"
|
||||
uk-scrollspy="cls: uk-animation-fade; target: > div > .uk-card; repeat: false"
|
||||
uk-grid>
|
||||
|
||||
<div *ngFor="let affiliation of affiliations">
|
||||
<div class="uk-card uk-card-default uk-card-small uk-padding-small">
|
||||
<a *ngIf="affiliation.website_url" target="_blank" [href]="affiliation.website_url" class="affiliation-content">
|
||||
<ng-container *ngTemplateOutlet="card; context: { organization: affiliation, fullView: true}"></ng-container>
|
||||
</a>
|
||||
<span *ngIf="!affiliation.website_url" class="affiliation-content">
|
||||
<ng-container *ngTemplateOutlet="card; context: { organization: affiliation, fullView: true}"></ng-container>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div *ngIf="communityFirstPage"
|
||||
class="uk-margin-large-top uk-margin uk-text-center uk-text-large uk-text-meta uk-text-bold">
|
||||
Related Organizations ({{affiliations.length}})
|
||||
</div>
|
||||
|
||||
<div *ngIf="!longView" [class]="'uk-position-relative uk-visible-toggle'" tabindex="-1"
|
||||
[attr.uk-slider]="sliderOptions">
|
||||
<div
|
||||
[class]="'uk-align-center uk-width-'+(affiliations.length >= affiliationsInSlider ? affiliationsInSlider : affiliations.length)+'-'+affiliationsInSlider">
|
||||
<ul class="uk-slider-items uk-grid-small" uk-height-match="target: > li > .uk-card" uk-grid>
|
||||
<li *ngFor="let affiliation of affiliations"
|
||||
[class]="'affiliation-element uk-width-1-'+(affiliations.length >= affiliationsInSlider ? affiliationsInSlider : affiliations.length)">
|
||||
<div class="uk-card uk-card-small uk-card-default uk-flex uk-flex-middle uk-flex-center uk-padding-small"
|
||||
[attr.uk-tooltip]="(affiliation.name) ? affiliation.name : 'cls: uk-invisible'">
|
||||
<a *ngIf="affiliation.website_url" target="_blank" [href]="affiliation.website_url"
|
||||
class="affiliation-content">
|
||||
<ng-container
|
||||
*ngTemplateOutlet="card; context: { organization: affiliation, fullView: false}"></ng-container>
|
||||
</a>
|
||||
<span *ngIf="!affiliation.website_url" class="affiliation-content">
|
||||
<ng-container *ngTemplateOutlet="card; context: { organization: affiliation}"></ng-container>
|
||||
</span>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- [class]="'uk-hidden-hover uk-position-center-left uk-padding uk-height-1-1 uk-flex uk-width-1-'+(affiliations.length >= affiliationsInSlider ? affiliationsInSlider : affiliations.length)"-->
|
||||
<!-- class="uk-position-center-right uk-padding uk-height-1-1 uk-flex"-->
|
||||
<a *ngIf="(affiliations.length > affiliationsInSlider) && arrows"
|
||||
class="uk-position-center-left uk-padding uk-height-1-1 uk-flex"
|
||||
href="#" uk-slidenav-previous uk-slider-item="previous"></a>
|
||||
<a *ngIf="(affiliations.length > affiliationsInSlider) && arrows"
|
||||
class="uk-position-center-right uk-padding uk-height-1-1 uk-flex"
|
||||
href="#" uk-slidenav-next uk-slider-item="next"></a>
|
||||
</div>
|
||||
<div *ngIf="communityFirstPage"
|
||||
[class]="'uk-align-center uk-width-'+(affiliations.length >= affiliationsInSlider ? affiliationsInSlider : affiliations.length)+'-'+affiliationsInSlider">
|
||||
<a routerLink="/organizations" class="uk-align-right uk-link">
|
||||
View more details
|
||||
</a>
|
||||
</div>
|
||||
</ng-container>
|
||||
|
||||
<!--<div *ngIf="affiliations.length == 0 && longView" class="uk-animation-fade uk-alert uk-alert-primary" role="alert">-->
|
||||
<!-- No affiliations available-->
|
||||
<!--</div>-->
|
|
@ -1,100 +0,0 @@
|
|||
import {Component, Input} from '@angular/core';
|
||||
import {ActivatedRoute, Router} from '@angular/router';
|
||||
import {Title, Meta} from '@angular/platform-browser';
|
||||
import {EnvProperties} from '../openaireLibrary/utils/properties/env-properties';
|
||||
import {AffiliationService} from "../openaireLibrary/connect/affiliations/affiliation.service";
|
||||
import {Affiliation} from "../openaireLibrary/utils/entities/CuratorInfo";
|
||||
import {ConnectHelper} from "../openaireLibrary/connect/connectHelper";
|
||||
import {SEOService} from "../openaireLibrary/sharedComponents/SEO/SEO.service";
|
||||
import {PiwikService} from "../openaireLibrary/utils/piwik/piwik.service";
|
||||
import {PiwikHelper} from "../utils/piwikHelper";
|
||||
|
||||
@Component({
|
||||
selector: 'affiliations',
|
||||
templateUrl: './affiliations.component.html'
|
||||
})
|
||||
export class AffiliationsComponent {
|
||||
@Input() getAffiliationsFromAPI: boolean = false;
|
||||
@Input() longView: boolean = false;
|
||||
@Input() communityFirstPage: boolean = false;
|
||||
@Input() affiliationsInSlider: number = 5;
|
||||
@Input() affiliations: Affiliation[] = [];
|
||||
@Input() sliderOptions = '';
|
||||
@Input() arrows = true;
|
||||
|
||||
public showLoading: boolean = false;
|
||||
|
||||
communityId: string;
|
||||
properties:EnvProperties;
|
||||
|
||||
public piwiksub: any;
|
||||
public url: string = null;
|
||||
public pageTitle: string = "Related Organizations";
|
||||
|
||||
constructor ( private route: ActivatedRoute, private _router: Router,
|
||||
private _meta: Meta,
|
||||
private _title: Title,
|
||||
private seoService: SEOService,
|
||||
private _piwikService: PiwikService,
|
||||
private affiliationService: AffiliationService) {}
|
||||
|
||||
public ngOnInit() {
|
||||
this.route.data
|
||||
.subscribe((data: { envSpecific: EnvProperties }) => {
|
||||
this.route.queryParams.subscribe(
|
||||
communityId => {
|
||||
this.communityId = ConnectHelper.getCommunityFromDomain(data.envSpecific.domain);
|
||||
if(!this.communityId) {
|
||||
this.communityId = communityId['communityId'];
|
||||
}
|
||||
|
||||
this.properties = data.envSpecific;
|
||||
if(this.longView) {
|
||||
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) {
|
||||
this.piwiksub = this._piwikService.trackView(this.properties, this.pageTitle, PiwikHelper.getSiteId(this.communityId, this.properties.environment)).subscribe();
|
||||
}
|
||||
this.url = this.properties.baseLink + this._router.url;
|
||||
this.seoService.createLinkForCanonicalURL(this.url);
|
||||
this.updateUrl(this.url);
|
||||
this.updateTitle(this.pageTitle);
|
||||
this.updateDescription("OpenAIRE - Connect, Community Gateway, research community, organizations");
|
||||
}
|
||||
if(this.getAffiliationsFromAPI) {
|
||||
this.showLoading = true;
|
||||
this.affiliationService.initAffiliations(this.properties, this.properties.communityAPI + this.communityId + "/organizations");
|
||||
this.affiliationService.affiliations.subscribe(
|
||||
affiliations => {
|
||||
this.affiliations = affiliations;
|
||||
this.showLoading = false;
|
||||
},
|
||||
error => {
|
||||
console.error("Affiliations Component: Error getting affiliations for community with id: "+this.communityId, error);
|
||||
this.showLoading = false;
|
||||
}
|
||||
);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
public ngOnDestroy() {
|
||||
if (this.piwiksub) {
|
||||
this.piwiksub.unsubscribe();
|
||||
}
|
||||
}
|
||||
|
||||
private updateDescription(description: string) {
|
||||
this._meta.updateTag({content: description}, "name='description'");
|
||||
this._meta.updateTag({content: description}, "property='og:description'");
|
||||
}
|
||||
|
||||
private updateTitle(title: string) {
|
||||
var _title = ((title.length > 50) ? title.substring(0, 50) : title);
|
||||
this._title.setTitle(_title);
|
||||
this._meta.updateTag({content: _title}, "property='og:title'");
|
||||
}
|
||||
|
||||
private updateUrl(url: string) {
|
||||
this._meta.updateTag({content: url}, "property='og:url'");
|
||||
}
|
||||
}
|
|
@ -1,30 +0,0 @@
|
|||
import { NgModule, ModuleWithProviders } from '@angular/core';
|
||||
|
||||
import {FreeGuard} from '../openaireLibrary/login/freeGuard.guard';
|
||||
import {PreviousRouteRecorder} from '../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
|
||||
import {IsRouteEnabled} from '../openaireLibrary/error/isRouteEnabled.guard'
|
||||
import {RouterModule} from '@angular/router';
|
||||
|
||||
import {AffiliationsComponent} from './affiliations.component';
|
||||
import {AffiliationService} from "../openaireLibrary/connect/affiliations/affiliation.service";
|
||||
import {CommonModule} from "@angular/common";
|
||||
import {Schema2jsonldModule} from "../openaireLibrary/sharedComponents/schema2jsonld/schema2jsonld.module";
|
||||
import {SEOServiceModule} from "../openaireLibrary/sharedComponents/SEO/SEOService.module";
|
||||
import {PiwikServiceModule} from "../openaireLibrary/utils/piwik/piwikService.module";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, RouterModule, Schema2jsonldModule, SEOServiceModule,
|
||||
PiwikServiceModule
|
||||
],
|
||||
declarations: [
|
||||
AffiliationsComponent
|
||||
],
|
||||
providers:[FreeGuard,PreviousRouteRecorder, IsRouteEnabled, AffiliationService],
|
||||
exports: [
|
||||
AffiliationsComponent
|
||||
]
|
||||
})
|
||||
|
||||
|
||||
export class AffiliationsModule{}
|
|
@ -1,41 +1,51 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { Routes, RouterModule } from '@angular/router';
|
||||
import {NgModule} from '@angular/core';
|
||||
import {RouterModule, Routes} from '@angular/router';
|
||||
|
||||
import { EnvironmentSpecificResolver} from './openaireLibrary/utils/properties/environmentSpecificResolver';
|
||||
import { EnvironmentSpecificService} from './openaireLibrary/utils/properties/environment-specific.service';
|
||||
import {EnvironmentSpecificResolver} from './openaireLibrary/utils/properties/environmentSpecificResolver';
|
||||
import {EnvironmentSpecificService} from './openaireLibrary/utils/properties/environment-specific.service';
|
||||
|
||||
import { OpenaireErrorPageComponent } from './error/errorPage.component';
|
||||
import {ThemeComponent} from "./test/theme.component";
|
||||
import {OpenaireErrorPageComponent} from './error/errorPage.component';
|
||||
|
||||
const routes: Routes = [
|
||||
// Other Pages
|
||||
{ path: '', loadChildren: './home/home.module#HomeModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
|
||||
{ path: 'monitor', loadChildren: './monitor/monitor.module#MonitorModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
|
||||
{ path: 'about', redirectTo: 'about/learn-how', pathMatch: 'full'},
|
||||
{ path: 'about/learn-how', loadChildren: './learn-how/learn-how.module#LearnHowModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
|
||||
{ path: 'about/learn-in-depth', loadChildren: './learn-how/learnInDepth/learn-in-depth.module#LearnInDepthModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
|
||||
{ path: 'contact-us', loadChildren: './contact/contact.module#ContactModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
|
||||
{ path: 'invite', loadChildren: './utils/subscribe/invite/invite.module#InviteModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
|
||||
{ path: 'content', loadChildren: './content/contentPage.module#ContentPageModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
|
||||
{ path: 'organizations', loadChildren: './htmlPages/organizations/organizationsPage.module#OrganizationsPageModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
|
||||
{ path: 'curators', loadChildren: './curators/curators.module#CuratorsModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
|
||||
|
||||
{ path: 'myCommunities', loadChildren: './my-communities/my-communities.module#MyCommunitiesModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
|
||||
|
||||
// Search Pages
|
||||
|
||||
{ path: 'search/find/communities', loadChildren: './searchPages/communities/searchCommunities.module#SearchCommunitiesModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
|
||||
|
||||
// Testing Page for help contents
|
||||
{ path: 'helper-test', loadChildren: './helper-test/helper-test.module#HelperTestModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
|
||||
|
||||
|
||||
// help pages - do not exist in Admin portal/api/db
|
||||
{ path: 'reload', loadChildren: './reload/libReload.module#LibReloadModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
|
||||
{ path: 'user-info', loadChildren: './login/libUser.module#LibUserModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
|
||||
{ path: 'error', component: OpenaireErrorPageComponent, resolve: { envSpecific: EnvironmentSpecificResolver }},
|
||||
{ path: 'theme', component: ThemeComponent},
|
||||
{ path: '**',pathMatch: 'full',component: OpenaireErrorPageComponent, resolve: { envSpecific: EnvironmentSpecificResolver }}
|
||||
{path: '', loadChildren: './home/home.module#HomeModule', resolve: {envSpecific: EnvironmentSpecificResolver}},
|
||||
{
|
||||
path: 'monitor',
|
||||
loadChildren: './monitor/monitor.module#MonitorModule',
|
||||
resolve: {envSpecific: EnvironmentSpecificResolver}
|
||||
},
|
||||
{path: 'about', redirectTo: 'about/learn-how', pathMatch: 'full'},
|
||||
{
|
||||
path: 'about/learn-how',
|
||||
loadChildren: './learn-how/learn-how.module#LearnHowModule',
|
||||
resolve: {envSpecific: EnvironmentSpecificResolver}
|
||||
},
|
||||
{
|
||||
path: 'about/learn-in-depth',
|
||||
loadChildren: './learn-how/learnInDepth/learn-in-depth.module#LearnInDepthModule',
|
||||
resolve: {envSpecific: EnvironmentSpecificResolver}
|
||||
},
|
||||
{
|
||||
path: 'contact-us',
|
||||
loadChildren: './contact/contact.module#ContactModule',
|
||||
resolve: {envSpecific: EnvironmentSpecificResolver}
|
||||
},
|
||||
{
|
||||
path: 'reload',
|
||||
loadChildren: './reload/libReload.module#LibReloadModule',
|
||||
resolve: {envSpecific: EnvironmentSpecificResolver}
|
||||
},
|
||||
{
|
||||
path: 'user-info',
|
||||
loadChildren: './login/libUser.module#LibUserModule',
|
||||
resolve: {envSpecific: EnvironmentSpecificResolver}
|
||||
},
|
||||
{path: 'error', component: OpenaireErrorPageComponent, resolve: {envSpecific: EnvironmentSpecificResolver}},
|
||||
{
|
||||
path: '**',
|
||||
pathMatch: 'full',
|
||||
component: OpenaireErrorPageComponent,
|
||||
resolve: {envSpecific: EnvironmentSpecificResolver}
|
||||
}
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
|
@ -43,4 +53,5 @@ const routes: Routes = [
|
|||
exports: [RouterModule],
|
||||
providers: [EnvironmentSpecificResolver, EnvironmentSpecificService]
|
||||
})
|
||||
export class AppRoutingModule { }
|
||||
export class AppRoutingModule {
|
||||
}
|
||||
|
|
|
@ -19,7 +19,6 @@ import {EnvironmentSpecificResolver} from './openaireLibrary/utils/properties/en
|
|||
import {CommunitiesService} from './openaireLibrary/connect/communities/communities.service';
|
||||
import {LayoutService} from "./openaireLibrary/services/layout.service";
|
||||
import {SubscribeModule} from './utils/subscribe/subscribe.module';
|
||||
import {ThemeComponent} from "./test/theme.component";
|
||||
|
||||
@NgModule({
|
||||
|
||||
|
@ -37,7 +36,7 @@ import {ThemeComponent} from "./test/theme.component";
|
|||
BrowserModule.withServerTransition({appId: 'my-app'}),
|
||||
AppRoutingModule
|
||||
],
|
||||
declarations: [ AppComponent, OpenaireErrorPageComponent, ThemeComponent],
|
||||
declarations: [ AppComponent, OpenaireErrorPageComponent],
|
||||
exports: [ AppComponent ],
|
||||
providers:[EnvironmentSpecificResolver, CommunitiesService, LayoutService],
|
||||
bootstrap: [AppComponent]
|
||||
|
|
|
@ -1,88 +0,0 @@
|
|||
<div class="uk-container line-height-normal uk-text-small" *ngIf="community">
|
||||
<div *ngIf="community.status =='manager'"
|
||||
class="uk-card-badge private-card-badge uk-width-1-3 uk-position-top-left uk-text-small uk-text-center">
|
||||
Private
|
||||
</div>
|
||||
<div *ngIf="community.isSubscribed"
|
||||
class="uk-position-top-right uk-card-badge portal-card-badge uk-width-1-2 uk-text-small uk-text-center">
|
||||
<span>Subscribed</span>
|
||||
</div>
|
||||
<div class="uk-card-media-top uk-padding uk-padding-remove-vertical uk-flex uk-flex-center uk-flex-middle">
|
||||
<a *ngIf="directLink" [href]="getCommunityPageUrl()" target="_blank">
|
||||
<div class="community">
|
||||
<img *ngIf="community.logoUrl != null && community.logoUrl != ''" src="{{community.logoUrl}}"
|
||||
alt="{{(community.title)?community.title:community.shortTitle}} logo">
|
||||
<span *ngIf="community.logoUrl == null || community.logoUrl == ''" class="uk-icon">
|
||||
<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" ratio="2.5"> <circle fill="none" stroke="#000"
|
||||
stroke-width="1.1" cx="7.7"
|
||||
cy="8.6" r="3.5"></circle> <path
|
||||
fill="none" stroke="#000" stroke-width="1.1"
|
||||
d="M1,18.1 C1.7,14.6 4.4,12.1 7.6,12.1 C10.9,12.1 13.7,14.8 14.3,18.3"></path> <path fill="none"
|
||||
stroke="#000"
|
||||
stroke-width="1.1"
|
||||
d="M11.4,4 C12.8,2.4 15.4,2.8 16.3,4.7 C17.2,6.6 15.7,8.9 13.6,8.9 C16.5,8.9 18.8,11.3 19.2,14.1"></path></svg>
|
||||
</span>
|
||||
</div>
|
||||
</a>
|
||||
<a *ngIf="!directLink" (click)="confirmModalOpen()">
|
||||
<div class="community">
|
||||
<img *ngIf="community.logoUrl != null && community.logoUrl != ''" src="{{community.logoUrl}}"
|
||||
alt="{{(community.title)?community.title:community.shortTitle}} logo">
|
||||
<span *ngIf="community.logoUrl == null || community.logoUrl == ''" class="uk-icon">
|
||||
<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" ratio="2.5"> <circle fill="none" stroke="#000"
|
||||
stroke-width="1.1" cx="7.7"
|
||||
cy="8.6" r="3.5"></circle> <path
|
||||
fill="none" stroke="#000" stroke-width="1.1"
|
||||
d="M1,18.1 C1.7,14.6 4.4,12.1 7.6,12.1 C10.9,12.1 13.7,14.8 14.3,18.3"></path> <path fill="none"
|
||||
stroke="#000"
|
||||
stroke-width="1.1"
|
||||
d="M11.4,4 C12.8,2.4 15.4,2.8 16.3,4.7 C17.2,6.6 15.7,8.9 13.6,8.9 C16.5,8.9 18.8,11.3 19.2,14.1"></path></svg>
|
||||
</span>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<div class="uk-card-body uk-padding-small uk-padding-remove-horizontal uk-padding-remove-top uk-margin-small-top uk-margin-bottom">
|
||||
<div class="uk-text-center uk-text-bold " [ngClass]="(showDescription)?'uk-margin-bottom':''">
|
||||
<a *ngIf="directLink" [href]="getCommunityPageUrl()" target="_blank">
|
||||
<span *ngIf="community.title">
|
||||
{{community.title.slice(0, thresholdTitle)}}
|
||||
<span *ngIf="community.title.length > thresholdTitle">...</span>
|
||||
</span>
|
||||
<span *ngIf="!community.title && community.shortTitle">
|
||||
{{community.shortTitle.slice(0, thresholdTitle)}}
|
||||
<span *ngIf="community.shortTitle.length > thresholdTitle">...</span>
|
||||
</span>
|
||||
</a>
|
||||
<a *ngIf="!directLink" (click)="confirmModalOpen()">
|
||||
<span *ngIf="community.title">
|
||||
{{community.title.slice(0, thresholdTitle)}}
|
||||
<span *ngIf="community.title.length > thresholdTitle">...</span>
|
||||
</span>
|
||||
<span *ngIf="!community.title && community.shortTitle">
|
||||
{{community.shortTitle.slice(0, thresholdTitle)}}
|
||||
<span *ngIf="community.shortTitle.length > thresholdTitle">...</span>
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="uk-text-left" *ngIf="community.description != null && showDescription"
|
||||
title="{{community.description}}">
|
||||
<span>{{community.description.slice(0, thresholdDescription)}}<span
|
||||
*ngIf="community.description.length > thresholdDescription">...</span></span>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="uk-position-small uk-position-bottom-right">
|
||||
<a *ngIf="directLink" [href]="getCommunityPageUrl()" target="_blank" class="portal-link uk-text-uppercase uk-text-bold">
|
||||
Visit
|
||||
</a>
|
||||
<a *ngIf="!directLink" (click)="confirmModalOpen()" class="portal-link uk-text-uppercase uk-text-bold">
|
||||
Visit
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<modal-alert #AlertModal (alertOutput)="goToCommunityPage($event)">
|
||||
<div class="uk-text-left">
|
||||
You will be navigated to a new tab. Are you sure that you want to proceed?
|
||||
</div>
|
||||
</modal-alert>
|
|
@ -1,94 +0,0 @@
|
|||
import {Component, Input, ViewChild} from '@angular/core';
|
||||
import {ActivatedRoute, Router} from '@angular/router';
|
||||
import {Location} from '@angular/common';
|
||||
|
||||
import {EnvProperties} from '../../openaireLibrary/utils/properties/env-properties';
|
||||
import {CommunityInfo} from '../../openaireLibrary/connect/community/communityInfo';
|
||||
import {LocalStorageService} from "../../openaireLibrary/services/localStorage.service";
|
||||
|
||||
@Component({
|
||||
selector: 'browse-community',
|
||||
templateUrl: 'browse-community.component.html'
|
||||
})
|
||||
|
||||
export class BrowseCommunityComponent {
|
||||
@Input() public community: CommunityInfo = null;
|
||||
@Input() public showDescription: boolean = true;
|
||||
@ViewChild('AlertModal') modal;
|
||||
|
||||
public hiddenMessage: string = "Community is hidden to registered users. It is visible only to users that have privileges to manage community; delay: 100";
|
||||
// cut title too
|
||||
// check title length, if is manager, if is private and cut description accordingly
|
||||
public thresholdTitle: number = 50;
|
||||
public thresholdDescription: number = 120;
|
||||
properties: EnvProperties;
|
||||
public directLink: boolean = true;
|
||||
|
||||
constructor(private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private location: Location,
|
||||
private localStorageService: LocalStorageService) {
|
||||
}
|
||||
|
||||
|
||||
public ngOnInit() {
|
||||
this.route.data
|
||||
.subscribe((data: { envSpecific: EnvProperties }) => {
|
||||
this.properties = data.envSpecific;
|
||||
this.localStorageService.get().subscribe(value => {
|
||||
this.directLink = value;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
public ngOnDestroy() {
|
||||
}
|
||||
|
||||
isProduction(): boolean {
|
||||
return this.properties.environment != "development";
|
||||
}
|
||||
|
||||
getProductionPrefix(): string {
|
||||
return (this.properties.environment == "beta") ? "beta." : ""
|
||||
}
|
||||
|
||||
public confirmModalOpen() {
|
||||
this.modal.cancelButton = true;
|
||||
this.modal.okButton = true;
|
||||
this.modal.alertTitle = 'You are going to visit ' +
|
||||
((this.community.title) ? this.community.title : this.community.shortTitle) + ' Gateway';
|
||||
this.modal.alertMessage = false;
|
||||
this.modal.okButtonLeft = false;
|
||||
this.modal.okButtonText = 'Yes';
|
||||
this.modal.cancelButtonText = 'No';
|
||||
this.modal.choice = true;
|
||||
this.modal.open();
|
||||
}
|
||||
|
||||
public getCommunityPageUrl(): string {
|
||||
let url = '';
|
||||
if (this.isProduction()) {
|
||||
url = 'https://' + this.getProductionPrefix() + this.community.communityId + '.openaire.eu';
|
||||
} else {
|
||||
url = this.router.createUrlTree(['/'], {
|
||||
queryParams: {'communityId': this.community.communityId}
|
||||
}).toString();
|
||||
}
|
||||
return url;
|
||||
}
|
||||
|
||||
public goToCommunityPage(data: any) {
|
||||
if (data.value == true) {
|
||||
this.localStorageService.setCommunityDirectLink(data.choice);
|
||||
let url = '';
|
||||
if (this.isProduction()) {
|
||||
url = 'https://' + this.getProductionPrefix() + this.community.communityId + '.openaire.eu';
|
||||
} else {
|
||||
url = this.router.createUrlTree(['/'], {
|
||||
queryParams: {'communityId': this.community.communityId}
|
||||
}).toString();
|
||||
}
|
||||
window.open(url, '_blank');
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,29 +0,0 @@
|
|||
import {NgModule} from '@angular/core';
|
||||
import {CommonModule} from '@angular/common';
|
||||
import {FormsModule} from '@angular/forms';
|
||||
import {RouterModule} from '@angular/router';
|
||||
|
||||
import {BrowseCommunityComponent} from './browse-community.component';
|
||||
|
||||
import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard';
|
||||
|
||||
import {SearchFormModule} from '../../openaireLibrary/searchPages/searchUtils/searchForm.module';
|
||||
import {ManageModule} from '../../openaireLibrary/utils/manage/manage.module';
|
||||
import {AlertModalModule} from "../../openaireLibrary/utils/modal/alertModal.module";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule, RouterModule,
|
||||
SearchFormModule, ManageModule, AlertModalModule
|
||||
],
|
||||
declarations: [
|
||||
BrowseCommunityComponent
|
||||
],
|
||||
providers:[
|
||||
FreeGuard
|
||||
],
|
||||
exports: [
|
||||
BrowseCommunityComponent
|
||||
]
|
||||
})
|
||||
export class BrowseCommunityModule { }
|
|
@ -1,17 +0,0 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule } from '@angular/router';
|
||||
|
||||
import{CommunitiesComponent} from './communities.component';
|
||||
|
||||
import {FreeGuard} from '../openaireLibrary/login/freeGuard.guard';
|
||||
import {PreviousRouteRecorder} from '../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forChild([
|
||||
{ path: '', component: CommunitiesComponent, canActivate: [FreeGuard], canDeactivate: [PreviousRouteRecorder] }
|
||||
|
||||
])
|
||||
]
|
||||
})
|
||||
export class CommunitiesRoutingModule { }
|
|
@ -1,242 +0,0 @@
|
|||
<schema2jsonld [URL]="properties.baseLink"
|
||||
[logoURL]="properties.baseLink+'/assets/common-assets/logo-small-connect.png'" type="home"
|
||||
name="OpenAIRE Connect">
|
||||
</schema2jsonld>
|
||||
<div
|
||||
class="image-front-topbar"
|
||||
uk-scrollspy="{"target":"[uk-scrollspy-class]","cls":"uk-animation-fade","delay":false}"
|
||||
tm-header-transparent="light" tm-header-transparent-placeholder="">
|
||||
<helper *ngIf="pageContents && pageContents['left'] && pageContents['left'].length > 0"
|
||||
[texts]="pageContents['left']"></helper>
|
||||
<!--<div style="background-image: url('assets/home/banner.jpg') !important;"
|
||||
class="uk-section uk-background-norepeat uk-background-bottom-center uk-background-cover uk-section-overlap uk-position-relative uk-preserve-color">
|
||||
<div class=" uk-section uk-padding-remove-bottom">
|
||||
<div class="uk-position-cover"></div>
|
||||
<div class="uk-position-relative uk-panel">
|
||||
<div class="uk-container uk-container-large uk-section">
|
||||
<div class="uk-grid">
|
||||
<div class="uk-width-1-2@m uk-width-1-1@s">
|
||||
<div class="uk-h1">Build an Open Research <b>Gateway</b> for your <b>Community</b></div>
|
||||
<h4 class="uk-margin-remove-top">Turn Open Science into practice</h4>
|
||||
<div class="uk-h5 uk-margin-top">Share and link your research results.<br>
|
||||
Across organizations, across borders.<br>Customized to your needs.
|
||||
</div>
|
||||
</div>
|
||||
<div class="uk-width-1-1 uk-inline uk-margin-medium-top uk-margin-medium-bottom">
|
||||
<a class="uk-button portal-button" routerLink="/about/learn-how" routerLinkActive="router-link-active">
|
||||
LEARN
|
||||
HOW</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>-->
|
||||
</div>
|
||||
<div>
|
||||
<helper *ngIf="pageContents && pageContents['top'] && pageContents['top'].length > 0"
|
||||
[texts]="pageContents['top']"></helper>
|
||||
<!--<div class="uk-container uk-container-large uk-margin-medium-top">
|
||||
<div class="uk-text-center uk-text-bold uk-h4">Open and FAIR science is our mission</div>
|
||||
<div class="uk-margin-medium-top">
|
||||
<div class="uk-child-width-1-3@m uk-child-width-1-1@s uk-grid-match uk-grid-medium uk-grid-margin"
|
||||
uk-height-match=".target" uk-grid>
|
||||
<div>
|
||||
<div class="uk-card uk-card-default uk-padding-small connectInfoCard">
|
||||
<div class="uk-card-media-top uk-flex uk-flex-middle uk-flex-center">
|
||||
<div class="target">
|
||||
<img src="assets/connect-assets/home/1.png" width="100" height="89">
|
||||
</div>
|
||||
</div>
|
||||
<div class="uk-card-body uk-padding-remove-horizontal uk-padding-remove-bottom">
|
||||
<div class="target">
|
||||
<h5 class="uk-text-bold uk-text-center">A Virtual Research Environment</h5>
|
||||
<div>An overlay platform making it easy to share, link, disseminate and monitor all your publications,
|
||||
data, software, methods. In one place.
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div>
|
||||
<div class="uk-text-uppercase text-center">Features</div>
|
||||
<ul class="uk-list">
|
||||
<li>
|
||||
<span
|
||||
class="uk-border-circle uk-icon-button icon-button-small portal-icon-button uk-margin-small-right"
|
||||
uk-icon="check">
|
||||
</span>
|
||||
Access to OpenAIRE resources
|
||||
</li>
|
||||
<li>
|
||||
<span
|
||||
class="uk-border-circle uk-icon-button icon-button-small portal-icon-button uk-margin-small-right"
|
||||
uk-icon="check">
|
||||
</span>
|
||||
Moderated, front-end linking
|
||||
</li>
|
||||
<li>
|
||||
<span
|
||||
class="uk-border-circle uk-icon-button icon-button-small portal-icon-button uk-margin-small-right"
|
||||
uk-icon="check">
|
||||
</span>
|
||||
Cross-platform search
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="uk-card uk-card-default uk-padding-small connectInfoCard">
|
||||
<div class="uk-card-media-top uk-flex uk-flex-middle uk-flex-center">
|
||||
<div class="target">
|
||||
<img src="assets/connect-assets/home/2.png" width="100" height="108">
|
||||
</div>
|
||||
</div>
|
||||
<div class="uk-card-body uk-padding-remove-horizontal uk-padding-remove-bottom">
|
||||
<div class="target">
|
||||
<h5 class="uk-text-bold uk-text-center">Open Science in action</h5>
|
||||
<div>A time-saving bundle of services for researchers to effortlessly practice open science. An integral
|
||||
part of the European Open Science Cloud.
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<hr>
|
||||
<div>
|
||||
<div class="uk-text-uppercase text-center">Features</div>
|
||||
<ul class="uk-list">
|
||||
<li>
|
||||
<span
|
||||
class="uk-border-circle uk-icon-button icon-button-small portal-icon-button uk-margin-small-right"
|
||||
uk-icon="check">
|
||||
</span>
|
||||
Use of OpenAIRE Guidelines
|
||||
</li>
|
||||
<li>
|
||||
<span
|
||||
class="uk-border-circle uk-icon-button icon-button-small portal-icon-button uk-margin-small-right"
|
||||
uk-icon="check">
|
||||
</span>
|
||||
DOIs via Zenodo
|
||||
</li>
|
||||
<li>
|
||||
<span
|
||||
class="uk-border-circle uk-icon-button icon-button-small portal-icon-button uk-margin-small-right"
|
||||
uk-icon="check">
|
||||
</span>
|
||||
EOSC Single Sign-On
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="uk-card uk-card-default uk-padding-small connectInfoCard">
|
||||
<div class="uk-card-media-top uk-flex uk-flex-middle uk-flex-center">
|
||||
<div class="target">
|
||||
<img src="assets/connect-assets/home/3.png" width="120" height="104">
|
||||
</div>
|
||||
</div>
|
||||
<div class="uk-card-body uk-padding-remove-horizontal uk-padding-remove-bottom">
|
||||
<div class="target">
|
||||
<h5 class="uk-text-bold uk-text-center">Customized to your needs</h5>
|
||||
<div>A Science Gateway with your own brand, rules for aggregation, text & data mining, and
|
||||
presentation. Run by you via a simple, yet powerful backend administration tool.
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div>
|
||||
<div class="uk-text-uppercase text-center">Features</div>
|
||||
<ul class="uk-list">
|
||||
<li>
|
||||
<span
|
||||
class="uk-border-circle uk-icon-button icon-button-small portal-icon-button uk-margin-small-right"
|
||||
uk-icon="check">
|
||||
</span>
|
||||
Access control
|
||||
</li>
|
||||
<li>
|
||||
<span
|
||||
class="uk-border-circle uk-icon-button icon-button-small portal-icon-button uk-margin-small-right"
|
||||
uk-icon="check">
|
||||
</span>
|
||||
Analytics: rich set of indicators
|
||||
</li>
|
||||
<li>
|
||||
<span
|
||||
class="uk-border-circle uk-icon-button icon-button-small portal-icon-button uk-margin-small-right"
|
||||
uk-icon="check">
|
||||
</span>
|
||||
Look & feel to match your brand
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="background-image: url('assets/home/background.png') !important;"
|
||||
class="uk-margin-large-top uk-section uk-background-norepeat uk-background-top-center uk-background-cover uk-section-overlap uk-position-relative uk-preserve-color">
|
||||
<div class="uk-container uk-container-large">
|
||||
<gif-slider [gifs]="gifs" [link]="true" [linkTitle]="'learn more'" [route]="'/about/learn-how'">
|
||||
</gif-slider>
|
||||
</div>
|
||||
</div>-->
|
||||
</div>
|
||||
<div *ngIf="researchCommunities.length === 0" class="uk-container uk-container-large uk-margin-medium-top">
|
||||
<errorMessages [status]="[status]" [type]="'communities'"></errorMessages>
|
||||
</div>
|
||||
<div *ngIf="!loading && researchCommunities.length > 0" class="uk-container uk-container-large uk-margin-medium-top">
|
||||
<div class="uk-text-bold uk-h4">Community Gateways in Action</div>
|
||||
<div [class]="'uk-margin-medium-top' + (researchCommunities.length <= 5 ? ' uk-margin-medium-bottom' : '')">
|
||||
|
||||
<div
|
||||
class="uk-grid-match uk-grid-medium uk-child-width-1-5@m uk-child-width-1-2 uk-text-center"
|
||||
uk-grid uk-height-match=".community">
|
||||
<div *ngFor="let community of researchCommunities.slice(0, 5); let i = index">
|
||||
<div class="uk-padding-small uk-card uk-card-default communityCard">
|
||||
<browse-community [community]=community></browse-community>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="uk-text-right uk-margin-top">
|
||||
<a *ngIf="researchCommunities.length > 5" class="portal-link uk-text-uppercase uk-text-bold uk-text-small"
|
||||
routerLinkActive="router-link-active" routerLink="/search/find/communities">
|
||||
Browse All >
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<helper *ngIf="pageContents && pageContents['bottom'] && pageContents['bottom'].length > 0"
|
||||
[texts]="pageContents['bottom']"></helper>
|
||||
<!--<div style="background-color: #CFDEF1;"
|
||||
class="uk-background-norepeat uk-background-cover uk-section-overlap uk-position-relative uk-preserve-color uk-margin-large-top">
|
||||
<div class="uk-container uk-container-large uk-section">
|
||||
<div class="uk-flex uk-flex-middle uk-padding" uk-grid>
|
||||
<div class="uk-text-center uk-width-1-1@s uk-width-1-3@m">
|
||||
<img width="237" height="250" src="assets/connect-assets/contact/1.png">
|
||||
</div>
|
||||
<div class="uk-width-expand">
|
||||
<div class="uk-text-bold uk-h4">
|
||||
<div>Let us help you develop a collaborative Open Science Gateway for your community. It is fast. It is
|
||||
reliable.
|
||||
</div>
|
||||
</div>
|
||||
<div class="uk-margin-medium">Get in touch with our team to find out how.</div>
|
||||
<div class="uk-inline">
|
||||
<a class="uk-button portal-button" routerLink="/contact-us" routerLinkActive="router-link-active"> CONTACT
|
||||
US</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>-->
|
||||
<div class="uk-section-muted"
|
||||
uk-scrollspy="{"target":"[uk-scrollspy-class]","cls":"uk-animation-fade","delay":false}">
|
||||
<div class="uk-container uk-container-large">
|
||||
<other-portals [properties]="properties" portal="monitor"> </other-portals>
|
||||
</div>
|
||||
</div>
|
|
@ -1,199 +0,0 @@
|
|||
import {Component} from '@angular/core';
|
||||
import {ActivatedRoute, Router} from '@angular/router';
|
||||
import {Meta, Title} from '@angular/platform-browser';
|
||||
import {EnvProperties} from '../openaireLibrary/utils/properties/env-properties';
|
||||
import {CommunitiesService} from '../openaireLibrary/connect/communities/communities.service';
|
||||
import {SubscribeService} from '../openaireLibrary/utils/subscribe/subscribe.service';
|
||||
import {CommunityInfo} from '../openaireLibrary/connect/community/communityInfo';
|
||||
|
||||
import {PiwikService} from '../openaireLibrary/utils/piwik/piwik.service';
|
||||
import {StringUtils} from '../openaireLibrary/utils/string-utils.class';
|
||||
|
||||
import {ErrorCodes} from '../openaireLibrary/utils/properties/errorCodes';
|
||||
import {ErrorMessagesComponent} from '../openaireLibrary/utils/errorMessages.component';
|
||||
import {HelperService} from "../openaireLibrary/utils/helper/helper.service";
|
||||
import {SEOService} from "../openaireLibrary/sharedComponents/SEO/SEO.service";
|
||||
|
||||
@Component({
|
||||
selector: 'communities',
|
||||
templateUrl: 'communities.component.html',
|
||||
})
|
||||
|
||||
export class CommunitiesComponent {
|
||||
public piwiksub: any;
|
||||
|
||||
public pageTitle = "OpenAIRE"
|
||||
public researchCommunities = [];
|
||||
public gifs: { "gif": string, "header": string, "text" }[] = [];
|
||||
public pageContents = null;
|
||||
public divContents = null;
|
||||
// Message variables
|
||||
public status: number;
|
||||
public loading: boolean = true;
|
||||
public subscriberErrorMessage: string = "";
|
||||
public errorCodes: ErrorCodes;
|
||||
private errorMessages: ErrorMessagesComponent;
|
||||
|
||||
properties: EnvProperties;
|
||||
public keyword: string = "";
|
||||
public type: string = "all";
|
||||
|
||||
constructor(
|
||||
private route: ActivatedRoute,
|
||||
private _router: Router,
|
||||
private _meta: Meta,
|
||||
private _title: Title,
|
||||
private _piwikService: PiwikService,
|
||||
private _communitiesService: CommunitiesService,
|
||||
private _subscribeService: SubscribeService,
|
||||
private helper: HelperService,
|
||||
private seoService: SEOService) {
|
||||
|
||||
var description = "OpenAIRE - Connect, Community Dashboard, research community";
|
||||
var title = "OpenAIRE - Connect";
|
||||
|
||||
this._meta.updateTag({content: description}, "name='description'");
|
||||
this._meta.updateTag({content: description}, "property='og:description'");
|
||||
this._meta.updateTag({content: title}, "property='og:title'");
|
||||
this._title.setTitle(title);
|
||||
|
||||
this.errorCodes = new ErrorCodes();
|
||||
this.errorMessages = new ErrorMessagesComponent();
|
||||
this.status = this.errorCodes.LOADING;
|
||||
}
|
||||
|
||||
public ngOnInit() {
|
||||
this.route.data
|
||||
.subscribe((data: { envSpecific: EnvProperties }) => {
|
||||
this.properties = data.envSpecific;
|
||||
var url = data.envSpecific.baseLink + this._router.url;
|
||||
this.seoService.createLinkForCanonicalURL(url, false);
|
||||
this._meta.updateTag({content: url}, "property='og:url'");
|
||||
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) {
|
||||
this.piwiksub = this._piwikService.trackView(this.properties, "OpenAIRE Connect", this.properties.piwikSiteId).subscribe();
|
||||
}
|
||||
this.getCommunities();
|
||||
this.createGifs();
|
||||
//this.getDivContents();
|
||||
this.getPageContents();
|
||||
});
|
||||
}
|
||||
|
||||
private getPageContents() {
|
||||
this.helper.getPageHelpContents(this._router.url, this.properties, 'connect').subscribe(contents => {
|
||||
this.pageContents = contents;
|
||||
})
|
||||
}
|
||||
|
||||
private getDivContents() {
|
||||
this.helper.getDivHelpContents(this._router.url, this.properties, 'connect').subscribe(contents => {
|
||||
this.divContents = contents;
|
||||
})
|
||||
}
|
||||
|
||||
public getCommunities() {
|
||||
this.loading = true;
|
||||
this.status = this.errorCodes.LOADING;
|
||||
this.subscriberErrorMessage = "";
|
||||
|
||||
this.researchCommunities = [];
|
||||
|
||||
this._communitiesService.getCommunitiesState().subscribe(
|
||||
communitiesResults => {
|
||||
if(!communitiesResults){
|
||||
return;
|
||||
}
|
||||
if(communitiesResults.length == 0) {
|
||||
this.status = this.errorCodes.DONE;
|
||||
return;
|
||||
}
|
||||
this.sort(communitiesResults);
|
||||
communitiesResults.forEach((community, index) => {
|
||||
let showCommunity: boolean = true;
|
||||
if (community['status'] == "hidden" || community['status'] == "manager") {
|
||||
showCommunity = false;
|
||||
}
|
||||
if (showCommunity) {
|
||||
this.researchCommunities.push(community);
|
||||
}
|
||||
this.status = this.errorCodes.DONE;
|
||||
});
|
||||
this.loading = false;
|
||||
},
|
||||
error => {
|
||||
this.status = this.handleError("Error getting communities", error);
|
||||
this.loading = false;
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
private createGifs() {
|
||||
this.gifs.push({
|
||||
gif: "assets/connect-assets/home/gifs/deposit.gif",
|
||||
header: "Find a repository to deposit your research outcome",
|
||||
text: "This is OpenAIRE’s key service for research communities, both established and emerging ones. Our service helps you reach out and engage all your researchers to practice open science out-of-the-box."
|
||||
});
|
||||
this.gifs.push({
|
||||
gif: "assets/connect-assets/home/gifs/link.gif",
|
||||
header: "Link your research output with your community, funding, and other research products",
|
||||
text: "This is OpenAIRE’s key service for research communities, both established and emerging ones. Our service helps you reach out and engage all your researchers to practice open science out-of-the-box."
|
||||
});
|
||||
this.gifs.push({
|
||||
gif: "assets/connect-assets/home/gifs/overview.gif",
|
||||
header: "View community's overview at a glance",
|
||||
text: "This is OpenAIRE’s key service for research communities, both established and emerging ones. Our service helps you reach out and engage all your researchers to practice open science out-of-the-box."
|
||||
});
|
||||
this.gifs.push({
|
||||
gif: "assets/connect-assets/home/gifs/results.gif",
|
||||
header: "Search & browse your community's research products. ",
|
||||
text: "This is OpenAIRE’s key service for research communities, both established and emerging ones. Our service helps you reach out and engage all your researchers to practice open science out-of-the-box."
|
||||
});
|
||||
this.gifs.push({
|
||||
gif: "assets/connect-assets/home/gifs/graph-analysis.gif",
|
||||
header: "View statistics for your community's research products.",
|
||||
text: "This is OpenAIRE’s key service for research communities, both established and emerging ones. Our service helps you reach out and engage all your researchers to practice open science out-of-the-box."
|
||||
});
|
||||
}
|
||||
|
||||
private sort(results: CommunityInfo[]) {
|
||||
results.sort((left, right): number => {
|
||||
if (!right.date || left.date > right.date) {
|
||||
return -1;
|
||||
} else if (!left.date || left.date < right.date) {
|
||||
return 1;
|
||||
} else {
|
||||
if (left.title > right.title) {
|
||||
return 1;
|
||||
} else if (left.title < right.title) {
|
||||
return -1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
public quote(param: string): string {
|
||||
return StringUtils.quote(param);
|
||||
}
|
||||
|
||||
public ngOnDestroy() {
|
||||
if (this.piwiksub) {
|
||||
this.piwiksub.unsubscribe();
|
||||
}
|
||||
}
|
||||
|
||||
private handleError(message: string, error): number {
|
||||
var code = "";
|
||||
if (!error.status) {
|
||||
var error = error.json();
|
||||
code = error.code;
|
||||
} else {
|
||||
code = error.status;
|
||||
}
|
||||
|
||||
console.error("Communities (component): " + message, error);
|
||||
|
||||
return this.errorMessages.getErrorCode(code);
|
||||
}
|
||||
}
|
|
@ -1,41 +0,0 @@
|
|||
import {NgModule} from '@angular/core';
|
||||
import {CommonModule} from '@angular/common';
|
||||
import {FormsModule} from '@angular/forms';
|
||||
import {RouterModule} from '@angular/router';
|
||||
import {ManageModule} from '../openaireLibrary/utils/manage/manage.module';
|
||||
|
||||
import {CommunitiesComponent} from './communities.component';
|
||||
|
||||
import {FreeGuard} from '../openaireLibrary/login/freeGuard.guard';
|
||||
import {PreviousRouteRecorder} from '../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
|
||||
|
||||
import {PiwikService} from '../openaireLibrary/utils/piwik/piwik.service';
|
||||
import {ErrorMessagesModule} from '../openaireLibrary/utils/errorMessages.module';
|
||||
|
||||
import {SearchFormModule} from '../openaireLibrary/searchPages/searchUtils/searchForm.module';
|
||||
import {BrowseCommunityModule} from './browseCommunity/browse-community.module';
|
||||
import {HelperModule} from "../openaireLibrary/utils/helper/helper.module";
|
||||
import {GifSliderModule} from "../openaireLibrary/utils/gif-slider/gif-slider.module";
|
||||
import {OtherPortalsModule} from "../openaireLibrary/sharedComponents/other-portals/other-portals.module";
|
||||
import {Schema2jsonldModule} from "../openaireLibrary/sharedComponents/schema2jsonld/schema2jsonld.module";
|
||||
import {SEOServiceModule} from "../openaireLibrary/sharedComponents/SEO/SEOService.module";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule, RouterModule,
|
||||
ManageModule, ErrorMessagesModule,
|
||||
SearchFormModule, BrowseCommunityModule, GifSliderModule, OtherPortalsModule,
|
||||
HelperModule, Schema2jsonldModule, SEOServiceModule
|
||||
],
|
||||
declarations: [
|
||||
CommunitiesComponent
|
||||
],
|
||||
providers:[
|
||||
FreeGuard, PreviousRouteRecorder,
|
||||
PiwikService
|
||||
],
|
||||
exports: [
|
||||
CommunitiesComponent
|
||||
]
|
||||
})
|
||||
export class CommunitiesModule { }
|
|
@ -1,16 +0,0 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule } from '@angular/router';
|
||||
|
||||
import{CommunityComponent} from './community.component';
|
||||
import {FreeGuard} from '../openaireLibrary/login/freeGuard.guard';
|
||||
import {PreviousRouteRecorder} from '../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forChild([
|
||||
{ path: '', component: CommunityComponent, canActivate: [FreeGuard], canDeactivate: [PreviousRouteRecorder] }
|
||||
|
||||
])
|
||||
]
|
||||
})
|
||||
export class CommunityRoutingModule { }
|
|
@ -1,559 +0,0 @@
|
|||
<schema2jsonld *ngIf="community" [URL]="url"
|
||||
[logoURL]="community.logoUrl" type="home"
|
||||
[name]="community.title">
|
||||
</schema2jsonld>
|
||||
<div id="stickhere">
|
||||
</div>
|
||||
|
||||
<div *ngIf="communityInfo" class="uk-section uk-padding-remove-top">
|
||||
<div class="communityPanelBackground uk-margin-top uk-padding-small">
|
||||
<div class="uk-container uk-margin-top uk-margin-bottom "
|
||||
*ngIf="communityId != null && communityId != '' && community != null">
|
||||
<div class="uk-grid">
|
||||
<div class="uk-width-2-5@m uk-width-1-1@s uk-first-column uk-margin-top">
|
||||
<div *ngIf="community.title != null" class="uk-text-bold uk-h5 uk-margin-remove">
|
||||
{{community.title}}
|
||||
</div>
|
||||
<div *ngIf="community.shortTitle != null"
|
||||
class=" uk-h5 uk-margin-remove">
|
||||
{{community.shortTitle}}
|
||||
</div>
|
||||
<div *ngIf="community.description != null" class="uk-margin ">
|
||||
<div *ngIf="!showAllDescription" class="">
|
||||
{{community.description.substring(0, 300)}}{{community.description.length > 300 ? '...' : ''}}</div>
|
||||
<div *ngIf="showAllDescription" class=""> {{community.description}}</div>
|
||||
<div *ngIf="!showAllDescription && community.description.length > 300 "
|
||||
class="uk-animation-fade uk-text-center uk-text-bold">
|
||||
<a (click)="showAllDescription = !showAllDescription;">View more
|
||||
</a>
|
||||
</div>
|
||||
<div *ngIf="showAllDescription"
|
||||
class="uk-text-center uk-text-bold">
|
||||
<a (click)="showAllDescription = !showAllDescription;">
|
||||
View less
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="uk-width-3-5@m uk-width-1-1@s">
|
||||
<div>
|
||||
<div class="uk-margin-bottom uk-text-right">
|
||||
<subscribe *ngIf="communityId != null && communityId != ''" [communityId]="communityId"
|
||||
class=""></subscribe>
|
||||
{{" "}}
|
||||
<invite *ngIf="showInvite()" [longView]=false [buttonSizeSmall]=false></invite>
|
||||
</div>
|
||||
|
||||
<!-- <div class=" uk-text-large uk-margin-bottom">Statistics</div>-->
|
||||
<div *ngIf="communityId != null && communityId != ''"
|
||||
class="uk-child-width-1-6@l uk-child-width-1-6@m uk-child-width-1-3@s uk-text-center uk-grid uk-margin-remove"
|
||||
uk-scrollspy="cls: uk-animation-fade; target: > div > .uk-card; delay: 450; repeat: false">
|
||||
|
||||
<div
|
||||
*ngIf="publicationTotal != null && publicationTotal > 0 && isEntityEnabled('publication') && isRouteEnabled(searchLinkToPublications)"
|
||||
class="uk-padding-remove-left">
|
||||
<div
|
||||
class="uk-card uk-card-default uk-card-body uk-padding-remove uk-margin-small-right uk-height-1-1 uk-margin-bottom ">
|
||||
<div class="uk-margin-top uk-margin-bottom">
|
||||
<a class="uk-margin-auto-vertical uk-margin-auto" [queryParams]=params
|
||||
routerLinkActive="router-link-active" [routerLink]="searchLinkToPublications"><span
|
||||
class="uk-text-bold uk-h5">{{publicationTotal|number}}</span>
|
||||
<p class="uk-text-small uk-margin-remove">publications</p></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div
|
||||
*ngIf="researchDataTotal != null && researchDataTotal > 0 && isEntityEnabled('dataset') && isRouteEnabled(searchLinkToDatasets)"
|
||||
class="uk-padding-remove-left">
|
||||
<div
|
||||
class="uk-card uk-card-default uk-card-body uk-padding-remove uk-margin-small-right uk-height-1-1 uk-margin-bottom">
|
||||
<div class="uk-margin-top uk-margin-bottom">
|
||||
<a class="uk-margin-auto-vertical uk-margin-auto" [queryParams]=params
|
||||
routerLinkActive="router-link-active" [routerLink]="searchLinkToDatasets"><span
|
||||
class="uk-text-bold uk-h5">{{researchDataTotal|number}}</span>
|
||||
<p class="uk-text-small uk-margin-remove">research data</p></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
*ngIf="softwareTotal != null && softwareTotal > 0 && isEntityEnabled('software') && isRouteEnabled(searchLinkToSoftware)"
|
||||
class="uk-padding-remove-left">
|
||||
<div
|
||||
class="uk-card uk-card-default uk-card-body uk-padding-remove uk-margin-small-right uk-height-1-1 uk-margin-bottom ">
|
||||
<div class="uk-margin-top uk-margin-bottom">
|
||||
<a class="uk-margin-auto-vertical uk-margin-auto" [queryParams]=params
|
||||
routerLinkActive="router-link-active" [routerLink]="searchLinkToSoftware"><span
|
||||
class="uk-text-bold uk-h5">{{softwareTotal|number}}</span>
|
||||
<p class="uk-text-small uk-margin-remove">software</p></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div
|
||||
*ngIf="orpTotal != null && orpTotal > 0 && isEntityEnabled('orp') && isRouteEnabled(searchLinkToOrps)"
|
||||
class="uk-padding-remove-left">
|
||||
<div
|
||||
class="uk-card uk-card-default uk-card-body uk-padding-remove uk-margin-small-right uk-height-1-1 uk-margin-bottom ">
|
||||
<div class="uk-margin-top uk-margin-bottom">
|
||||
<a class="uk-margin-auto-vertical uk-margin-auto" [queryParams]=params
|
||||
routerLinkActive="router-link-active" [routerLink]="searchLinkToOrps"><span
|
||||
class="uk-text-bold uk-h5">{{orpTotal|number}}</span>
|
||||
<p class="uk-text-small uk-margin-remove">other products</p></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div
|
||||
*ngIf="projectTotal != null && projectTotal > 0 && isEntityEnabled('project') && isRouteEnabled(searchLinkToProjects)"
|
||||
class="uk-padding-remove-left">
|
||||
<div
|
||||
class="uk-card uk-card-default uk-card-body uk-padding-remove uk-margin-small-right uk-height-1-1 uk-margin-bottom ">
|
||||
<div class="uk-margin-top uk-margin-bottom">
|
||||
<a class="uk-margin-auto-vertical uk-margin-auto" [queryParams]=params
|
||||
routerLinkActive="router-link-active" [routerLink]="searchLinkToProjects"><span
|
||||
class="uk-text-bold uk-h5">{{projectTotal|number}}</span>
|
||||
<p class="uk-text-small uk-margin-remove">projects</p></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div
|
||||
*ngIf="contentProviderTotal != null && contentProviderTotal > 0 && isEntityEnabled('datasource') && isRouteEnabled(searchLinkToDataProviders)"
|
||||
class="uk-padding-remove-left">
|
||||
<div
|
||||
class="uk-card uk-card-default uk-card-body uk-padding-remove uk-margin-small-right uk-height-1-1 uk-margin-bottom ">
|
||||
<div class="uk-margin-top uk-margin-bottom">
|
||||
<a class="uk-margin-auto-vertical uk-margin-auto" [queryParams]=params
|
||||
routerLinkActive="router-link-active" [routerLink]="searchLinkToDataProviders"><span
|
||||
class="uk-text-bold uk-h5">{{contentProviderTotal|number}}</span>
|
||||
<p class="uk-text-small uk-margin-remove">content providers</p></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div *ngIf="community.subjects != null && community.subjects.length > 0"
|
||||
class="uk-margin-small-bottom uk-margin-top uk-text-bold uk-h5">Subjects
|
||||
</div>
|
||||
<div *ngIf="community.subjects != null" class=" ">
|
||||
<span *ngFor="let subject of community.subjects.slice(0,4) let i=index">
|
||||
<span *ngIf="subject != ''" class="uk-label uk-margin-small-bottom">
|
||||
<a [queryParams]="{subject:createParams(subject), sb: 'and'}"
|
||||
routerLinkActive="router-link-active" [routerLink]="searchLinkToAdvancedPublications">
|
||||
{{subject}}
|
||||
</a>
|
||||
</span>{{" "}}
|
||||
</span>
|
||||
<span *ngIf="showAllSubjects">
|
||||
<span *ngFor="let subject of community.subjects.slice(4) let i=index">
|
||||
<span *ngIf="subject != ''" class="uk-label uk-margin-small-bottom">
|
||||
<a [queryParams]="{subject:createParams(subject), sb: 'and'}"
|
||||
routerLinkActive="router-link-active" [routerLink]="searchLinkToAdvancedPublications">
|
||||
{{subject}}
|
||||
</a>
|
||||
</span> {{" "}}
|
||||
</span>
|
||||
</span>
|
||||
<br>
|
||||
<div *ngIf="!showAllSubjects && community.subjects.length > 4 "
|
||||
class="uk-animation-fade uk-text-center uk-text-bold">
|
||||
<a (click)="showAllSubjects = !showAllSubjects;">
|
||||
View more
|
||||
</a>
|
||||
</div>
|
||||
<div *ngIf="showAllSubjects"
|
||||
class="uk-text-center uk-text-bold">
|
||||
<a (click)="showAllSubjects = !showAllSubjects;">
|
||||
View less
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="uk-section tm-middle uk-container uk-margin-small-top uk-padding-remove-top" id="tm-main">
|
||||
<div class="uk-container uk-margin-bottom uk-grid">
|
||||
<div class="uk-width-expand uk-padding-remove">
|
||||
<article *ngIf="communityInfo" class="uk-article ">
|
||||
<div *ngIf="communityId != null && communityId != '' && community != null">
|
||||
|
||||
|
||||
<!-- <div *ngIf="isRouteEnabled('/search/find')" class="uk-margin-top">
|
||||
<div class="uk-text-bold uk-h5">Search research results</div>
|
||||
<search-form [setFormCentered]=false [placeholderText]="getSearchPlaceHolder()" link="/search/find"></search-form>
|
||||
</div>-->
|
||||
<ng-template #stats let-entity="entity" let-entityName="entityName" let-statisticsSum="statisticsSum"
|
||||
let-statisticsDisplay="statisticsDisplay" let-allowedEntities="allowedEntities"
|
||||
let-allowedCharts="allowedCharts" let-chartsInfoMap="chartsInfoMap"
|
||||
let-showChartTitle="showChartTitle"
|
||||
let-showIn="showIn">
|
||||
<div *ngIf=" showIn == 'showInMonitor' && allowedCharts && allowedCharts[entity].length == 0 &&
|
||||
!statisticsDisplay.entities[entity].numbers.map['total'][showIn] && !statisticsDisplay.entities[entity].numbers.map['project'][showIn] &&
|
||||
!statisticsDisplay.entities[entity].numbers.map['open'][showIn] && !statisticsDisplay.entities[entity].numbers.map['closed'][showIn] &&
|
||||
!statisticsDisplay.entities[entity].numbers.map['embargo'][showIn] && !statisticsDisplay.entities[entity].numbers.map['restricted'][showIn]"
|
||||
class="uk-alert uk-alert-primary">
|
||||
No graphs available
|
||||
</div>
|
||||
<div *ngIf="statisticsSum && statisticsDisplay &&
|
||||
statisticsSum[entity].total>0"
|
||||
class="uk-grid uk-child-width-1-3@l uk-child-width-1-2@m uk-child-width-1-2@s">
|
||||
<div *ngIf="statisticsDisplay.entities[entity].numbers.map['total'][showIn]" class="uk-padding-remove">
|
||||
<div class="uk-card portal-card uk-text-right uk-margin-left uk-margin-bottom uk-padding-small">
|
||||
<div
|
||||
class="uk-text-large">{{statisticsSum[entity].total|number}}</div>
|
||||
<div>Total
|
||||
{{entityName}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
*ngIf="statisticsDisplay.entities[entity].numbers.map['project'][showIn]" class="uk-padding-remove">
|
||||
<div class="uk-card portal-card uk-text-right uk-margin-left uk-margin-bottom uk-padding-small">
|
||||
<div
|
||||
class="uk-text-large">{{statisticsSum[entity].projects|number}} </div>
|
||||
<div>Total projects linked to {{entityName}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
*ngIf="statisticsDisplay.entities[entity].numbers.map['open'][showIn]" class="uk-padding-remove">
|
||||
<div class="uk-card portal-card uk-text-right uk-margin-left uk-margin-bottom uk-padding-small">
|
||||
<div
|
||||
class="uk-text-large">{{statisticsSum[entity].open_access|number}} </div>
|
||||
<div>Open access
|
||||
{{entityName}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="statisticsDisplay.entities[entity].numbers.map['closed'][showIn]" class="uk-padding-remove">
|
||||
<div class="uk-card portal-card uk-text-right uk-margin-left uk-margin-bottom uk-padding-small">
|
||||
<div
|
||||
class="uk-text-large">{{statisticsSum[entity].closed_access|number}} </div>
|
||||
<div>Closed access
|
||||
{{entityName}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
*ngIf="statisticsDisplay.entities[entity].numbers.map['embargo'][showIn]" class="uk-padding-remove">
|
||||
<div class="uk-card portal-card uk-text-right uk-margin-left uk-margin-bottom uk-padding-small">
|
||||
<div
|
||||
class="uk-text-large">{{statisticsSum[entity].embargo|number}} </div>
|
||||
<div>Embargoed
|
||||
{{entityName}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
*ngIf="statisticsDisplay.entities[entity].numbers.map['restricted'][showIn]"
|
||||
class="uk-padding-remove">
|
||||
<div class="uk-card portal-card uk-text-right uk-margin-left uk-margin-bottom uk-padding-small">
|
||||
<div
|
||||
class="uk-text-large">{{statisticsSum[entity].restricted|number}} </div>
|
||||
<div>Restricted
|
||||
{{entityName}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf=" allowedEntities &&
|
||||
statisticsSum && allowedCharts && statisticsSum[entity] &&
|
||||
allowedCharts[entity] && statisticsSum[entity].total>0 &&
|
||||
allowedCharts[entity].length>0">
|
||||
<div *ngIf="showIn == 'showInDashboard'">
|
||||
<div uk-slider>
|
||||
|
||||
<div class="uk-position-relative">
|
||||
|
||||
<div class="uk-slider-container">
|
||||
<ul class="uk-slider-items uk-child-width-1-2 uk-child-width-1-1@s uk-child-width-1-2@m">
|
||||
<li *ngFor="let chart of allowedCharts[entity]">
|
||||
|
||||
<div class=" iframeContainer uk-height-medium uk-margin-top">
|
||||
<div *ngIf="showChartTitle[chart]" class=" uk-h5 ">
|
||||
{{chartsInfoMap[chart].title}}</div>
|
||||
<iframe [src]=chartsInfoMap[chart].url scrolling="no"></iframe>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="uk-hidden@s uk-light">
|
||||
<a class="uk-position-center-left " href="#" uk-slidenav-previous uk-slider-item="previous"></a>
|
||||
<a class="uk-position-center-right " href="#" uk-slidenav-next uk-slider-item="next"></a>
|
||||
</div>
|
||||
|
||||
<div class="uk-visible@s">
|
||||
<a class="uk-position-center-left-out " href="#" uk-slidenav-previous
|
||||
uk-slider-item="previous"></a>
|
||||
<a class="uk-position-center-right-out " href="#" uk-slidenav-next uk-slider-item="next"></a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div *ngIf=" allowedEntities &&
|
||||
statisticsSum && allowedCharts && statisticsSum[entity] &&
|
||||
allowedCharts[entity] && statisticsSum[entity].total>0 &&
|
||||
allowedCharts[entity].length>0">
|
||||
<div class="uk-margin-top portal-hr"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="showIn == 'showInMonitor'" class="uk-grid uk-child-width-1-2@l uk-child-width-1-1@m ">
|
||||
<div *ngFor="let chart of allowedCharts[entity]" class="uk-clearfix uk-margin-bottom">
|
||||
|
||||
<div class=" iframeContainer uk-height-large uk-margin-top">
|
||||
<div *ngIf="showChartTitle[chart]" class=" uk-h5 ">
|
||||
{{chartsInfoMap[chart].title}}</div>
|
||||
<iframe [src]=chartsInfoMap[chart].url scrolling="no" class=""></iframe>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ng-template>
|
||||
<div class="uk-text-center">
|
||||
<!-- <button [class]="'uk-button '+((show == 'overview')?'uk-disabled ':' uk-button-default ')"
|
||||
(click)="show='overview'">Overview
|
||||
</button>
|
||||
{{" "}}
|
||||
<button [class]="'uk-button '+((show != 'overview')?'uk-disabled ':' uk-button-default ')"
|
||||
(click)="show='analysis';">Graph Analysis
|
||||
</button>-->
|
||||
<mat-form-field>
|
||||
<div class="uk-margin-small-bottom">Select view</div>
|
||||
<!-- <mat-label>Select view</mat-label>-->
|
||||
<mat-select [(value)]="show">
|
||||
<mat-option value="overview">Overview</mat-option>
|
||||
<mat-option value="analysis">Graph Analysis</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<!--<select [(ngModel)]="show" class="uk-select uk-text-bold uk-width-small">
|
||||
<option value="overview">Overview</option>
|
||||
<option value="analysis">Graph Analysis</option>
|
||||
</select>-->
|
||||
<!-- <select [(ngModel)]="sortBy" class="uk-select uk-margin-small-bottom uk-width-1-2 uk-padding-remove" name="select_order" >-->
|
||||
<!-- <option value="num" >Sort by results number</option>-->
|
||||
<!-- <option value="name" >Sort by name</option>-->
|
||||
<!-- </select>-->
|
||||
</div>
|
||||
|
||||
<div class="uk-margin-top customTabs">
|
||||
|
||||
|
||||
<ul class="uk-margin-remove uk-flex-center"
|
||||
data-uk-tab="{connect: '#resultTabs'">
|
||||
<li *ngIf="isEntityEnabled('publication')" (click)="searchResearchResults('publication', publicationTotal, publicationResults)" class="uk-active"><a
|
||||
href="#">publications</a></li>
|
||||
<li *ngIf="isEntityEnabled('dataset')" (click)="searchResearchResults('dataset', researchDataTotal, researchDataResults)"><a href="#">research data</a></li>
|
||||
<li *ngIf="isEntityEnabled('software')" (click)="searchResearchResults('software', softwareTotal, softwareResults)"><a href="#">software</a></li>
|
||||
<li *ngIf="isEntityEnabled('orp')" (click)="searchResearchResults('other', orpTotal, orpResults)"><a href="#">other research products</a></li>
|
||||
</ul>
|
||||
|
||||
<ul id="resultTabs" class=" communityBorder customTabsContent uk-switcher " style="min-height:450px;">
|
||||
<li *ngIf="isEntityEnabled('publication')" class="uk-padding">
|
||||
<div *ngIf="show=='overview'">
|
||||
<div *ngIf="statistics !=null && activeTab == 'publication'">
|
||||
<ng-container *ngTemplateOutlet="stats; context: { entity: 'publication', entityName:
|
||||
'publications' , statisticsSum:statistics.statisticsSum, statisticsDisplay:statistics.statisticsDisplay,
|
||||
allowedEntities: statistics.allowedEntitiesMode['showInDashboard'],
|
||||
allowedCharts:statistics.allowedChartsMode['showInDashboard'], showChartTitle: statistics.chartTitlesMode['showInDashboard'],
|
||||
|
||||
chartsInfoMap:statistics.chartsInfoMap, showIn:'showInDashboard'}"></ng-container>
|
||||
</div>
|
||||
<results-comp [results]=publicationResults [total]=publicationTotal resultType="publication"
|
||||
[community]=community [params]=params [showLoading]="showLoading"
|
||||
[properties]="properties"
|
||||
class=""></results-comp>
|
||||
</div>
|
||||
<div *ngIf="show!='overview' && activeTab == 'publication'">
|
||||
<ng-container *ngTemplateOutlet="stats; context: { entity: 'publication', entityName:
|
||||
'publications' , statisticsSum:statistics.statisticsSum, statisticsDisplay:statistics.statisticsDisplay,
|
||||
allowedEntities: statistics.allowedEntitiesMode['showInMonitor'],
|
||||
allowedCharts:statistics.allowedChartsMode['showInMonitor'], showChartTitle: statistics.chartTitlesMode['showInMonitor'],
|
||||
chartsInfoMap:statistics.chartsInfoMap, showIn:'showInMonitor'}"></ng-container>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</li>
|
||||
<li *ngIf="isEntityEnabled('dataset')" class="uk-padding">
|
||||
<div *ngIf="show=='overview'">
|
||||
<div *ngIf="statistics !=null && activeTab == 'dataset'">
|
||||
<ng-container *ngTemplateOutlet="stats; context: { entity: 'dataset', entityName:
|
||||
'research data' , statisticsSum:statistics.statisticsSum,
|
||||
statisticsDisplay:statistics.statisticsDisplay,
|
||||
allowedEntities: statistics.allowedEntitiesMode['showInDashboard'],
|
||||
allowedCharts:statistics.allowedChartsMode['showInDashboard'], showChartTitle: statistics.chartTitlesMode['showInDashboard'],
|
||||
|
||||
chartsInfoMap:statistics.chartsInfoMap, showIn:'showInDashboard'}"></ng-container>
|
||||
</div>
|
||||
<results-comp [results]=researchDataResults [total]=researchDataTotal resultType="dataset"
|
||||
[community]=community [params]=params [showLoading]="showLoading"
|
||||
[properties]="properties"
|
||||
class=""></results-comp>
|
||||
</div>
|
||||
<div *ngIf="show!='overview' && activeTab == 'dataset'">
|
||||
<ng-container *ngTemplateOutlet="stats; context: { entity: 'dataset', entityName:
|
||||
'research data' , statisticsSum:statistics.statisticsSum, statisticsDisplay:statistics.statisticsDisplay,
|
||||
allowedEntities: statistics.allowedEntitiesMode['showInMonitor'],
|
||||
allowedCharts:statistics.allowedChartsMode['showInMonitor'], showChartTitle: statistics.chartTitlesMode['showInMonitor'],
|
||||
chartsInfoMap:statistics.chartsInfoMap, showIn:'showInMonitor'}"></ng-container>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</li>
|
||||
<li *ngIf="isEntityEnabled('software')" class="uk-padding">
|
||||
<div *ngIf="show=='overview'">
|
||||
<div *ngIf="statistics !=null && activeTab == 'software'">
|
||||
<ng-container *ngTemplateOutlet="stats; context: { entity: 'software', entityName:
|
||||
'software' , statisticsSum:statistics.statisticsSum, statisticsDisplay:statistics.statisticsDisplay,
|
||||
allowedEntities: statistics.allowedEntitiesMode['showInDashboard'],
|
||||
allowedCharts:statistics.allowedChartsMode['showInDashboard'], showChartTitle: statistics.chartTitlesMode['showInDashboard'],
|
||||
|
||||
chartsInfoMap:statistics.chartsInfoMap, showIn:'showInDashboard'}"></ng-container>
|
||||
</div>
|
||||
<results-comp [results]=softwareResults [total]=softwareTotal resultType="software"
|
||||
[community]=community [params]=params [showLoading]="showLoading"
|
||||
[properties]="properties"
|
||||
class=""></results-comp>
|
||||
</div>
|
||||
<div *ngIf="show!='overview' && activeTab == 'software'">
|
||||
<ng-container *ngTemplateOutlet="stats; context: { entity: 'software', entityName:
|
||||
'software' , statisticsSum:statistics.statisticsSum, statisticsDisplay:statistics.statisticsDisplay,
|
||||
allowedEntities: statistics.allowedEntitiesMode['showInMonitor'],
|
||||
allowedCharts:statistics.allowedChartsMode['showInMonitor'], showChartTitle: statistics.chartTitlesMode['showInMonitor'],
|
||||
chartsInfoMap:statistics.chartsInfoMap, showIn:'showInMonitor'}"></ng-container>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</li>
|
||||
<li *ngIf="isEntityEnabled('orp')" class="uk-padding">
|
||||
<div *ngIf="show=='overview'">
|
||||
<div *ngIf="statistics !=null && activeTab == 'orp'">
|
||||
<ng-container *ngTemplateOutlet="stats; context: { entity: 'orp', entityName:
|
||||
'other products' , statisticsSum:statistics.statisticsSum,
|
||||
statisticsDisplay:statistics.statisticsDisplay,
|
||||
allowedEntities: statistics.allowedEntitiesMode['showInDashboard'],
|
||||
allowedCharts:statistics.allowedChartsMode['showInDashboard'], showChartTitle: statistics.chartTitlesMode['showInDashboard'],
|
||||
|
||||
chartsInfoMap:statistics.chartsInfoMap, showIn:'showInDashboard'}"></ng-container>
|
||||
</div>
|
||||
<results-comp [results]=orpResults [total]=orpTotal resultType="other"
|
||||
[community]=community [params]=params [showLoading]="showLoading"
|
||||
[properties]="properties"
|
||||
class=""></results-comp>
|
||||
</div>
|
||||
<div *ngIf="show!='overview' && activeTab == 'orp'">
|
||||
<ng-container *ngTemplateOutlet="stats; context: { entity: 'orp', entityName:
|
||||
'other products' , statisticsSum:statistics.statisticsSum, statisticsDisplay:statistics.statisticsDisplay,
|
||||
allowedEntities: statistics.allowedEntitiesMode['showInMonitor'],
|
||||
allowedCharts:statistics.allowedChartsMode['showInMonitor'], showChartTitle: statistics.chartTitlesMode['showInMonitor'],
|
||||
chartsInfoMap:statistics.chartsInfoMap, showIn:'showInMonitor'}"></ng-container>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- <hr>-->
|
||||
<!--<div *ngIf="statistics && statistics.allowedEntities && countOtherGraphs()>0">
|
||||
<div class="uk-text-bold uk-h5">
|
||||
Other Graphs
|
||||
</div>
|
||||
<div *ngIf="statistics && statistics.allowedEntities" class="uk-margin-top uk-grid">
|
||||
<ng-container *ngFor="let entity of statistics.allowedEntities">
|
||||
<ng-container *ngIf="statistics.statisticsSum[entity].total>0 && statistics.allowedCharts[entity].length>0 && activeTab!=entity">
|
||||
|
||||
<ng-container *ngIf="statistics.allowedCharts[entity] " >
|
||||
<div *ngFor="let chart of statistics.allowedCharts[entity]" class="uk-width-1-2@m uk-first-column">
|
||||
<div class="iframeContainer">
|
||||
<iframe [src]=statistics.chartsUrlMap[chart] scrolling="no"></iframe>
|
||||
</div>
|
||||
</div>
|
||||
</ng-container>
|
||||
</ng-container>
|
||||
</ng-container>
|
||||
</div>
|
||||
</div>-->
|
||||
|
||||
|
||||
</div>
|
||||
</article>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<statistics-for-dashboard [currentMode]="'showInDashboard'"></statistics-for-dashboard>
|
||||
|
||||
|
||||
<div class="communityPanelBackground uk-margin-top uk-padding-small">
|
||||
<div class="uk-container uk-margin-top uk-margin-bottom "
|
||||
*ngIf="communityId != null && communityId != '' && community != null && communityInfo!=null">
|
||||
<div class="uk-grid">
|
||||
<div class="uk-width-2-5@m uk-width-1-1@s uk-first-column uk-margin-top">
|
||||
<div *ngIf="community.date != null"><span
|
||||
class="lowOpacityColor">Created</span> {{community.date | date:'dd-MM-yyyy'}}</div>
|
||||
<subscribe *ngIf="communityId != null" [communityId]="communityId" showNumbers=true class=""></subscribe>
|
||||
<div *ngIf=" isRouteEnabled(shareInZenodoPage)" class="">
|
||||
<span class="lowOpacityColor">Related Zenodo communities </span>
|
||||
<a [queryParams]=params routerLinkActive="router-link-active" [routerLink]="shareInZenodoPage">
|
||||
<span>
|
||||
{{zenodoCommunityIdS.length + ((masterZenodoCommunity) ? 1 : 0)}}</span>
|
||||
|
||||
</a>
|
||||
{{" "}}
|
||||
<span class="uk-icon"
|
||||
uk-tooltip="title:<div class='uk-margin'>Zenodo is a catch-all repository for OpenAIRE<hr>A zenodo community is created and curated by Zenodo users</div>">
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="question"
|
||||
ratio="1"><circle fill="none" stroke="#000" stroke-width="1.1" cx="10" cy="10" r="9"></circle><circle
|
||||
cx="10.44" cy="14.42" r="1.05"></circle><path fill="none" stroke="#000" stroke-width="1.2"
|
||||
d="M8.17,7.79 C8.17,4.75 12.72,4.73 12.72,7.72 C12.72,8.67 11.81,9.15 11.23,9.75 C10.75,10.24 10.51,10.73 10.45,11.4 C10.44,11.53 10.43,11.64 10.43,11.75"></path></svg>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="isRouteEnabled('/curators')" class="uk-width-3-5@m uk-width-1-1@s uk-margin-top">
|
||||
<curators [longView]="false" [managers]="community.managers" [communityId]="communityId"></curators>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="uk-section tm-middle uk-container uk-margin-top uk-padding-remove-top" id="" *ngIf="communityId != null
|
||||
&& communityId != '' && community != null && communityInfo != null">
|
||||
<ng-container *ngIf=" isRouteEnabled('/organizations')">
|
||||
<div class="uk-container uk-margin-bottom uk-grid">
|
||||
<div class="uk-width-expand uk-padding-remove">
|
||||
<affiliations [longView]="false" [getAffiliationsFromAPI]="true" [communityFirstPage]="true"></affiliations>
|
||||
</div>
|
||||
</div>
|
||||
</ng-container>
|
||||
</div>
|
||||
|
||||
<div *ngIf="(communityId == null || communityId == '' ) && !communityInfo"
|
||||
class="uk-section tm-middle uk-container uk-margin-large-top ">
|
||||
<div class="uk-container uk-margin-bottom uk-grid">
|
||||
<div class="uk-width-expand uk-padding-remove">
|
||||
<article class="uk-article ">
|
||||
<div
|
||||
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">
|
||||
No community chosen
|
||||
</div>
|
||||
<div *ngIf="communityId != null && communityId != '' && community != null">
|
||||
|
||||
</div>
|
||||
</article>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
|
@ -1,367 +0,0 @@
|
|||
import {Component, ElementRef, Input, ViewChild} from '@angular/core';
|
||||
import {ActivatedRoute, Router} from '@angular/router';
|
||||
import {Location} from '@angular/common';
|
||||
import {Meta, Title} from '@angular/platform-browser';
|
||||
import {EnvProperties} from '../openaireLibrary/utils/properties/env-properties';
|
||||
|
||||
import {CommunityService} from "../openaireLibrary/connect/community/community.service";
|
||||
import {ConfigurationService} from '../openaireLibrary/utils/configuration/configuration.service';
|
||||
import {PiwikService} from '../openaireLibrary/utils/piwik/piwik.service';
|
||||
import {SearchZenodoCommunitiesService} from '../openaireLibrary/connect/zenodoCommunities/searchZenodoCommunities.service';
|
||||
import {ZenodoCommunitiesService} from '../openaireLibrary/connect/zenodoCommunities/zenodo-communities.service';
|
||||
import {Session, User} from '../openaireLibrary/login/utils/helper.class';
|
||||
import {StatisticsForDashboardComponent} from '../statistics/statistics.component';
|
||||
import {StringUtils} from '../openaireLibrary/utils/string-utils.class';
|
||||
|
||||
import {PiwikHelper} from '../utils/piwikHelper';
|
||||
import {HelperFunctions} from "../openaireLibrary/utils/HelperFunctions.class";
|
||||
import {SearchCommunityDataprovidersService} from "../openaireLibrary/connect/contentProviders/searchDataproviders.service";
|
||||
import {SearchCommunityProjectsService} from "../openaireLibrary/connect/projects/searchProjects.service";
|
||||
import {SearchResearchResultsService} from "../openaireLibrary/services/searchResearchResults.service";
|
||||
import {RouterHelper} from "../openaireLibrary/utils/routerHelper.class";
|
||||
import {SEOService} from "../openaireLibrary/sharedComponents/SEO/SEO.service";
|
||||
import {UserManagementService} from "../openaireLibrary/services/user-management.service";
|
||||
|
||||
@Component({
|
||||
selector: 'community',
|
||||
templateUrl: 'community.component.html',
|
||||
})
|
||||
|
||||
export class CommunityComponent {
|
||||
public url: string = null;
|
||||
|
||||
public sub: any;
|
||||
public piwiksub: any;
|
||||
public subfunders: any;
|
||||
|
||||
public publicationTotal = null;
|
||||
public researchDataTotal = null;
|
||||
public softwareTotal = null;
|
||||
public orpTotal = null;
|
||||
public projectTotal = null;
|
||||
public contentProviderTotal = null;
|
||||
public organizationTotal = null;
|
||||
|
||||
params: any = {};
|
||||
properties: EnvProperties;
|
||||
|
||||
public publicationResults = null;
|
||||
public researchDataResults = null;
|
||||
public softwareResults = null;
|
||||
public orpResults = null;
|
||||
|
||||
@Input() communityId = null;
|
||||
public community = null;
|
||||
|
||||
public communityInfo = null;
|
||||
|
||||
public showLoading: boolean = true;
|
||||
masterZenodoCommunity = null;
|
||||
zenodoCommunityIdS = [];
|
||||
showAllSubjects = false;
|
||||
showAllDescription = false;
|
||||
// TODO Unsubscribe
|
||||
public subPublications;
|
||||
public subResearchData;
|
||||
public subSoftware;
|
||||
public subOrps;
|
||||
@ViewChild(StatisticsForDashboardComponent) statistics: StatisticsForDashboardComponent = null;
|
||||
public activeTab = "publication";
|
||||
public show: string = 'overview';
|
||||
|
||||
searchLinkToPublications: string = null;
|
||||
searchLinkToDatasets: string = null;
|
||||
searchLinkToSoftware: string = null;
|
||||
searchLinkToOrps: string = null;
|
||||
searchLinkToProjects: string = null;
|
||||
searchLinkToDataProviders: string = null;
|
||||
searchLinkToAdvancedPublications: string = null;
|
||||
shareInZenodoPage: string = null;
|
||||
public routerHelper:RouterHelper = new RouterHelper();
|
||||
private user: User;
|
||||
private loginCheck: boolean = false;
|
||||
|
||||
constructor(
|
||||
private element: ElementRef,
|
||||
private route: ActivatedRoute,
|
||||
private _router: Router,
|
||||
private location: Location,
|
||||
private _meta: Meta,
|
||||
private _title: Title,
|
||||
private _piwikService: PiwikService,
|
||||
private config: ConfigurationService,
|
||||
private _communityService: CommunityService,
|
||||
private _searchCommunityDataprovidersService:SearchCommunityDataprovidersService,
|
||||
private _searchCommunityProjectsService: SearchCommunityProjectsService,
|
||||
private _searchResearchResultsService: SearchResearchResultsService,
|
||||
private _searchZenodoCommunitiesService: SearchZenodoCommunitiesService,
|
||||
private _ΖenodoCommunitieService: ZenodoCommunitiesService,
|
||||
private seoService: SEOService,
|
||||
private userManagementService: UserManagementService) {
|
||||
|
||||
var description = "OpenAIRE - Connect, Community Dashboard, research community";
|
||||
var title = "OpenAIRE - Connect";
|
||||
this._meta.updateTag({content: description}, "name='description'");
|
||||
this._meta.updateTag({content: description}, "property='og:description'");
|
||||
this._meta.updateTag({content: title}, "property='og:title'");
|
||||
this._title.setTitle(title);
|
||||
|
||||
}
|
||||
|
||||
public ngOnInit() {
|
||||
this.route.data
|
||||
.subscribe((data: { envSpecific: EnvProperties }) => {
|
||||
this.properties = data.envSpecific;
|
||||
this.searchLinkToPublications = this.properties.searchLinkToPublications;
|
||||
this.searchLinkToDatasets = this.properties.searchLinkToDatasets;
|
||||
this.searchLinkToSoftware = this.properties.searchLinkToSoftware;
|
||||
this.searchLinkToOrps = this.properties.searchLinkToOrps;
|
||||
this.searchLinkToProjects = this.properties.searchLinkToProjects;
|
||||
this.searchLinkToDataProviders = this.properties.searchLinkToDataProviders;
|
||||
this.searchLinkToAdvancedPublications = this.properties.searchLinkToAdvancedPublications;
|
||||
this.shareInZenodoPage = this.properties.shareInZenodoPage;
|
||||
this.url = data.envSpecific.baseLink + this._router.url;
|
||||
this.seoService.createLinkForCanonicalURL(this.url, false);
|
||||
this._meta.updateTag({content: this.url}, "property='og:url'");
|
||||
this.userManagementService.getUserInfo(this.properties.userInfoUrl).subscribe( user => {
|
||||
this.user = user;
|
||||
this.loginCheck = true;
|
||||
})
|
||||
if (this.communityId != null && this.communityId != '') {
|
||||
this._communityService.getCommunity(this.properties, this.properties.communityAPI + this.communityId).subscribe(
|
||||
community => {
|
||||
if (typeof document !== 'undefined') {
|
||||
HelperFunctions.scroll();
|
||||
}
|
||||
this.community = community;
|
||||
if (this.properties.environment == "development") {
|
||||
this.params = {communityId: community.communityId};
|
||||
}
|
||||
this._meta.updateTag({content: community.description}, "name='description'");
|
||||
this._meta.updateTag({content: community.description}, "property='og:description'");
|
||||
this._meta.updateTag({content: community.title}, "property='og:title'");
|
||||
this._title.setTitle(community.title);
|
||||
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) {
|
||||
this.piwiksub = this._piwikService.trackView(this.properties, community.title, PiwikHelper.getSiteId(this.communityId,this.properties.environment)).subscribe();
|
||||
}
|
||||
if (this.community.zenodoCommunity) {
|
||||
this._ΖenodoCommunitieService.getZenodoCommunityById(this.properties, this.properties.zenodoCommunities + this.community.zenodoCommunity, null).subscribe(
|
||||
result => {
|
||||
this.masterZenodoCommunity = result;
|
||||
|
||||
},
|
||||
error => {
|
||||
// var emptyCommunity:ZenodoCommunityInfo = new ZenodoCommunityInfo();
|
||||
// emptyCommunity.id = this.masterZenodoCommunityId;
|
||||
// emptyCommunity.title = this.masterZenodoCommunityId;
|
||||
// this.masterZenodoCommunity = emptyCommunity;
|
||||
//console.log("Master Zenodo community'" + this.community.zenodoCommunity + "' couldn't be loaded");
|
||||
this.handleError("Error getting Master Zenodo community with id: " + this.community.zenodoCommunityId, error);
|
||||
|
||||
}
|
||||
);
|
||||
}
|
||||
this._searchZenodoCommunitiesService.searchZCommunities(this.properties, this.communityId).subscribe(
|
||||
result => {
|
||||
this.zenodoCommunityIdS = result;
|
||||
|
||||
|
||||
},
|
||||
error => {
|
||||
//console.error("list of zenodo communities couldn't be loaded");
|
||||
this.handleError("Error getting list of zenodo communities for community with openaire id: " + this.communityId, error);
|
||||
} //this.handleError('System error retrieving community profile', error)
|
||||
);
|
||||
|
||||
//console.log(community);
|
||||
});
|
||||
|
||||
this.countResearchResults("publication");
|
||||
this.countResearchResults("dataset");
|
||||
this.countResearchResults("software");
|
||||
this.countResearchResults("other");
|
||||
|
||||
this._searchCommunityProjectsService.countTotalProjects(this.properties, this.communityId ).subscribe(
|
||||
projectTotal => {
|
||||
this.projectTotal = projectTotal;
|
||||
//console.log(projectTotal);
|
||||
},
|
||||
error => {
|
||||
this.handleError("Error getting number of projects for community with id: " + this.communityId, error);
|
||||
}
|
||||
);
|
||||
|
||||
this._searchCommunityDataprovidersService.countTotalDataproviders(this.properties, this.communityId ).subscribe(
|
||||
contentProviderTotal => {
|
||||
this.contentProviderTotal = contentProviderTotal;
|
||||
//console.log(contentProviderTotal);
|
||||
},
|
||||
error => {
|
||||
this.handleError("Error getting number of content providers for community with id: " + this.communityId, error);
|
||||
}
|
||||
);
|
||||
|
||||
// this._searchEntriesService.countTotal(this.properties.communityAPI+this.communityId+'/organizations').subscribe(
|
||||
// organizationTotal => {
|
||||
// this.organizationTotal = organizationTotal;
|
||||
// console.log(organizationTotal);
|
||||
// });
|
||||
|
||||
|
||||
/**/
|
||||
this.config.getCommunityInformation(this.properties, this.communityId).subscribe(
|
||||
res => {
|
||||
this.communityInfo = res;
|
||||
},
|
||||
error => {
|
||||
//console.log(error)
|
||||
this.handleError("Error getting community with id: " + this.communityId, error);
|
||||
}
|
||||
);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public countResearchResults(resultType: string) {
|
||||
this._searchResearchResultsService.countTotalResults(resultType, this.properties,"&fq=communityid=" + this.communityId).subscribe(
|
||||
researchResultsTotal => {
|
||||
this.setTotal(resultType, researchResultsTotal);
|
||||
if(resultType == "publication") {
|
||||
this.searchResearchResults(resultType, this.publicationTotal, this.publicationResults);
|
||||
}
|
||||
},
|
||||
error => {
|
||||
this.handleError("Error getting number of "+this.getEntityName(resultType, true, true)+" for community with id: " + this.communityId, error);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
public searchResearchResults(resultType: string, resultsTotal: number, results: Array<any>) {
|
||||
this.setActiveTab(resultType);
|
||||
|
||||
if (resultsTotal > 0 && results == null) {
|
||||
this.showLoading = true;
|
||||
|
||||
this._searchResearchResultsService.search(resultType, "", "&fq=communityid=" + this.communityId, 1, 5, "resultdateofacceptance,descending", [], this.properties).subscribe(
|
||||
researchResults => {
|
||||
this.setResults(resultType, researchResults[1]);
|
||||
this.showLoading = false;
|
||||
},
|
||||
error => {
|
||||
this.handleError("Error getting "+this.getEntityName(resultType, true, true)+" for community with id: " + this.communityId, error);
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
public ngOnDestroy() {
|
||||
if (this.piwiksub) {
|
||||
this.piwiksub.unsubscribe();
|
||||
}
|
||||
}
|
||||
|
||||
isEntityEnabled(entity: string) {
|
||||
return this.communityInfo.entities.some(x => x['pid'] == entity && x['isEnabled'] === true);
|
||||
}
|
||||
|
||||
isRouteEnabled(route: string) {
|
||||
return this.communityInfo.pages.some(x => x['route'] == route && x['isEnabled'] === true);
|
||||
}
|
||||
|
||||
showInvite() {
|
||||
return this.loginCheck && this.isManager();
|
||||
}
|
||||
|
||||
isManager() {
|
||||
if(!this.user) {
|
||||
return false;
|
||||
}
|
||||
var email = this.user.email;
|
||||
var index = -1;
|
||||
if (email && this.community != null && this.community.managers != null) {
|
||||
index = this.community.managers.indexOf(email);
|
||||
}
|
||||
return Session.isPortalAdministrator(this.user) || Session.isCommunityCurator(this.user) || index != -1;
|
||||
}
|
||||
|
||||
private handleError(message: string, error) {
|
||||
console.error("Community (component): " + message, error);
|
||||
}
|
||||
|
||||
getSearchPlaceHolder() {
|
||||
var entities = [];
|
||||
if (this.isEntityEnabled("publication")) {
|
||||
entities.push("publications");
|
||||
}
|
||||
if (this.isEntityEnabled("dataset")) {
|
||||
entities.push("research data");
|
||||
}
|
||||
if (this.isEntityEnabled("software")) {
|
||||
entities.push("software");
|
||||
}
|
||||
if (this.isEntityEnabled("orp")) {
|
||||
entities.push("other research products");
|
||||
}
|
||||
return "Search" + ((entities.length > 0) ? (" for " + entities.join(', ') + "...") : "");
|
||||
}
|
||||
|
||||
countOtherGraphs() {
|
||||
var count = 0;
|
||||
if (this.statistics && this.statistics.allowedEntities) {
|
||||
for (var entity of this.statistics.allowedEntities) {
|
||||
if (this.statistics.statisticsSum[entity].total > 0 && this.statistics.allowedCharts[entity].length > 0 && this.activeTab != entity) {
|
||||
count += this.statistics.allowedCharts[entity].length;
|
||||
}
|
||||
}
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
createParams(param) {
|
||||
return StringUtils.quote(StringUtils.URIEncode(param));
|
||||
}
|
||||
|
||||
private setActiveTab(entityType: string) {
|
||||
if(entityType == "other") {
|
||||
this.activeTab = "orp";
|
||||
} else {
|
||||
this.activeTab = entityType;
|
||||
}
|
||||
}
|
||||
|
||||
private setResults(entityType: string, results: Array<any>) {
|
||||
if(entityType == "publication") {
|
||||
this.publicationResults = results;
|
||||
} else if(entityType == "dataset") {
|
||||
this.researchDataResults = results;
|
||||
} else if(entityType == "software") {
|
||||
this.softwareResults = results;
|
||||
} else if(entityType == "other") {
|
||||
this.orpResults = results;
|
||||
}
|
||||
}
|
||||
|
||||
private setTotal(entityType: string, total: number) {
|
||||
if(entityType == "publication") {
|
||||
this.publicationTotal = total;
|
||||
} else if(entityType == "dataset") {
|
||||
this.researchDataTotal = total;
|
||||
} else if(entityType == "software") {
|
||||
this.softwareTotal = total;
|
||||
} else if(entityType == "other") {
|
||||
this.orpTotal = total;
|
||||
}
|
||||
}
|
||||
|
||||
private getEntityName (entityType:string, plural:boolean, full:boolean): string {
|
||||
if(entityType == "publication") {
|
||||
return "publication" + (plural ? "s" : "");
|
||||
} else if(entityType == "dataset") {
|
||||
return (full ? "research data" : ("dataset" + (plural ? "s" : "")));
|
||||
} else if(entityType == "software") {
|
||||
return "software";
|
||||
} else if(entityType == "other") {
|
||||
return (full ? ("other research product" + (plural ? "s" : "")) : "other");
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,50 +0,0 @@
|
|||
import {NgModule} from '@angular/core';
|
||||
import {CommonModule} from '@angular/common';
|
||||
import {FormsModule} from '@angular/forms';
|
||||
import {RouterModule} from '@angular/router';
|
||||
import {CommunityComponent} from './community.component';
|
||||
import {ResultsComponent} from '../searchEntries/results/results.component';
|
||||
|
||||
import {PiwikService} from '../openaireLibrary/utils/piwik/piwik.service';
|
||||
import {CommunityService} from '../openaireLibrary/connect/community/community.service';
|
||||
|
||||
import {FreeGuard} from '../openaireLibrary/login/freeGuard.guard';
|
||||
import {PreviousRouteRecorder} from '../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
|
||||
import {SubscribeModule} from '../utils/subscribe/subscribe.module';
|
||||
import {InviteModule} from '../utils/subscribe/invite/invite.module';
|
||||
import {ManageModule} from '../openaireLibrary/utils/manage/manage.module';
|
||||
|
||||
import {StatisticsModule} from "../statistics/statistics.module";
|
||||
import {SearchZenodoCommunitiesServiceModule} from '../openaireLibrary/connect/zenodoCommunities/searchZenodoCommunitiesService.module';
|
||||
import {ZenodoCommunitiesServiceModule} from '../openaireLibrary/connect/zenodoCommunities/zenodo-communitiesService.module';
|
||||
import {SearchFormModule} from '../openaireLibrary/searchPages/searchUtils/searchForm.module';
|
||||
import {SearchDataprovidersServiceModule} from "../openaireLibrary/connect/contentProviders/searchDataprovidersService.module";
|
||||
import {SearchProjectsServiceModule} from '../openaireLibrary/connect/projects/searchProjectsService.module';
|
||||
import {SearchResearchResultsServiceModule} from "../openaireLibrary/services/searchResearchResultsService.module";
|
||||
import {SearchResultsModule} from "../openaireLibrary/searchPages/searchUtils/searchResults.module";
|
||||
import {CuratorsModule} from "../curators/curators.module";
|
||||
import {AffiliationsModule} from "../affiliations/affiliations.module";
|
||||
import {Schema2jsonldModule} from "../openaireLibrary/sharedComponents/schema2jsonld/schema2jsonld.module";
|
||||
import {SEOServiceModule} from "../openaireLibrary/sharedComponents/SEO/SEOService.module";
|
||||
import {MatSelectModule} from "@angular/material";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule, RouterModule,
|
||||
SubscribeModule, StatisticsModule, ManageModule, InviteModule,
|
||||
SearchZenodoCommunitiesServiceModule, ZenodoCommunitiesServiceModule, SearchFormModule, SearchDataprovidersServiceModule, SearchProjectsServiceModule,
|
||||
SearchResearchResultsServiceModule, SearchResultsModule, CuratorsModule, AffiliationsModule,
|
||||
Schema2jsonldModule, SEOServiceModule, MatSelectModule
|
||||
],
|
||||
declarations: [
|
||||
CommunityComponent, ResultsComponent
|
||||
],
|
||||
providers:[
|
||||
FreeGuard, PreviousRouteRecorder,
|
||||
PiwikService, CommunityService
|
||||
],
|
||||
exports: [
|
||||
CommunityComponent
|
||||
]
|
||||
})
|
||||
export class CommunityModule { }
|
|
@ -1,16 +0,0 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule } from '@angular/router';
|
||||
|
||||
import{CommunityWrapperComponent} from './communityWrapper.component';
|
||||
import {FreeGuard} from '../openaireLibrary/login/freeGuard.guard';
|
||||
import {PreviousRouteRecorder} from '../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forChild([
|
||||
{ path: '', component: CommunityWrapperComponent, canActivate: [FreeGuard], canDeactivate: [PreviousRouteRecorder] }
|
||||
|
||||
])
|
||||
]
|
||||
})
|
||||
export class CommunityWrapperRoutingModule { }
|
|
@ -1,48 +0,0 @@
|
|||
import {Component} from '@angular/core';
|
||||
import {ActivatedRoute, Router} from '@angular/router';
|
||||
|
||||
import {ConnectHelper} from '../openaireLibrary/connect/connectHelper';
|
||||
|
||||
@Component({
|
||||
selector: 'community-wrapper',
|
||||
template:`
|
||||
<community *ngIf="dashboard && communityId" [communityId]=communityId></community>
|
||||
<communities *ngIf="dashboard!=null && !dashboard" ></communities>
|
||||
`
|
||||
})
|
||||
|
||||
export class CommunityWrapperComponent {
|
||||
communityId:string;
|
||||
dashboard:boolean = null;
|
||||
|
||||
constructor (
|
||||
private route: ActivatedRoute,
|
||||
private _router: Router
|
||||
|
||||
) {
|
||||
this.route.data
|
||||
.subscribe((data: { envSpecific: any }) => {
|
||||
this.route.queryParams.subscribe(
|
||||
communityId => {
|
||||
this.communityId = ConnectHelper.getCommunityFromDomain(data.envSpecific.domain);
|
||||
if(!this.communityId) {
|
||||
this.communityId = communityId['communityId'];
|
||||
}
|
||||
|
||||
if(this.communityId){
|
||||
this.dashboard = true;
|
||||
}else{
|
||||
this.dashboard = false;
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
public ngOnInit() {
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -1,27 +0,0 @@
|
|||
import { NgModule} from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import { RouterModule } from '@angular/router';
|
||||
import {FreeGuard} from '../openaireLibrary/login/freeGuard.guard';
|
||||
import {PreviousRouteRecorder} from '../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
|
||||
import{CommunityModule} from '../community/community.module';
|
||||
import{CommunitiesModule} from '../communities/communities.module';
|
||||
import {CommunityWrapperComponent} from './communityWrapper.component';
|
||||
import {CommunityWrapperRoutingModule} from './communityWrapper-routing.module';
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule, RouterModule,
|
||||
CommunityWrapperRoutingModule, CommunityModule, CommunitiesModule
|
||||
],
|
||||
declarations: [
|
||||
CommunityWrapperComponent
|
||||
],
|
||||
providers:[
|
||||
FreeGuard, PreviousRouteRecorder,
|
||||
|
||||
],
|
||||
exports: [
|
||||
CommunityWrapperComponent
|
||||
]
|
||||
})
|
||||
export class CommunityWrapperModule { }
|
|
@ -1,16 +0,0 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule } from '@angular/router';
|
||||
|
||||
import {ContentPageComponent} from './contentPage.component';
|
||||
import {FreeGuard} from '../openaireLibrary/login/freeGuard.guard';
|
||||
import {PreviousRouteRecorder} from '../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forChild([
|
||||
{ path: '', component: ContentPageComponent, canActivate: [FreeGuard], canDeactivate: [PreviousRouteRecorder] }
|
||||
|
||||
])
|
||||
]
|
||||
})
|
||||
export class ContentPageRoutingModule { }
|
|
@ -1,83 +0,0 @@
|
|||
<schema2jsonld *ngIf="url" [URL]="url" [name]="pageTitle" type="other"></schema2jsonld>
|
||||
|
||||
<helper *ngIf="pageContents && pageContents['top'] && pageContents['top'].length > 0" [texts]="pageContents['top']"></helper>
|
||||
<!--
|
||||
<div class="uk-margin-large-top tm-middle uk-container" id="tm-main">
|
||||
<div class="uk-container uk-margin-bottom">
|
||||
<div class="uk-article-title custom-article-title">
|
||||
Content policy
|
||||
</div>
|
||||
<div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
OpenAIRE builds an open scholarly graph of research products (publications, datasets, software and other types of research products), linked to each other and to fundings, projects and organizations.
|
||||
The information used to build the graph is collected from the OpenAIRE network of content providers<!– (currently composed of more than 400 institutional repositories, 8,000 Open Access journals, 70 dataset archives and 20 funders)–>
|
||||
and is inferred by OpenAIRE algorithms. OpenAIRE algorithms are capable of detecting duplicates and mining information from the full-texts of Open Access publications.
|
||||
For more details about the construction of the graph, please check <a href="https://beta.openaire.eu/aggregation-and-content-provision-workflows" target="_blank" >here</a>.
|
||||
</p>
|
||||
<p>
|
||||
Thanks to the Research Community Dashboard (RCD), researchers have a dedicated view of the OpenAIRE graph where only the research products relevant to the community are searchable and browsable.<br>
|
||||
There are several ways to decide if a research product is relevant to a given community:
|
||||
</p>
|
||||
|
||||
|
||||
<p class="uk-margin-left">
|
||||
<!– <span class="uk-text-large uk-text-primary">Users </span> –>
|
||||
<!– <div class="uk-margin-left"> –>
|
||||
<b>Links:</b> Users can "claim" that a research result is relevant to a community via the
|
||||
<a routerLinkActive="uk-link" routerLink="/participate/claim" >Link</a> functionality of the Research community dashboard.
|
||||
<br>
|
||||
For more details about linking functionality, please check <a href="https://beta.openaire.eu/linking" target="_blank" >here</a>.
|
||||
|
||||
<!– </div> –>
|
||||
</p>
|
||||
<div class="uk-margin-left uk-margin-top">
|
||||
<!– <span class="uk-text-large uk-text-primary">OpenAIRE algorithms </span><br> –>
|
||||
<b>OpenAIRE algorithms:</b> Community managers can configure the OpenAIRE algorithms, in order to automatically assign research products to a community based on:
|
||||
|
||||
<div class="uk-margin-left">
|
||||
<ul class=" uk-list uk-list-bullet ">
|
||||
<li>
|
||||
The content providers they have been collected from. <br>Examples: all research products collected from "NeuroVault" are relevant to the Neuroinformatics community; all research products collected from the LINDAT/CLARIN repository are relevant to the CLARIN research initiative.
|
||||
|
||||
</li>
|
||||
<li>
|
||||
The projects they have been produced in. <br>Examples: all research products of the project "Tara Mediterranee" are relevant to the European Marine Science community; all research products of the project "ARIADNE" are relevant to the Digital Humanities and Cultural Heritage community.
|
||||
</li>
|
||||
<li>
|
||||
The subjects and keywords (only for RCD serving research communities). <br>Examples: all research products having "SDG11 - Sustainable cities and communities" among the subjects are relevant to the Greek Sustainable Development Solutions Network community; all research products with subject "agriculture" are relevant to the AgInfra community
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="uk-margin-left uk-margin-top">
|
||||
<b>Acknowledgement statements:</b> Acknowledgement statements found in full-texts (only for RCDs serving research infrastructures/initiatives)
|
||||
</div>
|
||||
<!–div class="uk-margin-top">
|
||||
Stay tuned to discover the new criteria that will be supported in the next releases of the OpenAIRE-Connect Research Community Dashboard:
|
||||
<div class="uk-margin-left ">
|
||||
|
||||
<ul class=" uk-list uk-list-bullet ">
|
||||
<li>
|
||||
Community managers will be able to specify additional criteria to select subsets of research results collected from a content provider or linked to projects.
|
||||
</li>
|
||||
<li>
|
||||
GUI support for the selection of keywords from standard subject classification vocabularies and taxonomies
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div–>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
-->
|
|
@ -1,81 +0,0 @@
|
|||
import {Component} from '@angular/core';
|
||||
import {ActivatedRoute, Router} from '@angular/router';
|
||||
import {Meta, Title} from '@angular/platform-browser';
|
||||
import {HelperService} from "../openaireLibrary/utils/helper/helper.service";
|
||||
import {EnvProperties} from "../openaireLibrary/utils/properties/env-properties";
|
||||
import {SEOService} from "../openaireLibrary/sharedComponents/SEO/SEO.service";
|
||||
import {PiwikService} from "../openaireLibrary/utils/piwik/piwik.service";
|
||||
|
||||
@Component({
|
||||
selector: 'content',
|
||||
templateUrl: './contentPage.component.html'
|
||||
})
|
||||
export class ContentPageComponent {
|
||||
|
||||
properties: EnvProperties;
|
||||
public pageContents = null;
|
||||
public divContents = null;
|
||||
|
||||
public url: string = null;
|
||||
public pageTitle: string = "OpenAIRE - Connect | Content Policy";
|
||||
piwiksub: any;
|
||||
|
||||
constructor(private route: ActivatedRoute, private _router: Router,
|
||||
private _meta: Meta,
|
||||
private _title: Title,
|
||||
private seoService: SEOService,
|
||||
private _piwikService: PiwikService,
|
||||
private helper: HelperService) {}
|
||||
|
||||
public ngOnInit() {
|
||||
this.route.data
|
||||
.subscribe((data: { envSpecific: EnvProperties }) => {
|
||||
this.properties = data.envSpecific;
|
||||
|
||||
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) {
|
||||
this.piwiksub = this._piwikService.trackView(this.properties, this.pageTitle, this.properties.piwikSiteId).subscribe();
|
||||
}
|
||||
this.url = this.properties.baseLink + this._router.url;
|
||||
this.seoService.createLinkForCanonicalURL(this.url);
|
||||
this.updateUrl(this.url);
|
||||
this.updateTitle(this.pageTitle);
|
||||
this.updateDescription("content, open access");
|
||||
|
||||
//this.getDivContents();
|
||||
this.getPageContents();
|
||||
});
|
||||
}
|
||||
|
||||
ngOnDestroy() {
|
||||
if(this.piwiksub) {
|
||||
this.piwiksub.unsubscribe();
|
||||
}
|
||||
}
|
||||
|
||||
private updateDescription(description: string) {
|
||||
this._meta.updateTag({content: description}, "name='description'");
|
||||
this._meta.updateTag({content: description}, "property='og:description'");
|
||||
}
|
||||
|
||||
private updateTitle(title: string) {
|
||||
var _title = ((title.length > 50) ? title.substring(0, 50) : title);
|
||||
this._title.setTitle(_title);
|
||||
this._meta.updateTag({content: _title}, "property='og:title'");
|
||||
}
|
||||
|
||||
private updateUrl(url: string) {
|
||||
this._meta.updateTag({content: url}, "property='og:url'");
|
||||
}
|
||||
|
||||
private getPageContents() {
|
||||
this.helper.getPageHelpContents(this._router.url, this.properties, 'connect').subscribe(contents => {
|
||||
this.pageContents = contents;
|
||||
})
|
||||
}
|
||||
|
||||
private getDivContents() {
|
||||
this.helper.getDivHelpContents(this._router.url, this.properties, 'connect').subscribe(contents => {
|
||||
this.divContents = contents;
|
||||
})
|
||||
}
|
||||
}
|
|
@ -1,33 +0,0 @@
|
|||
import {NgModule} from '@angular/core';
|
||||
import {RouterModule} from '@angular/router';
|
||||
|
||||
import {FreeGuard} from '../openaireLibrary/login/freeGuard.guard';
|
||||
import {PreviousRouteRecorder} from '../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
|
||||
|
||||
import {ContentPageComponent} from './contentPage.component';
|
||||
import {ContentPageRoutingModule} from './content-routing.module';
|
||||
import {CommonModule} from "@angular/common";
|
||||
import {HelperModule} from "../openaireLibrary/utils/helper/helper.module";
|
||||
import {PiwikService} from "../openaireLibrary/utils/piwik/piwik.service";
|
||||
import {Schema2jsonldModule} from "../openaireLibrary/sharedComponents/schema2jsonld/schema2jsonld.module";
|
||||
import {SEOServiceModule} from "../openaireLibrary/sharedComponents/SEO/SEOService.module";
|
||||
import {PiwikServiceModule} from "../openaireLibrary/utils/piwik/piwikService.module";
|
||||
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
ContentPageRoutingModule, RouterModule, CommonModule, HelperModule,
|
||||
Schema2jsonldModule, SEOServiceModule, PiwikServiceModule
|
||||
],
|
||||
declarations: [
|
||||
ContentPageComponent
|
||||
],
|
||||
providers: [FreeGuard, PreviousRouteRecorder],
|
||||
exports: [
|
||||
ContentPageComponent
|
||||
]
|
||||
})
|
||||
|
||||
|
||||
export class ContentPageModule {
|
||||
}
|
|
@ -1,17 +0,0 @@
|
|||
import {NgModule} from '@angular/core';
|
||||
import {RouterModule} from '@angular/router';
|
||||
|
||||
import {FreeGuard} from '../openaireLibrary/login/freeGuard.guard';
|
||||
import {PreviousRouteRecorder} from '../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
|
||||
|
||||
import {CommunityCreationInstructionsComponent} from './community-creation-instructions.component';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forChild([
|
||||
{ path: '', component: CommunityCreationInstructionsComponent, canActivate: [FreeGuard], canDeactivate: [PreviousRouteRecorder] }
|
||||
|
||||
])
|
||||
]
|
||||
})
|
||||
export class CommunityCreationInstructionsRoutingModule { }
|
|
@ -1,416 +0,0 @@
|
|||
import {Component, ElementRef, HostListener, Input, ViewChild} from '@angular/core';
|
||||
import {ActivatedRoute, Router} from '@angular/router';
|
||||
import {Title, Meta} from '@angular/platform-browser';
|
||||
|
||||
import {PiwikService} from '../openaireLibrary/utils/piwik/piwik.service';
|
||||
import {EnvProperties} from '../openaireLibrary/utils/properties/env-properties';
|
||||
|
||||
declare var UIkit: any;
|
||||
|
||||
@Component({
|
||||
selector: 'community-creation-instructions',
|
||||
template: `
|
||||
<div class="image-front-topbar uk-section-secondary uk-section-overlap uk-position-relative uk-preserve-color" uk-scrollspy="{"target":"[uk-scrollspy-class]","cls":"uk-animation-fade","delay":false}" tm-header-transparent="light" tm-header-transparent-placeholder="">
|
||||
<div style=" min-height: calc(7.89999px + 60vh);"
|
||||
class=" mainPageSearchForm uk-background-norepeat uk-background-cover uk-section uk-padding-remove-bottom" >
|
||||
<div class="uk-position-cover" style=""></div>
|
||||
<div class="uk-position-relative uk-panel">
|
||||
<div class="uk-container uk-section">
|
||||
<div>
|
||||
<h3 class="uk-margin-remove-bottom uk-margin-large-top">Discover the power of OpenAIRE Connect community page builder</h3>
|
||||
<h5 class="uk-margin-remove-top">Gather all your research in one place</h5>
|
||||
|
||||
<!-- <div class="uk-width-medium uk-text-center uk-margin-large-top uk-margin-large-left">-->
|
||||
<!-- <h5>Contact OpenAIRE team, in order to create your community page</h5>-->
|
||||
<!-- <div>-->
|
||||
<!-- <a class="uk-button portal-button" routerLinkActive="router-link-active" routerLink="/contact-us"> CONTACT US</a>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
|
||||
<div class="uk-width-1-2 uk-inline uk-margin-large-top uk-margin-large-bottom">
|
||||
<div class="uk-position-center ">
|
||||
<div class="uk-width-medium uk-text-center">
|
||||
<h5>Contact OpenAIRE team, in order to create your community page</h5>
|
||||
<div>
|
||||
<a class="uk-button portal-button" routerLinkActive="router-link-active" routerLink="/contact-us"> CONTACT US</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div>
|
||||
<div #adminPortalImage class="uk-margin-bottom uk-margin-top">
|
||||
<!--div uk-scrollspy="cls: uk-animation-fade uk-animation-reverse; target: > div > div > .uk-card; delay: 1000; repeat: false"-->
|
||||
<div class="uk-container uk-margin-large-top">
|
||||
<h3>OpenAIRE Connect community page builder at a glance</h3>
|
||||
<div class="uk-inline uk-dark" (scroll)="scrollHandler($event)">
|
||||
<img src="assets/admin-portal.png" alt="OpenAIRE" >
|
||||
|
||||
<div id="logo" class="my-tooltip uk-card uk-card-secondary uk-position-absolute uk-transform-center"
|
||||
style="left: 27%; top: 2%" hidden>
|
||||
<div class="uk-padding-small uk-text-small uk-text-bold">Your logo goes here</div>
|
||||
</div>
|
||||
|
||||
<div id="configure-profile" class="my-tooltip uk-text-center uk-card uk-card-secondary uk-position-absolute uk-transform-center"
|
||||
style="left: 33%; top: 21%" hidden>
|
||||
<div class="uk-padding-small uk-text-small uk-text-bold">Configure your community profile</div>
|
||||
</div>
|
||||
<div id="connect-with" class="my-tooltip uk-width-1-5 uk-card uk-text-center uk-card-secondary uk-position-absolute uk-transform-center"
|
||||
style="left: 56%; top: 18%" hidden>
|
||||
<div class="uk-padding-small uk-text-small uk-text-bold">Connect with subjects, projects, content providers & Zenodo communities</div>
|
||||
</div>
|
||||
<div id="choose-statistics" class="my-tooltip uk-text-center uk-card uk-card-secondary uk-position-absolute uk-transform-center"
|
||||
style="left: 80%; top: 19%" hidden>
|
||||
<div class="uk-padding-small uk-text-small uk-text-bold">Choose statistics and charts to be publicly available</div>
|
||||
</div>
|
||||
|
||||
<div id="curate" class="my-tooltip uk-text-center uk-card uk-card-secondary uk-position-absolute uk-transform-center"
|
||||
style="left: 32%; top: 60%" hidden>
|
||||
<div class="uk-padding-small uk-text-small uk-text-bold">Curate links of research results</div>
|
||||
</div>
|
||||
<div id="help-texts" class="my-tooltip uk-width-1-5 uk-text-center uk-card uk-card-secondary uk-position-absolute uk-transform-center"
|
||||
style="left: 56%; top: 59%" hidden>
|
||||
<div class="uk-padding-small uk-text-small uk-text-bold">Add help texts in your pages for extra information</div>
|
||||
</div>
|
||||
<div id="invite" class="my-tooltip uk-text-center uk-card uk-card-secondary uk-position-absolute uk-transform-center"
|
||||
style="left: 80%; top: 60%" hidden>
|
||||
<div class="uk-padding-small uk-text-small uk-text-bold">Invite collaborators and users</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!--[attr.uk-tooltip]="'title: ' + createTooltip('Your logo goes here')"-->
|
||||
<!--uk-toggle="target: #logo; mode: click"-->
|
||||
<a class="uk-position-absolute uk-transform-center uk-icon uk-marker"
|
||||
style="left: 20%; top: 5%" uk-marker>
|
||||
<!--span uk-icon="plus"></span-->
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" data-svg="marker"><rect x="9" y="4" width="1" height="11"></rect><rect x="4" y="9" width="11" height="1"></rect></svg>
|
||||
</a>
|
||||
|
||||
<!--[attr.uk-tooltip]="'title: ' + createTooltip('Configure your community profile') + '; cls: conf-profile'"-->
|
||||
<!--class: configure-profile -->
|
||||
<a class="uk-position-absolute uk-transform-center uk-icon uk-marker"
|
||||
style="left: 22%; top: 24%" uk-marker>
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" data-svg="marker"><rect x="9" y="4" width="1" height="11"></rect><rect x="4" y="9" width="11" height="1"></rect></svg>
|
||||
</a>
|
||||
<!--[attr.uk-tooltip]="'title: ' + createTooltip('Connect with subjects, projects, content providers & Zenodo communities')"-->
|
||||
<a class="uk-position-absolute uk-transform-center uk-icon uk-marker"
|
||||
style="left: 46%; top: 24%" uk-marker>
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" data-svg="marker"><rect x="9" y="4" width="1" height="11"></rect><rect x="4" y="9" width="11" height="1"></rect></svg>
|
||||
</a>
|
||||
<!-- [attr.uk-tooltip]="'title: ' + createTooltip('Choose statistics and charts to be publicly available')"-->
|
||||
<a class="uk-position-absolute uk-transform-center uk-icon uk-marker"
|
||||
style="left: 70%; top: 24%" uk-marker>
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" data-svg="marker"><rect x="9" y="4" width="1" height="11"></rect><rect x="4" y="9" width="11" height="1"></rect></svg>
|
||||
</a>
|
||||
|
||||
<!--[attr.uk-tooltip]="'title: ' + createTooltip('Curate links of research results')"-->
|
||||
<a class="uk-position-absolute uk-transform-center uk-icon uk-marker"
|
||||
style="left: 22%; top: 64%" uk-marker>
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" data-svg="marker"><rect x="9" y="4" width="1" height="11"></rect><rect x="4" y="9" width="11" height="1"></rect></svg>
|
||||
</a>
|
||||
<!--[attr.uk-tooltip]="'title: ' + createTooltip('Add help texts in your pages for extra information')"-->
|
||||
<a class="uk-position-absolute uk-transform-center uk-icon uk-marker"
|
||||
style="left: 46%; top: 64%" uk-marker>
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" data-svg="marker"><rect x="9" y="4" width="1" height="11"></rect><rect x="4" y="9" width="11" height="1"></rect></svg>
|
||||
</a>
|
||||
<!--[attr.uk-tooltip]="'title: ' + createTooltip('Invite collaborators and users')"-->
|
||||
<a class="uk-position-absolute uk-transform-center uk-icon uk-marker"
|
||||
style="left: 70%; top: 64%" uk-marker>
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" data-svg="marker"><rect x="9" y="4" width="1" height="11"></rect><rect x="4" y="9" width="11" height="1"></rect></svg>
|
||||
</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div #communityImage class="uk-container uk-margin-large-top">
|
||||
<h3>Community page</h3>
|
||||
<div uk-grid uk-grid-match>
|
||||
<div class="uk-width-1-3 uk-card">
|
||||
<div class="uk-text-center uk-position-center ">
|
||||
<p>Contact OpenAIRE team, in order to create your community page</p>
|
||||
<div>
|
||||
<a class="uk-button portal-button" routerLinkActive="router-link-active" routerLink="/contact-us"> CONTACT US</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="uk-width-2-3 uk-text-center">
|
||||
<div class="uk-inline uk-dark">
|
||||
<img src="assets/community-first-page.jpg" alt="OpenAIRE">
|
||||
|
||||
<div id="community-content" class="my-tooltip uk-text-center uk-card uk-card-secondary uk-position-absolute uk-transform-center"
|
||||
style="left: 80%; top: 31%" hidden>
|
||||
<div class="uk-padding-small uk-text-small uk-text-bold">Community content at a glance</div>
|
||||
</div>
|
||||
<div id="locate-research-results" class="my-tooltip uk-text-center uk-card uk-card-secondary uk-position-absolute uk-transform-center"
|
||||
style="left: 57%; top: 38%" hidden>
|
||||
<div class="uk-padding-small uk-text-small uk-text-bold">Locate Research Results</div>
|
||||
</div>
|
||||
<div id="recent-research-results" class="my-tooltip uk-width-1-4 uk-text-center uk-card uk-card-secondary uk-position-absolute uk-transform-center"
|
||||
style="left: 48%; top: 58%" hidden>
|
||||
<div class="uk-padding-small uk-text-small uk-text-bold">Recent research results and related graphs</div>
|
||||
</div>
|
||||
|
||||
<!--[attr.uk-tooltip]="'title: ' + createTooltip('Community content at a glance')"-->
|
||||
<a class="uk-position-absolute uk-transform-center uk-icon uk-marker"
|
||||
style="right: 6%; top: 28%" uk-marker>
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" data-svg="marker"><rect x="9" y="4" width="1" height="11"></rect><rect x="4" y="9" width="11" height="1"></rect></svg>
|
||||
</a>
|
||||
<!--[attr.uk-tooltip]="'title: ' + createTooltip('Locate Research Results')"-->
|
||||
<a class="uk-position-absolute uk-transform-center uk-icon uk-marker"
|
||||
style="left: 45%; top: 40%" uk-marker>
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" data-svg="marker"><rect x="9" y="4" width="1" height="11"></rect><rect x="4" y="9" width="11" height="1"></rect></svg>
|
||||
</a>
|
||||
<!--[attr.uk-tooltip]="'title: ' + createTooltip('Recent research results and related graphs')"-->
|
||||
<a class="uk-position-absolute uk-transform-center uk-icon uk-marker"
|
||||
style="left: 35%; top: 55%" uk-marker>
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" data-svg="marker"><rect x="9" y="4" width="1" height="11"></rect><rect x="4" y="9" width="11" height="1"></rect></svg>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--/div-->
|
||||
</div>
|
||||
|
||||
<!--<div class="uk-container">-->
|
||||
<!-- <a class="configure-profile uk-icon uk-marker"-->
|
||||
<!-- uk-marker-->
|
||||
<!-- uk-tooltip="title: AAAAAAA 1">-->
|
||||
<!-- <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" data-svg="marker"><rect x="9" y="4" width="1" height="11"></rect><rect x="4" y="9" width="11" height="1"></rect></svg>-->
|
||||
<!-- </a>-->
|
||||
<!-- <a class="connect-with uk-icon uk-marker"-->
|
||||
<!-- uk-marker-->
|
||||
<!-- uk-tooltip="title: AAAAAAA 2">-->
|
||||
<!-- <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" data-svg="marker"><rect x="9" y="4" width="1" height="11"></rect><rect x="4" y="9" width="11" height="1"></rect></svg>-->
|
||||
<!-- </a>-->
|
||||
<!-- <a class="choose-statistics uk-icon uk-marker"-->
|
||||
<!-- uk-marker-->
|
||||
<!-- uk-tooltip="title: AAAAAAA 3">-->
|
||||
<!-- <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" data-svg="marker"><rect x="9" y="4" width="1" height="11"></rect><rect x="4" y="9" width="11" height="1"></rect></svg>-->
|
||||
<!-- </a>-->
|
||||
|
||||
<!-- <button (click)="openTooltips()">OPEN TOOLTIPS</button>-->
|
||||
|
||||
|
||||
<!-- <button type="button" uk-toggle="target: #my-id1; mode: hover; animation: uk-animation-fade">test tooltip</button>-->
|
||||
<!-- <p id="my-id1" class="test-tooltip">TEST tooltip1</p>-->
|
||||
|
||||
<!-- <button (scroll)="scrollHandler($event)" type="button" uk-toggle="target: #my-id2; mode: hover; animation: uk-animation-fade">test tooltip</button>-->
|
||||
<!-- <p id="my-id2" class="test-tooltip" [attr.hidden]="hidden ? 'hidden' : null">TEST tooltip2</p>-->
|
||||
|
||||
<!-- <button type="button" uk-toggle="target: #my-id3; mode: hover; animation: uk-animation-fade">test tooltip</button>-->
|
||||
<!-- <p id="my-id3"class="test-tooltip">TEST tooltip3</p>-->
|
||||
<!--</div>-->
|
||||
|
||||
<div class="uk-section-muted uk-margin-large-top">
|
||||
<div class="uk-container uk-container-large">
|
||||
<div class="uk-margin-large-top uk-margin-large-bottom">
|
||||
<div class="uk-margin uk-panel">
|
||||
<h4 class="uk-margin uk-h4 uk-text-bold">
|
||||
Why trust OpenAIRE?
|
||||
</h4>
|
||||
|
||||
<div class="uk-child-width-1-3@m uk-grid-small uk-grid-match" uk-grid
|
||||
uk-scrollspy="target: > div; cls:uk-animation-fade; delay: 500">
|
||||
<div>
|
||||
<div class="uk-card uk-card-default uk-card-body">
|
||||
<p class="">It is the Open Access Infrastructure for Europe.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="uk-card uk-card-default uk-card-body">
|
||||
<p>It is community based and independent.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="uk-card uk-card-default uk-card-body">
|
||||
<p>Provides organizational and technical framework to support OpenScience.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="uk-card uk-card-default uk-card-body">
|
||||
<p>Provides access to over 25 million research outputs and services that enable their access, link and reuse.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="uk-card uk-card-default uk-card-body">
|
||||
<p>Provides organizational and technical framework to support OpenScience.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="uk-card uk-card-default uk-card-body">
|
||||
<p>Ensures that all data come from trusted sources.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`
|
||||
})
|
||||
|
||||
export class CommunityCreationInstructionsComponent {
|
||||
public piwiksub: any;
|
||||
|
||||
public pageTitle = "OpenAIRE"
|
||||
|
||||
public admin_portal_image_hidden: boolean = true;
|
||||
@ViewChild('adminPortalImage') admin_portal_image: ElementRef;
|
||||
|
||||
public community_image_hidden: boolean = true;
|
||||
@ViewChild('communityImage') community_image: ElementRef;
|
||||
|
||||
properties:EnvProperties;
|
||||
|
||||
constructor (
|
||||
private route: ActivatedRoute,
|
||||
private _router: Router,
|
||||
private _title: Title,
|
||||
private _piwikService:PiwikService) {
|
||||
|
||||
var description = "OpenAIRE - Connect, Community Dashboard, research community";
|
||||
var title = "OpenAIRE - Connect | Create and manage your community page";
|
||||
this._title.setTitle(title);
|
||||
}
|
||||
|
||||
public ngOnInit() {
|
||||
this.route.data
|
||||
.subscribe((data: { envSpecific: EnvProperties }) => {
|
||||
this.properties = data.envSpecific;
|
||||
var url = data.envSpecific.baseLink+this._router.url;
|
||||
|
||||
if(this.properties.enablePiwikTrack && (typeof document !== 'undefined')){
|
||||
this.piwiksub = this._piwikService.trackView(this.properties, "OpenAIRE Connect | Create and manage your community page", this.properties.piwikSiteId).subscribe();
|
||||
}
|
||||
|
||||
//UIkit.tooltip('.configure-profile').show();
|
||||
});
|
||||
}
|
||||
|
||||
/*
|
||||
public openTooltips() {
|
||||
console.debug("open these tooltips!");
|
||||
UIkit.tooltip('.configure-profile').show();
|
||||
UIkit.tooltip('.connect-with').show();
|
||||
UIkit.tooltip('.choose-statistics').show();
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
public ngAfterViewInit() {
|
||||
/* if (typeof document !== 'undefined') {
|
||||
|
||||
if (document.getElementById('enableFadeOutScrollScript')) {
|
||||
document.getElementById('enableFadeOutScrollScript').remove();
|
||||
}
|
||||
|
||||
const enableFadeOutScrollScript = document.createElement('script');
|
||||
enableFadeOutScrollScript.setAttribute('id', 'enableFadeOutScrollScript');
|
||||
enableFadeOutScrollScript.innerHTML = '\n' +
|
||||
'$(document).ready(function() {\n' +
|
||||
'\n' +
|
||||
' $(window).scroll( function(){\n' +
|
||||
'\n' +
|
||||
' $(\'.my-tooltip\').each( function(i){\n' +
|
||||
'\n' +
|
||||
' var bottom_of_object = $(this).position().top + $(this).outerHeight();\n' +
|
||||
' var bottom_of_window = $(window).scrollTop() + $(window).height();\n' +
|
||||
'\n' +
|
||||
' if( bottom_of_window > bottom_of_object ){\n' +
|
||||
'\n' +
|
||||
' $(this).animate({\'opacity\':\'1\'},1500);\n' +
|
||||
//'\n' + 'this.hidden = true;' +
|
||||
'\n' +
|
||||
' }\n' +
|
||||
'\n' +
|
||||
' });\n' +
|
||||
'\n' +
|
||||
' });\n' +
|
||||
'\n' +
|
||||
' });';
|
||||
|
||||
document.body.appendChild(enableFadeOutScrollScript);
|
||||
*/
|
||||
/*UIkit.util.on('#logo', 'beforehide', function () {
|
||||
// do something
|
||||
if(this.hide =http://www.equp4.wf/= false) {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}*/
|
||||
}
|
||||
|
||||
|
||||
|
||||
@HostListener('window:scroll', ['$event'])
|
||||
scrollHandler(event) {
|
||||
let offsetHeight = document.getElementById('stickyNavbar').offsetHeight;
|
||||
let scrollPosition = window.pageYOffset;
|
||||
|
||||
let admin_portal_image_idsToToggle: string[] = ['#logo', '#configure-profile', '#choose-statistics', '#connect-with', '#curate', '#help-texts', '#invite'];
|
||||
let adminPortalImageHeight = this.admin_portal_image.nativeElement.offsetHeight;
|
||||
let adminPortalImagePosition = this.admin_portal_image.nativeElement.offsetTop - offsetHeight;
|
||||
|
||||
if(!this.admin_portal_image_hidden
|
||||
&& ((scrollPosition >= 0.7*adminPortalImagePosition+adminPortalImageHeight) || scrollPosition < 0.7*adminPortalImagePosition)) {
|
||||
this.admin_portal_image_hidden = true;
|
||||
admin_portal_image_idsToToggle.forEach((id: string) => {
|
||||
UIkit.toggle(id, {
|
||||
animation: 'uk-animation-fade uk-animation-reverse',
|
||||
duration: 1500
|
||||
}).toggle();
|
||||
});
|
||||
} else if (this.admin_portal_image_hidden && (scrollPosition >= 0.7*adminPortalImagePosition)) {
|
||||
this.admin_portal_image_hidden = false;
|
||||
admin_portal_image_idsToToggle.forEach((id: string) => {
|
||||
UIkit.toggle(id, {
|
||||
animation: 'uk-animation-fade',
|
||||
duration: 1500
|
||||
}).toggle();
|
||||
});
|
||||
}
|
||||
|
||||
let community_image_idsToToggle: string[] = ['#community-content', '#locate-research-results', '#recent-research-results'];
|
||||
let communityImageHeight = this.community_image.nativeElement.offsetHeight;
|
||||
let communityImagePosition = this.community_image.nativeElement.offsetTop - offsetHeight;
|
||||
|
||||
if(!this.community_image_hidden
|
||||
&& ((scrollPosition >= 0.9*communityImagePosition+communityImageHeight) || scrollPosition < 0.9*communityImagePosition)) {
|
||||
this.community_image_hidden = true;
|
||||
community_image_idsToToggle.forEach((id: string) => {
|
||||
UIkit.toggle(id, {
|
||||
animation: 'uk-animation-fade uk-animation-reverse',
|
||||
duration: 1500
|
||||
}).toggle();
|
||||
});
|
||||
} else if (this.community_image_hidden && (scrollPosition >= 0.9*communityImagePosition)) {
|
||||
this.community_image_hidden = false;
|
||||
community_image_idsToToggle.forEach((id: string) => {
|
||||
UIkit.toggle(id, {
|
||||
animation: 'uk-animation-fade',
|
||||
duration: 1500
|
||||
}).toggle();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public ngOnDestroy() {
|
||||
if(this.piwiksub){
|
||||
this.piwiksub.unsubscribe();
|
||||
}
|
||||
}
|
||||
|
||||
public createTooltip(content: string) : string {
|
||||
return "<div class=\"uk-text-center uk-text-bold uk-padding-small\">"+content+"</div>";
|
||||
}
|
||||
}
|
|
@ -1,26 +0,0 @@
|
|||
import { NgModule} from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { RouterModule } from '@angular/router';
|
||||
|
||||
import {FreeGuard} from '../openaireLibrary/login/freeGuard.guard';
|
||||
import {PreviousRouteRecorder} from '../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
|
||||
import {PiwikService} from '../openaireLibrary/utils/piwik/piwik.service';
|
||||
|
||||
import {CommunityCreationInstructionsComponent} from './community-creation-instructions.component';
|
||||
import {CommunityCreationInstructionsRoutingModule} from './community-creation-instructions-routing.module';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, RouterModule, CommunityCreationInstructionsRoutingModule
|
||||
],
|
||||
declarations: [
|
||||
CommunityCreationInstructionsComponent
|
||||
],
|
||||
exports: [
|
||||
CommunityCreationInstructionsComponent
|
||||
],
|
||||
providers:[
|
||||
FreeGuard, PreviousRouteRecorder, PiwikService
|
||||
]
|
||||
})
|
||||
export class CommunityCreationInstructionsModule { }
|
|
@ -1,15 +0,0 @@
|
|||
import { NgModule} from '@angular/core';
|
||||
import { RouterModule } from '@angular/router';
|
||||
import {CuratorsComponent} from "./curators.component";
|
||||
import {IsRouteEnabled} from "../openaireLibrary/error/isRouteEnabled.guard";
|
||||
import {PreviousRouteRecorder} from "../openaireLibrary/utils/piwik/previousRouteRecorder.guard";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forChild([
|
||||
{ path: '', component: CuratorsComponent, canActivate: [IsRouteEnabled], canDeactivate: [PreviousRouteRecorder]}
|
||||
])
|
||||
]
|
||||
})
|
||||
export class CuratorsRoutingModule {
|
||||
}
|
|
@ -1,142 +0,0 @@
|
|||
<schema2jsonld *ngIf="url" [URL]="url" [name]="pageTitle" type="other"></schema2jsonld>
|
||||
|
||||
<ng-container *ngIf="longView else shortView">
|
||||
<div class="image-front-topbar uk-section-default uk-position-relative"
|
||||
uk-scrollspy="{"target":"[uk-scrollspy-class]","cls":"uk-animation-fade","delay":false}"
|
||||
tm-header-transparent="light">
|
||||
<div style=" min-height: 650px;" class="uk-section uk-padding-remove-bottom uk-flex uk-flex-middle">
|
||||
<div class="uk-align-center">
|
||||
<div class="uk-section">
|
||||
<div class="uk-container">
|
||||
<helper *ngIf="pageContents && pageContents['top'] && pageContents['top'].length > 0"
|
||||
[texts]="pageContents['top']"></helper>
|
||||
<div *ngIf="showLoading" class="uk-margin-large">
|
||||
<div class="uk-animation-fade uk-margin-top uk-width-1-1" role="alert"><span
|
||||
class="loading-gif uk-align-center"></span></div>
|
||||
</div>
|
||||
<div *ngIf="!showLoading && curators.length > 0">
|
||||
<h4 class="uk-margin-top uk-h4">
|
||||
<span class="uk-text-bold">Curators</span>
|
||||
<span> ({{curators.length}})</span>
|
||||
</h4>
|
||||
<div *ngFor="let curator of curators let i=index;"
|
||||
class="uk-width-1-1 uk-card uk-card-default uk-card-body uk-margin-top uk-animation-slide-top">
|
||||
<div
|
||||
[class]="(curator.affiliations.length > 0 && curator.affiliations.length <= 2)?'uk-grid-divider uk-flex uk-flex-middle':''"
|
||||
uk-grid>
|
||||
|
||||
<div class="uk-width-1-2 uk-first-column">
|
||||
<div class="uk-flex uk-flex-middle">
|
||||
<div>
|
||||
<img *ngIf="curator.photo && curator.photo !== ''" class="uk-border-circle curator-photo"
|
||||
src="{{downloadUrl + curator.photo}}" alt="Curator Photo">
|
||||
<img *ngIf="!curator.photo || curator.photo == ''" class="uk-border-circle curator-photo"
|
||||
src="../../assets/common-assets/curator-default.png" alt="Curator Photo">
|
||||
</div>
|
||||
<div class="uk-width-expand uk-margin-left uk-text-bold">
|
||||
{{curator.name}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div *ngIf="(curator.affiliations.length > 0 && curator.affiliations.length <= 2)"
|
||||
class="uk-width-1-2">
|
||||
<div class="uk-flex uk-flex-middle">
|
||||
<div class="uk-width-expand uk-margin-left uk-text-meta uk-flex-first">
|
||||
Affiliations
|
||||
</div>
|
||||
<affiliations [longView]="false" [affiliations]="curator.affiliations"
|
||||
[affiliationsInSlider]="curator.affiliations.length"
|
||||
class="uk-width-2-3"></affiliations>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div *ngIf="(curator.affiliations.length > 2)" class="uk-width-1-1 uk-margin-top">
|
||||
<div class="uk-text-meta uk-margin-small-bottom">
|
||||
Affiliations
|
||||
</div>
|
||||
<affiliations [longView]="false" [affiliations]="curator.affiliations"></affiliations>
|
||||
</div>
|
||||
<div class="uk-width-1-1 uk-first-column uk-margin-top uk-height-max-large uk-overflow-auto">
|
||||
<div class="uk-text-meta uk-margin-small-bottom">
|
||||
Biography
|
||||
</div>
|
||||
<div class="uk-margin-top">
|
||||
<p *ngIf="showMore[i]" class="biography"> {{curator.bio}}}</p>
|
||||
<p *ngIf="!showMore[i]" class="biography">{{_format(curator.bio)}}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="uk-width-1-1 uk-margin-top uk-text-right">
|
||||
<a *ngIf="curator.bio.length > maxCharacters && !showMore[i]" class="uk-text-bold"
|
||||
(click)="toggle(i)">
|
||||
Show more
|
||||
</a>
|
||||
<a *ngIf="curator.bio.length > maxCharacters && showMore[i]" class="uk-text-bold"
|
||||
(click)="toggle(i)">
|
||||
Show less
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<helper *ngIf="pageContents && pageContents['bottom'] && pageContents['bottom'].length > 0"
|
||||
[texts]="pageContents['bottom']"></helper>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ng-container>
|
||||
<ng-template #shortView>
|
||||
<span *ngIf=" curators && curators.length > 0" class="lowOpacityColor uk-width-1-1">
|
||||
Curators
|
||||
</span>
|
||||
<div class="uk-grid">
|
||||
<div *ngFor="let curator of curators let i=index;" class="uk-flex uk-flex-middle uk-width-1-2 uk-margin-small-top">
|
||||
<div>
|
||||
<img *ngIf="curator.photo && curator.photo !== ''" class="uk-border-circle curator-photo"
|
||||
src="{{downloadUrl + curator.photo}}" alt="Curator Photo">
|
||||
<img *ngIf="!curator.photo || curator.photo == ''" class="uk-border-circle curator-photo"
|
||||
src="../../assets/common-assets/curator-default.png" alt="Curator Photo">
|
||||
</div>
|
||||
<div class="uk-width-expand uk-margin-left">
|
||||
<a>{{curator.name}}</a>
|
||||
<div class="default-dropdown uk-margin-remove-top uk-padding-medium uk-width-medium"
|
||||
uk-dropdown="pos: bottom-left; mode:click; ">
|
||||
<div class="uk-grid uk-grid-stack">
|
||||
<div class="uk-first-column uk-flex uk-flex-middle uk-grid">
|
||||
<div>
|
||||
<img *ngIf="curator.photo && curator.photo !== ''" class="uk-border-circle curator-photo"
|
||||
src="{{downloadUrl + curator.photo}}" alt="Curator Photo">
|
||||
<img *ngIf="!curator.photo || curator.photo == ''" class="uk-border-circle curator-photo"
|
||||
src="../../assets/common-assets/curator-default.png" alt="Curator Photo">
|
||||
</div>
|
||||
<div class="uk-width-expand uk-h5 ignoreCommunityPanelBackground">
|
||||
{{curator.name}}
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="curator.affiliations.length > 0" class="uk-width-1-1">
|
||||
<hr class="uk-margin-top">
|
||||
<span class="uk-text-left uk-margin">
|
||||
Affiliations
|
||||
</span>
|
||||
<span> ({{curator.affiliations.length}})</span>
|
||||
<div class="uk-width-1-1">
|
||||
<affiliations [affiliations]="curator.affiliations"
|
||||
[affiliationsInSlider]="2"
|
||||
[arrows]="false"
|
||||
[sliderOptions]="'autoplay: true; autoplay-interval: 2000'"></affiliations>
|
||||
</div>
|
||||
</div>
|
||||
<div class="uk-width-1-1">
|
||||
<a routerLink="/curators" class="uk-align-right uk-link ignoreCommunityPanelBackground">
|
||||
View more details
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ng-template>
|
|
@ -1,148 +0,0 @@
|
|||
import {Component, Input} from '@angular/core';
|
||||
import {EnvProperties} from '../openaireLibrary/utils/properties/env-properties';
|
||||
import {CuratorService} from "../openaireLibrary/connect/curators/curator.service";
|
||||
import {Curator} from "../openaireLibrary/utils/entities/CuratorInfo";
|
||||
import {ActivatedRoute, Router} from "@angular/router";
|
||||
import {CommunitiesService} from "../openaireLibrary/connect/communities/communities.service";
|
||||
import {ConnectHelper} from "../openaireLibrary/connect/connectHelper";
|
||||
import {HelperFunctions} from "../openaireLibrary/utils/HelperFunctions.class";
|
||||
import {HelperService} from "../openaireLibrary/utils/helper/helper.service";
|
||||
import {Meta, Title} from "@angular/platform-browser";
|
||||
import {SEOService} from "../openaireLibrary/sharedComponents/SEO/SEO.service";
|
||||
import {PiwikService} from "../openaireLibrary/utils/piwik/piwik.service";
|
||||
import {PiwikHelper} from "../utils/piwikHelper";
|
||||
|
||||
@Component({
|
||||
selector: 'curators',
|
||||
templateUrl: './curators.component.html'
|
||||
|
||||
})
|
||||
|
||||
export class CuratorsComponent {
|
||||
@Input() managers: string[];
|
||||
@Input() communityId = null;
|
||||
@Input() longView = true;
|
||||
public downloadUrl = null;
|
||||
public showLoading = true;
|
||||
|
||||
public curators: Curator[];
|
||||
|
||||
public showMore = [];
|
||||
public maxCharacters = 500;
|
||||
|
||||
public properties: EnvProperties;
|
||||
public pageContents = null;
|
||||
public divContents = null;
|
||||
|
||||
public piwiksub: any;
|
||||
public url: string = null;
|
||||
public pageTitle: string = "Curators";
|
||||
|
||||
constructor (private route: ActivatedRoute,
|
||||
private curatorsService: CuratorService,
|
||||
private communitiesService: CommunitiesService,
|
||||
private _router: Router,
|
||||
private helper: HelperService,
|
||||
private _meta: Meta,
|
||||
private _title: Title,
|
||||
private seoService: SEOService,
|
||||
private _piwikService: PiwikService) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.route.data.subscribe((data: { envSpecific: EnvProperties }) => {
|
||||
this.showLoading = true;
|
||||
this.properties = data.envSpecific;
|
||||
if(this.longView) {
|
||||
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) {
|
||||
this.piwiksub = this._piwikService.trackView(this.properties, this.pageTitle, PiwikHelper.getSiteId(this.communityId, this.properties.environment)).subscribe();
|
||||
}
|
||||
this.url = this.properties.baseLink + this._router.url;
|
||||
this.seoService.createLinkForCanonicalURL(this.url);
|
||||
this.updateUrl(this.url);
|
||||
this.updateTitle(this.pageTitle);
|
||||
this.updateDescription("OpenAIRE - Connect, Community Gateway, research community");
|
||||
}
|
||||
this.downloadUrl = this.properties.utilsService + '/download/';
|
||||
if(!this.longView) {
|
||||
let emails = this.managers.join();
|
||||
this.curatorsService.getCurators(this.properties,
|
||||
this.properties.adminToolsAPIURL + '/curator?emails=' + emails).subscribe(curators => {
|
||||
this.curators = curators;
|
||||
for(let i = 0; i < this.curators.length; i++) {
|
||||
this.showMore[i]= false;
|
||||
}
|
||||
this.showLoading = false;
|
||||
HelperFunctions.scroll();
|
||||
})
|
||||
} else {
|
||||
this.route.queryParams.subscribe(data => {
|
||||
this.communityId = ConnectHelper.getCommunityFromDomain(this.properties.domain);
|
||||
if(!this.communityId) {
|
||||
this.communityId = data['communityId'];
|
||||
}
|
||||
//this.getDivContents();
|
||||
this.getPageContents();
|
||||
this.communitiesService.getCommunities(this.properties,
|
||||
this.properties.communityAPI + this.communityId).subscribe(community => {
|
||||
this.managers = community[0].managers;
|
||||
let emails = this.managers.join();
|
||||
this.curatorsService.getCurators(this.properties,
|
||||
this.properties.adminToolsAPIURL + '/curator?emails=' + emails).subscribe(curators => {
|
||||
this.curators = curators;
|
||||
for(let i = 0; i < this.curators.length; i++) {
|
||||
this.showMore[i]= false;
|
||||
}
|
||||
this.showLoading = false;
|
||||
HelperFunctions.scroll();
|
||||
});
|
||||
})
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
ngOnDestroy() {
|
||||
if(this.piwiksub) {
|
||||
this.piwiksub.unsubscribe();
|
||||
}
|
||||
}
|
||||
|
||||
private getPageContents() {
|
||||
this.helper.getPageHelpContents(this._router.url, this.properties, 'connect').subscribe(contents => {
|
||||
this.pageContents = contents;
|
||||
})
|
||||
}
|
||||
|
||||
private getDivContents() {
|
||||
this.helper.getDivHelpContents(this._router.url, this.properties, 'connect').subscribe(contents => {
|
||||
this.divContents = contents;
|
||||
})
|
||||
}
|
||||
|
||||
public toggle(index: number) {
|
||||
this.showMore[index] = !this.showMore[index];
|
||||
}
|
||||
|
||||
_format(name: string){
|
||||
if(name) {
|
||||
return (((name).length > this.maxCharacters) ? (name.substring(0, (this.maxCharacters - ('...').length)) + '...') : name);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private updateDescription(description: string) {
|
||||
this._meta.updateTag({content: description}, "name='description'");
|
||||
this._meta.updateTag({content: description}, "property='og:description'");
|
||||
}
|
||||
|
||||
private updateTitle(title: string) {
|
||||
var _title = ((title.length > 50) ? title.substring(0, 50) : title);
|
||||
this._title.setTitle(_title);
|
||||
this._meta.updateTag({content: _title}, "property='og:title'");
|
||||
}
|
||||
|
||||
private updateUrl(url: string) {
|
||||
this._meta.updateTag({content: url}, "property='og:url'");
|
||||
}
|
||||
}
|
|
@ -1,30 +0,0 @@
|
|||
import { NgModule} from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import { RouterModule } from '@angular/router';
|
||||
|
||||
import {CuratorsComponent} from './curators.component';
|
||||
import {CuratorService} from "../openaireLibrary/connect/curators/curator.service";
|
||||
import {CuratorsRoutingModule} from "./curators-routing.module";
|
||||
import {AffiliationsModule} from "../affiliations/affiliations.module";
|
||||
import {HelperModule} from "../openaireLibrary/utils/helper/helper.module";
|
||||
import {Schema2jsonldModule} from "../openaireLibrary/sharedComponents/schema2jsonld/schema2jsonld.module";
|
||||
import {SEOServiceModule} from "../openaireLibrary/sharedComponents/SEO/SEOService.module";
|
||||
import {PiwikService} from "../openaireLibrary/utils/piwik/piwik.service";
|
||||
import {PiwikServiceModule} from "../openaireLibrary/utils/piwik/piwikService.module";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule, RouterModule,
|
||||
CuratorsRoutingModule, AffiliationsModule, HelperModule,
|
||||
Schema2jsonldModule, SEOServiceModule, PiwikServiceModule
|
||||
],
|
||||
declarations: [
|
||||
CuratorsComponent
|
||||
],
|
||||
providers: [CuratorService],
|
||||
exports: [
|
||||
CuratorsComponent
|
||||
]
|
||||
})
|
||||
export class CuratorsModule {}
|
|
@ -1 +0,0 @@
|
|||
<helper *ngIf="pageContents && pageContents['top'] && pageContents['top'].length > 0" [texts]="pageContents['top']"></helper>
|
|
@ -1,37 +0,0 @@
|
|||
import {Component, OnInit} from '@angular/core';
|
||||
import {EnvProperties} from "../openaireLibrary/utils/properties/env-properties";
|
||||
import {ActivatedRoute, Router} from "@angular/router";
|
||||
import {HelperService} from "../openaireLibrary/utils/helper/helper.service";
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'theme',
|
||||
templateUrl: 'helper-test.component.html',
|
||||
})
|
||||
|
||||
export class HelperTestComponent implements OnInit{
|
||||
|
||||
public pageContents = null;
|
||||
properties:EnvProperties;
|
||||
|
||||
constructor(private route: ActivatedRoute,
|
||||
private _router: Router,
|
||||
private helper: HelperService) {
|
||||
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.route.data
|
||||
.subscribe((data: { envSpecific: EnvProperties }) => {
|
||||
this.properties = data.envSpecific;
|
||||
this.getPageContents();
|
||||
});
|
||||
}
|
||||
|
||||
private getPageContents() {
|
||||
this.helper.getPageHelpContents(this._router.url, this.properties, 'connect').subscribe(contents => {
|
||||
this.pageContents = contents;
|
||||
})
|
||||
}
|
||||
|
||||
}
|
|
@ -1,27 +0,0 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
|
||||
import {HelperModule} from "../openaireLibrary/utils/helper/helper.module";
|
||||
import {HelperTestComponent} from "./helper-test.component";
|
||||
import {CommonModule} from "@angular/common";
|
||||
import {RouterModule} from "@angular/router";
|
||||
import {IsRouteEnabled} from "../openaireLibrary/error/isRouteEnabled.guard";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
HelperModule,
|
||||
CommonModule,
|
||||
RouterModule.forChild([
|
||||
{path: '', component: HelperTestComponent, canActivate: [IsRouteEnabled]}
|
||||
])
|
||||
],
|
||||
declarations: [
|
||||
HelperTestComponent
|
||||
],
|
||||
providers:[IsRouteEnabled],
|
||||
exports: [
|
||||
HelperTestComponent
|
||||
]
|
||||
})
|
||||
|
||||
|
||||
export class HelperTestModule{}
|
|
@ -8,232 +8,7 @@
|
|||
tm-header-transparent="light" tm-header-transparent-placeholder="">
|
||||
<helper *ngIf="pageContents && pageContents['left'] && pageContents['left'].length > 0"
|
||||
[texts]="pageContents['left']"></helper>
|
||||
<!--<div style="background-image: url('assets/home/banner.jpg') !important;"
|
||||
class="uk-section uk-background-norepeat uk-background-bottom-center uk-background-cover uk-section-overlap uk-position-relative uk-preserve-color">
|
||||
<div class=" uk-section uk-padding-remove-bottom">
|
||||
<div class="uk-position-cover"></div>
|
||||
<div class="uk-position-relative uk-panel">
|
||||
<div class="uk-container uk-container-large uk-section">
|
||||
<div class="uk-grid">
|
||||
<div class="uk-width-1-2@m uk-width-1-1@s">
|
||||
<div class="uk-h1">Build an Open Research <b>Gateway</b> for your <b>Community</b></div>
|
||||
<h4 class="uk-margin-remove-top">Turn Open Science into practice</h4>
|
||||
<div class="uk-h5 uk-margin-top">Share and link your research results.<br>
|
||||
Across organizations, across borders.<br>Customized to your needs.
|
||||
</div>
|
||||
</div>
|
||||
<div class="uk-width-1-1 uk-inline uk-margin-medium-top uk-margin-medium-bottom">
|
||||
<a class="uk-button portal-button" routerLink="/about/learn-how" routerLinkActive="router-link-active">
|
||||
LEARN
|
||||
HOW</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>-->
|
||||
</div>
|
||||
<div>
|
||||
<helper *ngIf="pageContents && pageContents['top'] && pageContents['top'].length > 0"
|
||||
[texts]="pageContents['top']"></helper>
|
||||
<!--<div class="uk-container uk-container-large uk-margin-medium-top">
|
||||
<div class="uk-text-center uk-text-bold uk-h4">Open and FAIR science is our mission</div>
|
||||
<div class="uk-margin-medium-top">
|
||||
<div class="uk-child-width-1-3@m uk-child-width-1-1@s uk-grid-match uk-grid-medium uk-grid-margin"
|
||||
uk-height-match=".target" uk-grid>
|
||||
<div>
|
||||
<div class="uk-card uk-card-default uk-padding-small connectInfoCard">
|
||||
<div class="uk-card-media-top uk-flex uk-flex-middle uk-flex-center">
|
||||
<div class="target">
|
||||
<img src="assets/connect-assets/home/1.png" width="100" height="89">
|
||||
</div>
|
||||
</div>
|
||||
<div class="uk-card-body uk-padding-remove-horizontal uk-padding-remove-bottom">
|
||||
<div class="target">
|
||||
<h5 class="uk-text-bold uk-text-center">A Virtual Research Environment</h5>
|
||||
<div>An overlay platform making it easy to share, link, disseminate and monitor all your publications,
|
||||
data, software, methods. In one place.
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div>
|
||||
<div class="uk-text-uppercase text-center">Features</div>
|
||||
<ul class="uk-list">
|
||||
<li>
|
||||
<span
|
||||
class="uk-border-circle uk-icon-button icon-button-small portal-icon-button uk-margin-small-right"
|
||||
uk-icon="check">
|
||||
</span>
|
||||
Access to OpenAIRE resources
|
||||
</li>
|
||||
<li>
|
||||
<span
|
||||
class="uk-border-circle uk-icon-button icon-button-small portal-icon-button uk-margin-small-right"
|
||||
uk-icon="check">
|
||||
</span>
|
||||
Moderated, front-end linking
|
||||
</li>
|
||||
<li>
|
||||
<span
|
||||
class="uk-border-circle uk-icon-button icon-button-small portal-icon-button uk-margin-small-right"
|
||||
uk-icon="check">
|
||||
</span>
|
||||
Cross-platform search
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="uk-card uk-card-default uk-padding-small connectInfoCard">
|
||||
<div class="uk-card-media-top uk-flex uk-flex-middle uk-flex-center">
|
||||
<div class="target">
|
||||
<img src="assets/connect-assets/home/2.png" width="100" height="108">
|
||||
</div>
|
||||
</div>
|
||||
<div class="uk-card-body uk-padding-remove-horizontal uk-padding-remove-bottom">
|
||||
<div class="target">
|
||||
<h5 class="uk-text-bold uk-text-center">Open Science in action</h5>
|
||||
<div>A time-saving bundle of services for researchers to effortlessly practice open science. An integral
|
||||
part of the European Open Science Cloud.
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<hr>
|
||||
<div>
|
||||
<div class="uk-text-uppercase text-center">Features</div>
|
||||
<ul class="uk-list">
|
||||
<li>
|
||||
<span
|
||||
class="uk-border-circle uk-icon-button icon-button-small portal-icon-button uk-margin-small-right"
|
||||
uk-icon="check">
|
||||
</span>
|
||||
Use of OpenAIRE Guidelines
|
||||
</li>
|
||||
<li>
|
||||
<span
|
||||
class="uk-border-circle uk-icon-button icon-button-small portal-icon-button uk-margin-small-right"
|
||||
uk-icon="check">
|
||||
</span>
|
||||
DOIs via Zenodo
|
||||
</li>
|
||||
<li>
|
||||
<span
|
||||
class="uk-border-circle uk-icon-button icon-button-small portal-icon-button uk-margin-small-right"
|
||||
uk-icon="check">
|
||||
</span>
|
||||
EOSC Single Sign-On
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="uk-card uk-card-default uk-padding-small connectInfoCard">
|
||||
<div class="uk-card-media-top uk-flex uk-flex-middle uk-flex-center">
|
||||
<div class="target">
|
||||
<img src="assets/connect-assets/home/3.png" width="120" height="104">
|
||||
</div>
|
||||
</div>
|
||||
<div class="uk-card-body uk-padding-remove-horizontal uk-padding-remove-bottom">
|
||||
<div class="target">
|
||||
<h5 class="uk-text-bold uk-text-center">Customized to your needs</h5>
|
||||
<div>A Science Gateway with your own brand, rules for aggregation, text & data mining, and
|
||||
presentation. Run by you via a simple, yet powerful backend administration tool.
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div>
|
||||
<div class="uk-text-uppercase text-center">Features</div>
|
||||
<ul class="uk-list">
|
||||
<li>
|
||||
<span
|
||||
class="uk-border-circle uk-icon-button icon-button-small portal-icon-button uk-margin-small-right"
|
||||
uk-icon="check">
|
||||
</span>
|
||||
Access control
|
||||
</li>
|
||||
<li>
|
||||
<span
|
||||
class="uk-border-circle uk-icon-button icon-button-small portal-icon-button uk-margin-small-right"
|
||||
uk-icon="check">
|
||||
</span>
|
||||
Analytics: rich set of indicators
|
||||
</li>
|
||||
<li>
|
||||
<span
|
||||
class="uk-border-circle uk-icon-button icon-button-small portal-icon-button uk-margin-small-right"
|
||||
uk-icon="check">
|
||||
</span>
|
||||
Look & feel to match your brand
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="background-image: url('assets/home/background.png') !important;"
|
||||
class="uk-margin-large-top uk-section uk-background-norepeat uk-background-top-center uk-background-cover uk-section-overlap uk-position-relative uk-preserve-color">
|
||||
<div class="uk-container uk-container-large">
|
||||
<gif-slider [gifs]="gifs" [link]="true" [linkTitle]="'learn more'" [route]="'/about/learn-how'">
|
||||
</gif-slider>
|
||||
</div>
|
||||
</div>-->
|
||||
</div>
|
||||
<div *ngIf="researchCommunities.length === 0" class="uk-container uk-container-large uk-margin-medium-top">
|
||||
<errorMessages [status]="[status]" [type]="'communities'"></errorMessages>
|
||||
</div>
|
||||
<div *ngIf="!loading && researchCommunities.length > 0" class="uk-container uk-container-large uk-margin-medium-top">
|
||||
<div class="uk-text-bold uk-h4">Community Gateways in Action</div>
|
||||
<div [class]="'uk-margin-medium-top' + (researchCommunities.length <= 5 ? ' uk-margin-medium-bottom' : '')">
|
||||
|
||||
<div
|
||||
class="uk-grid-match uk-grid-medium uk-child-width-1-5@m uk-child-width-1-2 uk-text-center"
|
||||
uk-grid uk-height-match=".community">
|
||||
<div *ngFor="let community of researchCommunities.slice(0, 5); let i = index">
|
||||
<div class="uk-padding-small uk-card uk-card-default communityCard">
|
||||
<browse-community [community]=community></browse-community>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="uk-text-right uk-margin-top">
|
||||
<a *ngIf="researchCommunities.length > 5" class="portal-link uk-text-uppercase uk-text-bold uk-text-small"
|
||||
routerLinkActive="router-link-active" routerLink="/search/find/communities">
|
||||
Browse All >
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<helper *ngIf="pageContents && pageContents['bottom'] && pageContents['bottom'].length > 0"
|
||||
[texts]="pageContents['bottom']"></helper>
|
||||
<!--<div style="background-color: #CFDEF1;"
|
||||
class="uk-background-norepeat uk-background-cover uk-section-overlap uk-position-relative uk-preserve-color uk-margin-large-top">
|
||||
<div class="uk-container uk-container-large uk-section">
|
||||
<div class="uk-flex uk-flex-middle uk-padding" uk-grid>
|
||||
<div class="uk-text-center uk-width-1-1@s uk-width-1-3@m">
|
||||
<img width="237" height="250" src="assets/connect-assets/contact/1.png">
|
||||
</div>
|
||||
<div class="uk-width-expand">
|
||||
<div class="uk-text-bold uk-h4">
|
||||
<div>Let us help you develop a collaborative Open Science Gateway for your community. It is fast. It is
|
||||
reliable.
|
||||
</div>
|
||||
</div>
|
||||
<div class="uk-margin-medium">Get in touch with our team to find out how.</div>
|
||||
<div class="uk-inline">
|
||||
<a class="uk-button portal-button" routerLink="/contact-us" routerLinkActive="router-link-active"> CONTACT
|
||||
US</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>-->
|
||||
<div class="uk-section-muted"
|
||||
uk-scrollspy="{"target":"[uk-scrollspy-class]","cls":"uk-animation-fade","delay":false}">
|
||||
<div class="uk-container uk-container-large">
|
||||
|
|
|
@ -23,11 +23,8 @@ export class HomeComponent {
|
|||
public piwiksub: any;
|
||||
|
||||
public pageTitle = "OpenAIRE | Monitor";
|
||||
public researchCommunities = [];
|
||||
public gifs: { "gif": string, "header": string, "text" }[] = [];
|
||||
public pageContents = null;
|
||||
public divContents = null;
|
||||
// Message variables
|
||||
public status: number;
|
||||
public loading: boolean = true;
|
||||
public subscriberErrorMessage: string = "";
|
||||
|
@ -44,8 +41,6 @@ export class HomeComponent {
|
|||
private _meta: Meta,
|
||||
private _title: Title,
|
||||
private _piwikService: PiwikService,
|
||||
private _communitiesService: CommunitiesService,
|
||||
private _subscribeService: SubscribeService,
|
||||
private helper: HelperService,
|
||||
private seoService: SEOService) {
|
||||
|
||||
|
@ -72,8 +67,6 @@ export class HomeComponent {
|
|||
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) {
|
||||
this.piwiksub = this._piwikService.trackView(this.properties, "OpenAIRE Monitor", this.properties.piwikSiteId).subscribe();
|
||||
}
|
||||
this.getCommunities();
|
||||
this.createGifs();
|
||||
//this.getDivContents();
|
||||
this.getPageContents();
|
||||
});
|
||||
|
@ -91,88 +84,6 @@ export class HomeComponent {
|
|||
})
|
||||
}
|
||||
|
||||
public getCommunities() {
|
||||
this.loading = true;
|
||||
this.status = this.errorCodes.LOADING;
|
||||
this.subscriberErrorMessage = "";
|
||||
|
||||
this.researchCommunities = [];
|
||||
|
||||
this._communitiesService.getCommunitiesState().subscribe(
|
||||
communitiesResults => {
|
||||
if(!communitiesResults){
|
||||
return;
|
||||
}
|
||||
if(communitiesResults.length == 0) {
|
||||
this.status = this.errorCodes.DONE;
|
||||
return;
|
||||
}
|
||||
this.sort(communitiesResults);
|
||||
communitiesResults.forEach((community, index) => {
|
||||
let showCommunity: boolean = true;
|
||||
if (community['status'] == "hidden" || community['status'] == "manager") {
|
||||
showCommunity = false;
|
||||
}
|
||||
if (showCommunity) {
|
||||
this.researchCommunities.push(community);
|
||||
}
|
||||
this.status = this.errorCodes.DONE;
|
||||
});
|
||||
this.loading = false;
|
||||
},
|
||||
error => {
|
||||
this.status = this.handleError("Error getting communities", error);
|
||||
this.loading = false;
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
private createGifs() {
|
||||
this.gifs.push({
|
||||
gif: "assets/connect-assets/home/gifs/deposit.gif",
|
||||
header: "Find a repository to deposit your research outcome",
|
||||
text: "This is OpenAIRE’s key service for research communities, both established and emerging ones. Our service helps you reach out and engage all your researchers to practice open science out-of-the-box."
|
||||
});
|
||||
this.gifs.push({
|
||||
gif: "assets/connect-assets/home/gifs/link.gif",
|
||||
header: "Link your research output with your community, funding, and other research products",
|
||||
text: "This is OpenAIRE’s key service for research communities, both established and emerging ones. Our service helps you reach out and engage all your researchers to practice open science out-of-the-box."
|
||||
});
|
||||
this.gifs.push({
|
||||
gif: "assets/connect-assets/home/gifs/overview.gif",
|
||||
header: "View community's overview at a glance",
|
||||
text: "This is OpenAIRE’s key service for research communities, both established and emerging ones. Our service helps you reach out and engage all your researchers to practice open science out-of-the-box."
|
||||
});
|
||||
this.gifs.push({
|
||||
gif: "assets/connect-assets/home/gifs/results.gif",
|
||||
header: "Search & browse your community's research products. ",
|
||||
text: "This is OpenAIRE’s key service for research communities, both established and emerging ones. Our service helps you reach out and engage all your researchers to practice open science out-of-the-box."
|
||||
});
|
||||
this.gifs.push({
|
||||
gif: "assets/connect-assets/home/gifs/graph-analysis.gif",
|
||||
header: "View statistics for your community's research products.",
|
||||
text: "This is OpenAIRE’s key service for research communities, both established and emerging ones. Our service helps you reach out and engage all your researchers to practice open science out-of-the-box."
|
||||
});
|
||||
}
|
||||
|
||||
private sort(results: CommunityInfo[]) {
|
||||
results.sort((left, right): number => {
|
||||
if (!right.date || left.date > right.date) {
|
||||
return -1;
|
||||
} else if (!left.date || left.date < right.date) {
|
||||
return 1;
|
||||
} else {
|
||||
if (left.title > right.title) {
|
||||
return 1;
|
||||
} else if (left.title < right.title) {
|
||||
return -1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
public quote(param: string): string {
|
||||
return StringUtils.quote(param);
|
||||
}
|
||||
|
|
|
@ -1,37 +1,30 @@
|
|||
import {NgModule} from '@angular/core';
|
||||
import {CommonModule} from '@angular/common';
|
||||
import {FormsModule} from '@angular/forms';
|
||||
import {RouterModule} from '@angular/router';
|
||||
import {ManageModule} from '../openaireLibrary/utils/manage/manage.module';
|
||||
import {NgModule} from '@angular/core';
|
||||
import {CommonModule} from '@angular/common';
|
||||
import {FormsModule} from '@angular/forms';
|
||||
import {RouterModule} from '@angular/router';
|
||||
|
||||
import {HomeComponent} from './home.component';
|
||||
import {HomeComponent} from './home.component';
|
||||
|
||||
import {FreeGuard} from '../openaireLibrary/login/freeGuard.guard';
|
||||
import {PreviousRouteRecorder} from '../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
|
||||
import {FreeGuard} from '../openaireLibrary/login/freeGuard.guard';
|
||||
import {PreviousRouteRecorder} from '../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
|
||||
|
||||
import {PiwikService} from '../openaireLibrary/utils/piwik/piwik.service';
|
||||
import {ErrorMessagesModule} from '../openaireLibrary/utils/errorMessages.module';
|
||||
|
||||
import {SearchFormModule} from '../openaireLibrary/searchPages/searchUtils/searchForm.module';
|
||||
import {PiwikService} from '../openaireLibrary/utils/piwik/piwik.service';
|
||||
import {ErrorMessagesModule} from '../openaireLibrary/utils/errorMessages.module';
|
||||
import {HelperModule} from "../openaireLibrary/utils/helper/helper.module";
|
||||
import {GifSliderModule} from "../openaireLibrary/utils/gif-slider/gif-slider.module";
|
||||
import {OtherPortalsModule} from "../openaireLibrary/sharedComponents/other-portals/other-portals.module";
|
||||
import {Schema2jsonldModule} from "../openaireLibrary/sharedComponents/schema2jsonld/schema2jsonld.module";
|
||||
import {SEOServiceModule} from "../openaireLibrary/sharedComponents/SEO/SEOService.module";
|
||||
import {BrowseCommunityModule} from "../communities/browseCommunity/browse-community.module";
|
||||
import {HomeRoutingModule} from "./home-routing.module";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule, RouterModule,
|
||||
ManageModule, ErrorMessagesModule,
|
||||
SearchFormModule, GifSliderModule, OtherPortalsModule,
|
||||
HelperModule, Schema2jsonldModule, SEOServiceModule, HomeRoutingModule, BrowseCommunityModule
|
||||
CommonModule, FormsModule, RouterModule, ErrorMessagesModule, OtherPortalsModule,
|
||||
HelperModule, Schema2jsonldModule, SEOServiceModule, HomeRoutingModule,
|
||||
],
|
||||
declarations: [
|
||||
HomeComponent
|
||||
],
|
||||
providers:[
|
||||
providers: [
|
||||
FreeGuard, PreviousRouteRecorder,
|
||||
PiwikService
|
||||
],
|
||||
|
@ -39,4 +32,5 @@ import {HomeRoutingModule} from "./home-routing.module";
|
|||
HomeComponent
|
||||
]
|
||||
})
|
||||
export class HomeModule { }
|
||||
export class HomeModule {
|
||||
}
|
||||
|
|
|
@ -1,17 +0,0 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule } from '@angular/router';
|
||||
|
||||
import {AboutPageComponent} from './aboutPage.component';
|
||||
import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard';
|
||||
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
|
||||
import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard'
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forChild([
|
||||
{ path: '', component: AboutPageComponent, canActivate: [FreeGuard, IsRouteEnabled], canDeactivate: [PreviousRouteRecorder] }
|
||||
|
||||
])
|
||||
]
|
||||
})
|
||||
export class AboutPageRoutingModule { }
|
|
@ -1,45 +0,0 @@
|
|||
import {Component, Input, Output, EventEmitter, ViewChild, ElementRef} from '@angular/core';
|
||||
import {Observable} from 'rxjs/Observable';
|
||||
import {ActivatedRoute, Router} from '@angular/router';
|
||||
import {Title, Meta} from '@angular/platform-browser';
|
||||
import{EnvProperties} from '../../openaireLibrary/utils/properties/env-properties';
|
||||
|
||||
@Component({
|
||||
selector: 'about',
|
||||
template: `
|
||||
<div class=" uk-section uk-margin-large-top tm-middle uk-container" id="tm-main">
|
||||
<div class="uk-container uk-margin-bottom">
|
||||
<html-page></html-page>
|
||||
</div>
|
||||
</div>
|
||||
`
|
||||
})
|
||||
export class AboutPageComponent {
|
||||
properties:EnvProperties;
|
||||
|
||||
constructor ( private route: ActivatedRoute, private _router: Router,
|
||||
private _meta: Meta, private _title: Title) {}
|
||||
|
||||
public ngOnInit() {
|
||||
this.route.data
|
||||
.subscribe((data: { envSpecific: EnvProperties }) => {
|
||||
this.updateUrl(data.envSpecific.baseLink+this._router.url);
|
||||
this.updateTitle("About");
|
||||
this.updateDescription("About, open access");
|
||||
});
|
||||
}
|
||||
|
||||
private updateDescription(description:string){
|
||||
this._meta.updateTag({content:description},"name='description'");
|
||||
this._meta.updateTag({content:description},"property='og:description'");
|
||||
}
|
||||
private updateTitle(title:string){
|
||||
var _prefix ="OpenAIRE | ";
|
||||
var _title = _prefix + ((title.length> 50 ) ?title.substring(0,50):title);
|
||||
this._title.setTitle(_title);
|
||||
this._meta.updateTag({content:_title},"property='og:title'");
|
||||
}
|
||||
private updateUrl(url:string){
|
||||
this._meta.updateTag({content:url},"property='og:url'");
|
||||
}
|
||||
}
|
|
@ -1,26 +0,0 @@
|
|||
import { NgModule, ModuleWithProviders } from '@angular/core';
|
||||
|
||||
import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard';
|
||||
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
|
||||
import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard'
|
||||
|
||||
import {AboutPageComponent} from './aboutPage.component';
|
||||
import {AboutPageRoutingModule} from './aboutPage-routing.module';
|
||||
|
||||
import {HtmlPagesModule} from '../htmlPages.module';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
AboutPageRoutingModule, HtmlPagesModule
|
||||
],
|
||||
declarations: [
|
||||
AboutPageComponent
|
||||
],
|
||||
providers:[FreeGuard,PreviousRouteRecorder, IsRouteEnabled],
|
||||
exports: [
|
||||
AboutPageComponent
|
||||
]
|
||||
})
|
||||
|
||||
|
||||
export class AboutPageModule{}
|
|
@ -1,62 +0,0 @@
|
|||
import { Component, Input } from '@angular/core';
|
||||
import {ActivatedRoute} from '@angular/router';
|
||||
import 'rxjs/Rx';
|
||||
import {HtmlPageService} from './htmlPage.service';
|
||||
import{EnvProperties} from '../openaireLibrary/utils/properties/env-properties';
|
||||
import {ConnectHelper} from '../openaireLibrary/connect/connectHelper';
|
||||
import {SafeHtmlPipe} from '../openaireLibrary/utils/pipes/safeHTML.pipe';
|
||||
|
||||
@Component({
|
||||
selector: 'html-page',
|
||||
template: `
|
||||
<div [innerHTML]="content | safeHtml"></div>
|
||||
`
|
||||
})
|
||||
export class HtmlPageComponent {
|
||||
public content:string="";
|
||||
sub:any;
|
||||
properties:EnvProperties;
|
||||
private communityId: string = null;
|
||||
constructor (private _service: HtmlPageService, private route: ActivatedRoute,) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.route.data
|
||||
.subscribe((data: { envSpecific: EnvProperties }) => {
|
||||
this.properties = data.envSpecific;
|
||||
this.route.queryParams.subscribe(
|
||||
params => {
|
||||
this.communityId = ConnectHelper.getCommunityFromDomain(this.properties.domain);
|
||||
if(!this.communityId) {
|
||||
this.communityId = params['communityId'];
|
||||
}
|
||||
|
||||
if(!this.communityId){
|
||||
this.communityId = this.properties.adminToolsCommunity;
|
||||
}
|
||||
if(location){
|
||||
this.sub = this._service.getHtmlContent(location.pathname, this.properties, this.communityId).subscribe(
|
||||
data => {
|
||||
if(data.length > 0) {
|
||||
this.content = data[0].content;
|
||||
}
|
||||
},
|
||||
err => {
|
||||
//console.log(err);
|
||||
this.handleError("Error getting html content with route: "+location.pathname+" for community with id: "+this.communityId, err);
|
||||
}
|
||||
);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
ngOnDestroy() {
|
||||
if(this.sub){
|
||||
this.sub.unsubscribe();
|
||||
}
|
||||
}
|
||||
|
||||
private handleError(message: string, error) {
|
||||
console.error("Html Page: "+message, error);
|
||||
}
|
||||
}
|
|
@ -1,25 +0,0 @@
|
|||
import {Injectable, Inject} from '@angular/core';
|
||||
import {HttpClient} from "@angular/common/http";
|
||||
import {Observable} from 'rxjs/Observable';
|
||||
import 'rxjs/add/observable/of';
|
||||
import 'rxjs/add/operator/do';
|
||||
import 'rxjs/add/operator/share';
|
||||
import{EnvProperties} from '../openaireLibrary/utils/properties/env-properties';
|
||||
|
||||
@Injectable()
|
||||
export class HtmlPageService {
|
||||
constructor(private http: HttpClient) {}
|
||||
|
||||
getHtmlContent (router: string, properties:EnvProperties, communityId:string ):any {
|
||||
//console.info("get router html content for : "+router);
|
||||
|
||||
let url = properties.adminToolsAPIURL + '/htmlpagecontent?community='+communityId+'&page='+router;
|
||||
|
||||
return this.http.get<Array<any>>((properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url);
|
||||
//.map(res => <Array<any>> res.json());
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
|
||||
import {HtmlPageComponent} from './htmlPage.component';
|
||||
import {HtmlPageService} from './htmlPage.service';
|
||||
import {SafeHtmlPipeModule} from '../openaireLibrary/utils/pipes/safeHTMLPipe.module';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
SafeHtmlPipeModule
|
||||
],
|
||||
declarations: [
|
||||
HtmlPageComponent
|
||||
],
|
||||
providers:[HtmlPageService],
|
||||
exports: [
|
||||
HtmlPageComponent
|
||||
]
|
||||
})
|
||||
|
||||
|
||||
export class HtmlPagesModule{}
|
|
@ -1,17 +0,0 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule } from '@angular/router';
|
||||
|
||||
import {OrganizationsPageComponent} from './organizationsPage.component';
|
||||
import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard';
|
||||
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
|
||||
import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard'
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forChild([
|
||||
{ path: '', component: OrganizationsPageComponent, canActivate: [FreeGuard, IsRouteEnabled], canDeactivate: [PreviousRouteRecorder] }
|
||||
|
||||
])
|
||||
]
|
||||
})
|
||||
export class OrganizationsPageRoutingModule { }
|
|
@ -1,70 +0,0 @@
|
|||
import {Component} from '@angular/core';
|
||||
import {ActivatedRoute, Router} from '@angular/router';
|
||||
import {Title, Meta} from '@angular/platform-browser';
|
||||
import{EnvProperties} from '../../openaireLibrary/utils/properties/env-properties';
|
||||
import {HelperService} from "../../openaireLibrary/utils/helper/helper.service";
|
||||
import {ConnectHelper} from "../../openaireLibrary/connect/connectHelper";
|
||||
|
||||
@Component({
|
||||
selector: 'organizations',
|
||||
template: `
|
||||
<div class=" uk-section tm-middle uk-container uk-padding-remove-top uk-margin-top" id="tm-main">
|
||||
<div class="uk-container uk-margin-bottom">
|
||||
<div class="uk-article-title custom-article-title uk-margin-bottom"> Organizations related to the community
|
||||
</div>
|
||||
<helper *ngIf="pageContents && pageContents['top'] && pageContents['top'].length > 0"
|
||||
[texts]="pageContents['top']"></helper>
|
||||
<affiliations [longView]="true" [getAffiliationsFromAPI]="true"></affiliations>
|
||||
</div>
|
||||
</div>
|
||||
`
|
||||
})
|
||||
export class OrganizationsPageComponent {
|
||||
properties:EnvProperties;
|
||||
public pageContents = null;
|
||||
public divContents = null;
|
||||
public communityId = null;
|
||||
|
||||
constructor ( private route: ActivatedRoute, private _router: Router,
|
||||
private _meta: Meta, private _title: Title,
|
||||
private helper: HelperService) {}
|
||||
|
||||
public ngOnInit() {
|
||||
this.route.data
|
||||
.subscribe((data: { envSpecific: EnvProperties }) => {
|
||||
this.properties = data.envSpecific;
|
||||
this.communityId = ConnectHelper.getCommunityFromDomain(this.properties.domain);
|
||||
this.updateUrl(data.envSpecific.baseLink+this._router.url);
|
||||
this.updateTitle("Organizations");
|
||||
this.updateDescription("Organizations, open access");
|
||||
//this.getDivContents();
|
||||
this.getPageContents();
|
||||
});
|
||||
}
|
||||
|
||||
private updateDescription(description:string){
|
||||
this._meta.updateTag({content:description},"name='description'");
|
||||
this._meta.updateTag({content:description},"property='og:description'");
|
||||
}
|
||||
private updateTitle(title:string){
|
||||
var _prefix ="OpenAIRE | ";
|
||||
var _title = _prefix + ((title.length> 50 ) ?title.substring(0,50):title);
|
||||
this._title.setTitle(_title);
|
||||
this._meta.updateTag({content:_title},"property='og:title'");
|
||||
}
|
||||
private updateUrl(url:string){
|
||||
this._meta.updateTag({content:url},"property='og:url'");
|
||||
}
|
||||
|
||||
private getPageContents() {
|
||||
this.helper.getPageHelpContents(this._router.url, this.properties, this.communityId).subscribe(contents => {
|
||||
this.pageContents = contents;
|
||||
})
|
||||
}
|
||||
|
||||
private getDivContents() {
|
||||
this.helper.getDivHelpContents(this._router.url, this.properties, this.communityId).subscribe(contents => {
|
||||
this.divContents = contents;
|
||||
})
|
||||
}
|
||||
}
|
|
@ -1,28 +0,0 @@
|
|||
import { NgModule, ModuleWithProviders } from '@angular/core';
|
||||
|
||||
import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard';
|
||||
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
|
||||
import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard'
|
||||
|
||||
import {OrganizationsPageComponent} from './organizationsPage.component';
|
||||
import {OrganizationsPageRoutingModule} from './organizationsPage-routing.module';
|
||||
|
||||
import {AffiliationsModule} from "../../affiliations/affiliations.module";
|
||||
import {HelperModule} from "../../openaireLibrary/utils/helper/helper.module";
|
||||
import {CommonModule} from "@angular/common";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
OrganizationsPageRoutingModule, AffiliationsModule, HelperModule, CommonModule
|
||||
],
|
||||
declarations: [
|
||||
OrganizationsPageComponent
|
||||
],
|
||||
providers:[FreeGuard,PreviousRouteRecorder, IsRouteEnabled],
|
||||
exports: [
|
||||
OrganizationsPageComponent
|
||||
]
|
||||
})
|
||||
|
||||
|
||||
export class OrganizationsPageModule{}
|
|
@ -96,18 +96,4 @@ export class MonitorComponent {
|
|||
this.piwiksub.unsubscribe();
|
||||
}
|
||||
}
|
||||
|
||||
private handleError(message: string, error): number {
|
||||
var code = "";
|
||||
if (!error.status) {
|
||||
var error = error.json();
|
||||
code = error.code;
|
||||
} else {
|
||||
code = error.status;
|
||||
}
|
||||
|
||||
console.error("Monitor (component): " + message, error);
|
||||
|
||||
return this.errorMessages.getErrorCode(code);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,17 +0,0 @@
|
|||
import {NgModule} from '@angular/core';
|
||||
import {RouterModule} from '@angular/router';
|
||||
import {PreviousRouteRecorder} from '../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
|
||||
import {MyCommunitiesComponent} from "./my-communities.component";
|
||||
import {LoginGuard} from "../openaireLibrary/login/loginGuard.guard";
|
||||
import {IsRouteEnabled} from "../openaireLibrary/error/isRouteEnabled.guard";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forChild([
|
||||
{path: '', component: MyCommunitiesComponent, canActivate: [LoginGuard, IsRouteEnabled], canDeactivate: [PreviousRouteRecorder]}
|
||||
|
||||
])
|
||||
]
|
||||
})
|
||||
export class MyCommunitiesRoutingModule {
|
||||
}
|
|
@ -1,114 +0,0 @@
|
|||
<schema2jsonld [URL]="properties.baseLink"
|
||||
[logoURL]="properties.baseLink+'/assets/common-assets/logo-small-connect.png'" type="home"
|
||||
name="OpenAIRE Connect">
|
||||
</schema2jsonld>
|
||||
<div
|
||||
class="banner-background image-front-topbar uk-section uk-background-norepeat uk-background-bottom-center uk-background-cover uk-section-secondary uk-section-overlap uk-position-relative uk-preserve-color"
|
||||
uk-scrollspy="{"target":"[uk-scrollspy-class]","cls":"uk-animation-fade","delay":false}"
|
||||
tm-header-transparent="light" tm-header-transparent-placeholder="">
|
||||
<div class=" uk-section uk-padding-remove-bottom">
|
||||
<div class="uk-position-cover"></div>
|
||||
<div class="uk-position-relative uk-panel">
|
||||
<div *ngIf="loading" class="uk-container uk-container-large uk-height-large">
|
||||
<div class="uk-animation-fade uk-margin-top uk-width-1-1" role="alert"><span
|
||||
class="loading-gif uk-align-center"></span></div>
|
||||
</div>
|
||||
<div *ngIf="!loading" class="uk-container uk-container-large">
|
||||
<div class="uk-text-center uk-text-bold uk-h2 uk-margin-bottom">My Communities</div>
|
||||
<div *ngIf="managerOfCommunities.length > 0 || subscriberOfCommunities.length > 0"
|
||||
class="uk-child-width-1-1@s uk-child-width-1-2@m uk-flex uk-flex-middle" uk-grid uk-height-match="target: .community; row: false">
|
||||
<div>
|
||||
<div *ngIf="managerOfCommunities.length > 0" class="uk-grid">
|
||||
<h5 class="uk-width-1-1 uk-text-bold">You are managing</h5>
|
||||
<div class="uk-width-1-1 uk-margin-small-top">
|
||||
<div
|
||||
class="uk-grid-match uk-grid-small uk-child-width-1-3@s uk-child-width-1-2 uk-text-center"
|
||||
uk-grid >
|
||||
<div *ngFor="let community of managerOfCommunities.slice(0,3); let i = index">
|
||||
<div class="uk-padding-small uk-card uk-card-default uk-card-small communityCard"
|
||||
title="{{community.description}}">
|
||||
<browse-community [community]=community [showDescription]=false></browse-community>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="managerOfCommunities.length > 3" class="uk-text-right uk-width-1-1 uk-margin-top">
|
||||
<a [queryParams]="{role: quote('manager')}" class="portal-link uk-text-uppercase uk-text-bold uk-text-small"
|
||||
routerLinkActive="router-link-active" routerLink="/search/find/communities">
|
||||
<div>View all ({{managerOfCommunities.length | number}}) ></div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="uk-container uk-container-large uk-width-4-5">
|
||||
<div *ngIf="subscriberErrorMessage" class="uk-animation-fade uk-alert uk-alert-warning" role="alert">
|
||||
{{subscriberErrorMessage}}
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="subscriberOfCommunities.length > 0" class="uk-grid">
|
||||
<h5 class="uk-width-1-1 uk-text-bold">You are subscribed to</h5>
|
||||
<div class="uk-width-1-1 uk-margin-small-top">
|
||||
<div
|
||||
class="uk-grid-match uk-grid-small uk-child-width-1-3@s uk-child-width-1-2 uk-text-center"
|
||||
uk-grid>
|
||||
<div *ngFor="let community of subscriberOfCommunities.slice(0,3); let i = index">
|
||||
<div class="uk-padding-small uk-card uk-card-small uk-card-default communityCard"
|
||||
[attr.uk-tooltip]="((community.description) ? ('title: '+ community.description + '; pos: bottom-right') : 'cls: uk-invisible')">
|
||||
<browse-community [community]=community [showDescription]=false></browse-community>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="subscriberOfCommunities.length > 3" class="uk-text-right uk-width-1-1 uk-margin-top">
|
||||
<a [queryParams]="{status: quote('subscribed')}" class="portal-link uk-text-uppercase uk-text-bold uk-text-small"
|
||||
routerLinkActive="router-link-active" routerLink="/search/find/communities">
|
||||
<div>View all ({{subscriberOfCommunities.length | number}}) ></div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="uk-text-center">
|
||||
<img width="200" height="185" src="../../assets/connect-assets/banner/login.png">
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="managerOfCommunities.length === 0 && subscriberOfCommunities.length === 0"
|
||||
class="uk-child-width-1-1" uk-grid>
|
||||
<div class="uk-flex uk-flex-center uk-margin-bottom">
|
||||
<div class="uk-card uk-card-default uk-box-shadow-medium uk-width-1-2@m">
|
||||
<div class="uk-card-body uk-text-bold uk-text-center ">
|
||||
You are not yet subscribed in any Communities.<br>
|
||||
Start by browsing and subscribing in those that you are interested in.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<errorMessages [status]="[status]" [type]="'communities'"></errorMessages>
|
||||
</div>
|
||||
<div *ngIf="!loading && researchCommunities.length > 0">
|
||||
<div class="uk-text-bold uk-h5">Community Gateways in Action</div>
|
||||
<div [class]="(researchCommunities.length <= 5 ? ' uk-margin-medium-bottom' : '')">
|
||||
<div
|
||||
class="uk-grid-match uk-grid-medium uk-child-width-1-5@m uk-child-width-1-2 uk-text-center"
|
||||
uk-grid uk-height-match=".community">
|
||||
<div *ngFor="let community of researchCommunities.slice(0, 5); let i = index">
|
||||
<div class="uk-padding-small uk-card uk-card-default communityCard">
|
||||
<browse-community [community]=community></browse-community>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="uk-text-right uk-margin-top">
|
||||
<a *ngIf="researchCommunities.length > 5" class="portal-link uk-text-uppercase uk-text-bold uk-text-small"
|
||||
routerLinkActive="router-link-active" routerLink="/search/find/communities">
|
||||
Browse All >
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -1,232 +0,0 @@
|
|||
import {Component} from '@angular/core';
|
||||
import {ActivatedRoute, Router} from '@angular/router';
|
||||
import {Meta, Title} from '@angular/platform-browser';
|
||||
import {EnvProperties} from '../openaireLibrary/utils/properties/env-properties';
|
||||
import {CommunitiesService} from '../openaireLibrary/connect/communities/communities.service';
|
||||
import {SubscribeService} from '../openaireLibrary/utils/subscribe/subscribe.service';
|
||||
import {CommunityInfo} from '../openaireLibrary/connect/community/communityInfo';
|
||||
|
||||
import {PiwikService} from '../openaireLibrary/utils/piwik/piwik.service';
|
||||
import {Session, User} from '../openaireLibrary/login/utils/helper.class';
|
||||
import {StringUtils} from '../openaireLibrary/utils/string-utils.class';
|
||||
|
||||
import {ErrorCodes} from '../openaireLibrary/utils/properties/errorCodes';
|
||||
import {ErrorMessagesComponent} from '../openaireLibrary/utils/errorMessages.component';
|
||||
import {HelperService} from "../openaireLibrary/utils/helper/helper.service";
|
||||
import {SEOService} from "../openaireLibrary/sharedComponents/SEO/SEO.service";
|
||||
import {UserManagementService} from "../openaireLibrary/services/user-management.service";
|
||||
|
||||
@Component({
|
||||
selector: 'my-communities',
|
||||
templateUrl: 'my-communities.component.html',
|
||||
})
|
||||
|
||||
export class MyCommunitiesComponent {
|
||||
public piwiksub: any;
|
||||
|
||||
public pageTitle = "OpenAIRE"
|
||||
public subscriberOfCommunities = [];
|
||||
public managerOfCommunities = [];
|
||||
public researchCommunities = [];
|
||||
public pageContents = null;
|
||||
public divContents = null;
|
||||
// Message variables
|
||||
public status: number;
|
||||
public loading: boolean = true;
|
||||
public subscriberErrorMessage: string = "";
|
||||
public errorCodes: ErrorCodes;
|
||||
private errorMessages: ErrorMessagesComponent;
|
||||
|
||||
properties: EnvProperties;
|
||||
private user: User;
|
||||
|
||||
constructor(
|
||||
private route: ActivatedRoute,
|
||||
private _router: Router,
|
||||
private _meta: Meta,
|
||||
private _title: Title,
|
||||
private _piwikService: PiwikService,
|
||||
private _communitiesService: CommunitiesService,
|
||||
private _subscribeService: SubscribeService,
|
||||
private helper: HelperService,
|
||||
private seoService: SEOService,
|
||||
private userManagementService: UserManagementService) {
|
||||
|
||||
var description = "OpenAIRE - Connect, Community Dashboard, research community " +
|
||||
"| My managing and subscribed to Communities";
|
||||
var title = "OpenAIRE - Connect | My Communities";
|
||||
|
||||
this._meta.updateTag({content: description}, "name='description'");
|
||||
this._meta.updateTag({content: description}, "property='og:description'");
|
||||
this._meta.updateTag({content: title}, "property='og:title'");
|
||||
this._title.setTitle(title);
|
||||
|
||||
this.errorCodes = new ErrorCodes();
|
||||
this.errorMessages = new ErrorMessagesComponent();
|
||||
this.status = this.errorCodes.LOADING;
|
||||
}
|
||||
|
||||
public ngOnInit() {
|
||||
this.route.data
|
||||
.subscribe((data: { envSpecific: EnvProperties }) => {
|
||||
this.properties = data.envSpecific;
|
||||
var url = data.envSpecific.baseLink + this._router.url;
|
||||
this.seoService.createLinkForCanonicalURL(url, false);
|
||||
this._meta.updateTag({content: url}, "property='og:url'");
|
||||
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) {
|
||||
this.piwiksub = this._piwikService.trackView(this.properties, "OpenAIRE Connect", this.properties.piwikSiteId).subscribe();
|
||||
}
|
||||
this.userManagementService.getUserInfo(this.properties.userInfoUrl).subscribe(user => {
|
||||
this.user = user;
|
||||
this.getCommunities();
|
||||
//this.getDivContents();
|
||||
//this.getPageContents();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
private getPageContents() {
|
||||
this.helper.getPageHelpContents(this._router.url, this.properties, 'connect').subscribe(contents => {
|
||||
this.pageContents = contents;
|
||||
})
|
||||
}
|
||||
|
||||
private getDivContents() {
|
||||
this.helper.getDivHelpContents(this._router.url, this.properties, 'connect').subscribe(contents => {
|
||||
this.divContents = contents;
|
||||
})
|
||||
}
|
||||
|
||||
public getCommunities() {
|
||||
this.loading = true;
|
||||
this.status = this.errorCodes.LOADING;
|
||||
this.subscriberErrorMessage = "";
|
||||
|
||||
this.subscriberOfCommunities = [];
|
||||
this.managerOfCommunities = [];
|
||||
this.researchCommunities = [];
|
||||
|
||||
this._communitiesService.getCommunitiesState().subscribe(
|
||||
communitiesResults => {
|
||||
if(!communitiesResults){
|
||||
return;
|
||||
}
|
||||
if(communitiesResults.length == 0) {
|
||||
this.status = this.errorCodes.DONE;
|
||||
return;
|
||||
};
|
||||
this.sort(communitiesResults);
|
||||
|
||||
var subscribedLoading = communitiesResults.length;
|
||||
var mail = this.user.email;
|
||||
communitiesResults.forEach((community, index) => {
|
||||
let showCommunity: boolean = true;
|
||||
let isManager: boolean = false;
|
||||
let isSubscriber: boolean = false;
|
||||
|
||||
if (community['status'] == "hidden") {
|
||||
showCommunity = false;
|
||||
} else {
|
||||
if (mail == null && community['status'] == "manager") { // no user
|
||||
showCommunity = false;
|
||||
} else if (Session.isCommunityCurator(this.user) || Session.isPortalAdministrator(this.user)) {
|
||||
isManager = true;
|
||||
} else if (community.managers.indexOf(mail) != -1) {
|
||||
isManager = true;
|
||||
} else if (community['status'] == "manager") {
|
||||
showCommunity = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (showCommunity) {
|
||||
this.researchCommunities.push(community);
|
||||
if (isManager) {
|
||||
community.isManager = true;
|
||||
this.managerOfCommunities.push(community);
|
||||
}
|
||||
}
|
||||
|
||||
this.status = this.errorCodes.DONE;
|
||||
|
||||
if (mail != null && showCommunity) {
|
||||
this._subscribeService.isSubscribedToCommunity(this.properties, community.communityId, mail).subscribe(
|
||||
res => {
|
||||
isSubscriber = res;
|
||||
if (isSubscriber) {
|
||||
community.isSubscribed = true;
|
||||
if (isManager) {
|
||||
this.subscriberOfCommunities.push(community);
|
||||
} else {
|
||||
this.subscriberOfCommunities.unshift(community);
|
||||
}
|
||||
}
|
||||
|
||||
subscribedLoading--;
|
||||
if (subscribedLoading == 0) {
|
||||
this.loading = false;
|
||||
}
|
||||
},
|
||||
error => {
|
||||
this.handleError("Error getting response if email: " + mail + " is subscribed to community with id: " + community.communityId, error);
|
||||
subscribedLoading--;
|
||||
if (subscribedLoading == 0) {
|
||||
this.loading = false;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
subscribedLoading--;
|
||||
if (subscribedLoading == 0) {
|
||||
this.loading = false;
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
error => {
|
||||
this.status = this.handleError("Error getting communities", error);
|
||||
this.loading = false;
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
private sort(results: CommunityInfo[]) {
|
||||
results.sort((left, right): number => {
|
||||
if (!right.date || left.date > right.date) {
|
||||
return -1;
|
||||
} else if (!left.date || left.date < right.date) {
|
||||
return 1;
|
||||
} else {
|
||||
if (left.title > right.title) {
|
||||
return 1;
|
||||
} else if (left.title < right.title) {
|
||||
return -1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
public quote(param: string): string {
|
||||
return StringUtils.quote(param);
|
||||
}
|
||||
|
||||
public ngOnDestroy() {
|
||||
if (this.piwiksub) {
|
||||
this.piwiksub.unsubscribe();
|
||||
}
|
||||
}
|
||||
|
||||
private handleError(message: string, error): number {
|
||||
var code = "";
|
||||
if (!error.status) {
|
||||
var error = error.json();
|
||||
code = error.code;
|
||||
} else {
|
||||
code = error.status;
|
||||
}
|
||||
|
||||
console.error("Communities (component): " + message, error);
|
||||
|
||||
return this.errorMessages.getErrorCode(code);
|
||||
}
|
||||
}
|
|
@ -1,38 +0,0 @@
|
|||
import {NgModule} from '@angular/core';
|
||||
import {CommonModule} from '@angular/common';
|
||||
import {FormsModule} from '@angular/forms';
|
||||
import {RouterModule} from '@angular/router';
|
||||
import {ManageModule} from '../openaireLibrary/utils/manage/manage.module';
|
||||
|
||||
import {MyCommunitiesComponent} from './my-communities.component';
|
||||
import {PreviousRouteRecorder} from '../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
|
||||
|
||||
import {PiwikService} from '../openaireLibrary/utils/piwik/piwik.service';
|
||||
import {ErrorMessagesModule} from '../openaireLibrary/utils/errorMessages.module';
|
||||
import {Schema2jsonldModule} from "../openaireLibrary/sharedComponents/schema2jsonld/schema2jsonld.module";
|
||||
import {SEOServiceModule} from "../openaireLibrary/sharedComponents/SEO/SEOService.module";
|
||||
import {LoginGuard} from "../openaireLibrary/login/loginGuard.guard";
|
||||
import {HelperModule} from "../openaireLibrary/utils/helper/helper.module";
|
||||
import {BrowseCommunityModule} from "../communities/browseCommunity/browse-community.module";
|
||||
import {MyCommunitiesRoutingModule} from "./my-communities-routing.module";
|
||||
import {IsRouteEnabled} from "../openaireLibrary/error/isRouteEnabled.guard";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule, RouterModule, HelperModule,
|
||||
ManageModule, ErrorMessagesModule, BrowseCommunityModule, Schema2jsonldModule, SEOServiceModule,
|
||||
MyCommunitiesRoutingModule
|
||||
],
|
||||
declarations: [
|
||||
MyCommunitiesComponent
|
||||
],
|
||||
providers: [
|
||||
LoginGuard, PreviousRouteRecorder,
|
||||
PiwikService, IsRouteEnabled
|
||||
],
|
||||
exports: [
|
||||
MyCommunitiesComponent
|
||||
]
|
||||
})
|
||||
export class MyCommunitiesModule {
|
||||
}
|
|
@ -1,89 +0,0 @@
|
|||
import {Component, Input} from '@angular/core';
|
||||
import {CommunityInfo} from '../../openaireLibrary/connect/community/communityInfo';
|
||||
import {EnvProperties} from "../../openaireLibrary/utils/properties/env-properties";
|
||||
import {SearchResult} from "../../openaireLibrary/utils/entities/searchResult";
|
||||
|
||||
@Component({
|
||||
selector: 'results-comp',
|
||||
template: `
|
||||
<div class="uk-h5 uk-text-bold uk-margin-top uk-margin-remove-bottom">Recent research results</div>
|
||||
<div *ngIf="!results && total != 0">
|
||||
<div *ngIf="showLoading" class="uk-animation-fade uk-width-1-1" role="alert"><span class="loading-gif uk-align-center"></span></div>
|
||||
</div>
|
||||
<div *ngIf="results != null && results.length > 0">
|
||||
<div class="uk-text-right">
|
||||
<div>
|
||||
<a class="el-content uk-button uk-button-text" [queryParams]=params routerLinkActive="router-link-active" [routerLink]="'/search/find/'+getresultTypeLink(resultType, true)">
|
||||
View all
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="results != null && results.length > 0 && !showLoading">
|
||||
<!--<div class="uk-margin-remove-vertical uk-grid-match uk-child-width-1-1 uk-child-width-1-1@m uk-child-width-1-1@l uk-child-width-1-1@xl uk-grid-small uk-grid uk-grid-stack" uk-grid="">
|
||||
<li *ngFor="let item of results; let i = index">
|
||||
<div class="uk-first-column">
|
||||
<div class="el-item uk-panel">
|
||||
<h6 class="el-title uk-margin uk-h6 uk-text-primary uk-margin-remove-adjacent uk-margin-remove-bottom">
|
||||
<div *ngIf=" community != null && community.communityId != null">
|
||||
<a [queryParams]="getParamId(resultType,item.id)" routerLinkActive="router-link-active" [routerLink]="'/search/'+getresultTypeLink(resultType, false)" >
|
||||
{{item.title}} </a>
|
||||
</div>
|
||||
|
||||
</h6>
|
||||
<div *ngIf="item.accessRights" class="el-content"><span class=" uk-label label-{{item.accessRights}}">{{item.accessRights}}</span><br></div>
|
||||
<div>
|
||||
<span *ngIf="item.authors != null">
|
||||
<span class="el-meta uk-margin uk-text-meta" *ngFor='let author of item.authors; let i = index'>
|
||||
<span *ngIf="i < 10">
|
||||
<span>{{author}}<span *ngIf="i < (item.authors.length-1)">;</span></span>
|
||||
</span>
|
||||
<span *ngIf="i == 10">...</span>
|
||||
</span>
|
||||
</span>
|
||||
<span *ngIf="item.year !=''" class="el-meta uk-text-meta"> ({{item.year}}) </span>
|
||||
</div>
|
||||
<div class="text-justify descriptionText"> {{item.description}} </div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</div>-->
|
||||
<search-result [results]="results"
|
||||
[type]="resultType" [properties] = properties class="communityRecentResults">
|
||||
</search-result>
|
||||
</div>
|
||||
|
||||
<div *ngIf="results != null && results.length == 0 || total == 0" class=" uk-alert uk-alert-primary"> No results available </div>
|
||||
|
||||
`
|
||||
|
||||
})
|
||||
|
||||
export class ResultsComponent {
|
||||
|
||||
@Input() public results : SearchResult[];
|
||||
@Input() public resultType: string;
|
||||
@Input() public params: any;
|
||||
@Input() public community: CommunityInfo;
|
||||
@Input() public total: any;
|
||||
@Input() showLoading: boolean = true;
|
||||
@Input() properties: EnvProperties;
|
||||
|
||||
getresultTypeLink(type:string, plural:boolean){
|
||||
if((type == "publication" || type == "dataset") && plural){
|
||||
return type + "s";
|
||||
}
|
||||
return type;
|
||||
}
|
||||
/* getParamId(type:string){
|
||||
let param ="";
|
||||
if(type == "publication"){
|
||||
param="article";
|
||||
}else if(type == "other"){
|
||||
param="other";
|
||||
}else{
|
||||
param=type;
|
||||
}
|
||||
return param+"Id";
|
||||
}*/
|
||||
}
|
|
@ -1,14 +0,0 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule } from '@angular/router';
|
||||
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
|
||||
import {SearchCommunitiesComponent} from "./searchCommunities.component";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forChild([
|
||||
{ path: '', component: SearchCommunitiesComponent, canDeactivate: [PreviousRouteRecorder] }
|
||||
|
||||
])
|
||||
]
|
||||
})
|
||||
export class SearchCommunitiesRoutingModule { }
|
|
@ -1,484 +0,0 @@
|
|||
import {Component, ViewChild} from "@angular/core";
|
||||
import {SearchUtilsClass} from "../../openaireLibrary/searchPages/searchUtils/searchUtils.class";
|
||||
import {ErrorMessagesComponent} from "../../openaireLibrary/utils/errorMessages.component";
|
||||
import {ErrorCodes} from "../../openaireLibrary/utils/properties/errorCodes";
|
||||
import {EnvProperties} from "../../openaireLibrary/utils/properties/env-properties";
|
||||
import {SearchPageComponent} from "../../openaireLibrary/searchPages/searchUtils/searchPage.component";
|
||||
import {ActivatedRoute} from "@angular/router";
|
||||
import {Filter, Value} from "../../openaireLibrary/searchPages/searchUtils/searchHelperClasses.class";
|
||||
import {SearchFields} from "../../openaireLibrary/utils/properties/searchFields";
|
||||
import {CommunitiesService} from "../../openaireLibrary/connect/communities/communities.service";
|
||||
import {Session, User} from "../../openaireLibrary/login/utils/helper.class";
|
||||
import {CommunityInfo} from "../../openaireLibrary/connect/community/communityInfo";
|
||||
import {SubscribeService} from "../../openaireLibrary/utils/subscribe/subscribe.service";
|
||||
import {StringUtils} from "../../openaireLibrary/utils/string-utils.class";
|
||||
import {HelperFunctions} from "../../openaireLibrary/utils/HelperFunctions.class";
|
||||
import {UserManagementService} from "../../openaireLibrary/services/user-management.service";
|
||||
import {url} from "inspector";
|
||||
|
||||
@Component({
|
||||
selector: 'search-communities',
|
||||
template: `
|
||||
<search-page pageTitle="OpenAIRE-Connect | Search Communities"
|
||||
[hasPrefix]=false [piwikSiteId]="piwikSiteId"
|
||||
searchFormClass="communitiesSearchForm"
|
||||
[formPlaceholderText]="'Search for Research Communities' + ((showType)?' and Initiatives':'')"
|
||||
type="communities" entityType="community" [filters]="filters"
|
||||
[results]="results" [searchUtils]="searchUtils"
|
||||
[showResultCount]=true [baseUrl]="baseUrl"
|
||||
[disableForms]="disableForms"
|
||||
[lastIndex]=false [sort]=true
|
||||
[showType]="showType">
|
||||
</search-page>
|
||||
`
|
||||
})
|
||||
export class SearchCommunitiesComponent {
|
||||
public piwikSiteId = null;
|
||||
private errorCodes: ErrorCodes;
|
||||
private errorMessages: ErrorMessagesComponent;
|
||||
public results: CommunityInfo[] = [];
|
||||
public totalResults: CommunityInfo[] = [];
|
||||
public sub: any; public subResults: any;
|
||||
public filters = [];
|
||||
public searchFields:SearchFields = new SearchFields();
|
||||
public searchUtils:SearchUtilsClass = new SearchUtilsClass();
|
||||
public disableForms: boolean = false;
|
||||
public baseUrl: string = null;
|
||||
public refineFields: string[] = this.searchFields.COMMUNITIES_SEARCH_FIELDS;
|
||||
public showType = false;
|
||||
properties:EnvProperties;
|
||||
@ViewChild (SearchPageComponent) searchPage : SearchPageComponent ;
|
||||
private user: User;
|
||||
|
||||
constructor (private route: ActivatedRoute,
|
||||
private _communitiesService: CommunitiesService,
|
||||
private _subscribeService: SubscribeService,
|
||||
private userManagementService: UserManagementService) {
|
||||
this.errorCodes = new ErrorCodes();
|
||||
this.errorMessages = new ErrorMessagesComponent();
|
||||
this.searchUtils.status = this.errorCodes.LOADING;
|
||||
}
|
||||
|
||||
public ngOnInit() {
|
||||
this.route.data
|
||||
.subscribe((data: { envSpecific: EnvProperties }) => {
|
||||
this.properties = data.envSpecific;
|
||||
this.piwikSiteId = this.properties.piwikSiteId;
|
||||
this.baseUrl = data.envSpecific.searchLinkToCommunities;
|
||||
});
|
||||
this.sub = this.route.queryParams.subscribe(params => {
|
||||
this.searchPage.resultsPerPage = 10;
|
||||
this.searchUtils.keyword = (params['keyword']?params['keyword']:'');
|
||||
this.searchUtils.page = (params['page'] === undefined) ? 1: + params['page'];
|
||||
this.searchUtils.sortBy = (params['sortBy'] === undefined)? '' : params['sortBy'];
|
||||
this.searchUtils.size = (params['size'] === undefined) ? this.searchPage.resultsPerPage: +params['size'];
|
||||
this.searchPage.searchUtils = this.searchUtils;
|
||||
if(this.searchUtils.size != 5 && this.searchUtils.size != 10 && this.searchUtils.size != 20 && this.searchUtils.size != 50) {
|
||||
this.searchUtils.size = this.searchPage.resultsPerPage;
|
||||
}
|
||||
if(this.searchUtils.sortBy && this.searchUtils.sortBy != "creationdate,descending" && this.searchUtils.sortBy != "creationdate,ascending") {
|
||||
this.searchUtils.sortBy = "";
|
||||
}
|
||||
this.searchPage.refineFields = this.refineFields;
|
||||
let queryParams = this.searchPage.getQueryParamsFromUrl(params);
|
||||
this.userManagementService.getUserInfo(this.properties.userInfoUrl).subscribe(user => {
|
||||
this.user = user;
|
||||
this.initCommunities(queryParams);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
public ngOnDestroy() {
|
||||
if(this.sub){
|
||||
this.sub.unsubscribe();
|
||||
}
|
||||
if(this.subResults){
|
||||
this.subResults.unsubscribe();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize communities from Communities APIs
|
||||
*
|
||||
* @param params
|
||||
*/
|
||||
private initCommunities(params: Map<string, string>) {
|
||||
this.subResults = this._communitiesService.getCommunitiesState().subscribe(
|
||||
data => {
|
||||
if(!data){
|
||||
return;
|
||||
}
|
||||
for(let i = 0; i < data.length; i++) {
|
||||
this.totalResults[i] = data[i];
|
||||
this.totalResults[i].isManager = false;
|
||||
this.totalResults[i].isSubscribed = false;
|
||||
if(this.user) {
|
||||
this.totalResults[i].isManager = this.isCommunityManager(this.totalResults[i]);
|
||||
}
|
||||
}
|
||||
if(this.user) {
|
||||
this._subscribeService.getCommunitiesSubscribedTo(this.properties, this.user.email).subscribe(
|
||||
res => {
|
||||
for (let i = 0; i < this.totalResults.length; i++) {
|
||||
this.totalResults[i].isSubscribed = (res.indexOf(this.totalResults[i].communityId) != -1);
|
||||
}
|
||||
this._getResults(params);
|
||||
}
|
||||
);
|
||||
}
|
||||
else {
|
||||
this._getResults(params);
|
||||
}
|
||||
},
|
||||
err => {
|
||||
this.handleError('Error getting communities', err);
|
||||
this.searchUtils.status = this.errorMessages.getErrorCode(err.status);
|
||||
this.disableForms = false;
|
||||
HelperFunctions.scroll();
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get all communities from Communities API and apply permission access validator,
|
||||
* keyword searching, filter, paging and sorting.
|
||||
*
|
||||
* @param params, status
|
||||
* @private
|
||||
*/
|
||||
private _getResults(params: Map<string, string>){
|
||||
this.searchUtils.status = this.errorCodes.LOADING;
|
||||
this.disableForms = true;
|
||||
this.results = this.totalResults;
|
||||
if(this.filters.length === 0) {
|
||||
this.filters = this.createFilters();
|
||||
}
|
||||
this.searchUtils.totalResults = 0;
|
||||
this.applyParams(params);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the communities in which user has permission to view or manage.
|
||||
*/
|
||||
private showCommunities() {
|
||||
let ret: CommunityInfo[] = [];
|
||||
for(let result of this.results) {
|
||||
if (result.status == 'hidden') {
|
||||
continue;
|
||||
} else if (result.status == "manager") {
|
||||
let mail = (this.user)?this.user.email:null;
|
||||
if (mail == null) { // no user
|
||||
continue;
|
||||
} else if (Session.isCommunityCurator(this.user) || Session.isPortalAdministrator(this.user)) {
|
||||
ret.push(result);
|
||||
} else if (result.managers.indexOf(mail) != -1) {
|
||||
ret.push(result);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
ret.push(result);
|
||||
}
|
||||
this.results = ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* Apply permission access validator,
|
||||
* keyword searching, filter, paging and sorting.
|
||||
*
|
||||
* @param params
|
||||
* @param status
|
||||
*/
|
||||
public applyParams(params: Map<string, string>) {
|
||||
this.showCommunities();
|
||||
if(this.searchUtils.keyword && this.searchUtils.keyword != '') {
|
||||
this.searchForKeywords();
|
||||
}
|
||||
this.checkFilters(params);
|
||||
this.sort();
|
||||
this.searchUtils.totalResults = this.results.length;
|
||||
this.searchPage.checkSelectedFilters(this.filters);
|
||||
this.searchPage.updateBaseUrlWithParameters(this.filters);
|
||||
this.results = this.results.slice((this.searchUtils.page-1)*this.searchUtils.size, (this.searchUtils.page*this.searchUtils.size));
|
||||
this.searchUtils.status = this.errorCodes.DONE;
|
||||
if(this.searchUtils.totalResults == 0 ){
|
||||
this.searchUtils.status = this.errorCodes.NONE;
|
||||
}
|
||||
this.disableForms = false;
|
||||
if(this.searchUtils.status == this.errorCodes.DONE) {
|
||||
// Page out of limit!!!
|
||||
let totalPages:any = this.searchUtils.totalResults/(this.searchUtils.size);
|
||||
if(!(Number.isInteger(totalPages))) {
|
||||
totalPages = (parseInt(totalPages, 10) + 1);
|
||||
}
|
||||
if(totalPages < this.searchUtils.page) {
|
||||
this.searchUtils.totalResults = 0;
|
||||
this.searchUtils.status = this.errorCodes.OUT_OF_BOUND;
|
||||
}
|
||||
}
|
||||
HelperFunctions.scroll();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Parse the given keywords into array and check if any of the requirements field of a community includes
|
||||
* one of the given words.
|
||||
*/
|
||||
private searchForKeywords() {
|
||||
let ret: CommunityInfo[] = [];
|
||||
let keywords: string[] = this.searchUtils.keyword.split(/,(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,-1);
|
||||
for(let i = 0; i < this.results.length; i++) {
|
||||
for(let keyword of keywords) {
|
||||
keyword = keyword.toLowerCase();
|
||||
if (keyword != '' && (this.results[i].title.toLowerCase().includes(keyword) || this.results[i].shortTitle.toLowerCase().includes(keyword) ||
|
||||
this.results[i].communityId.toLowerCase().includes(keyword) || this.results[i].description.toLowerCase().includes(keyword))) {
|
||||
ret.push(this.results[i]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
this.results = ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check the current results if they satisfy the values of each filter category and
|
||||
* update the number of possible results in each value.
|
||||
*
|
||||
* @param params
|
||||
*/
|
||||
private checkFilters(params: Map<string, string>) {
|
||||
let typeResults: CommunityInfo[] = this.applyFilter('type', params);
|
||||
let statusResults: CommunityInfo[] = this.results;
|
||||
let roleResults: CommunityInfo[] = this.results;
|
||||
if(this.user) {
|
||||
statusResults = this.applyFilter('status', params);
|
||||
roleResults = this.applyFilter('role', params);
|
||||
this.resetFilterNumbers('status');
|
||||
this.updateFilterNumbers(typeResults.filter(value => {
|
||||
return roleResults.includes(value);
|
||||
}), 'status');
|
||||
this.resetFilterNumbers('role');
|
||||
this.updateFilterNumbers(statusResults.filter(value => {
|
||||
return typeResults.includes(value);
|
||||
}), 'role');
|
||||
}
|
||||
this.resetFilterNumbers('type');
|
||||
this.updateFilterNumbers(statusResults.filter(value => {
|
||||
return roleResults.includes(value);
|
||||
}), 'type');
|
||||
this.results = statusResults.filter(value => {
|
||||
return typeResults.includes(value);
|
||||
})
|
||||
this.results = this.results.filter(value => {
|
||||
return roleResults.includes(value);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Apply filter with filterId and return the results
|
||||
*
|
||||
* @param filterId
|
||||
* @param params
|
||||
*/
|
||||
private applyFilter(filterId: string, params: Map<string, string>): CommunityInfo[] {
|
||||
let results:CommunityInfo[] = [];
|
||||
let values: string[] = [];
|
||||
if(params.get(filterId) != undefined) {
|
||||
values = (StringUtils.URIDecode(params.get(filterId))).split(/,(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,-1);
|
||||
}
|
||||
if(filterId == 'type') {
|
||||
for (let i = 0; i < this.results.length; i++) {
|
||||
if (values.length == 0) {
|
||||
results.push(this.results[i]);
|
||||
} else {
|
||||
for (let value of values) {
|
||||
if (this.results[i].type == value.replace(/["']/g, "")) {
|
||||
results.push(this.results[i]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(filterId == 'status') {
|
||||
for (let i = 0; i < this.results.length; i++) {
|
||||
if (values.length == 0) {
|
||||
results.push(this.results[i]);
|
||||
} else {
|
||||
for (let value of values) {
|
||||
if (value.replace(/["']/g, "") == 'subscribed') {
|
||||
if (this.results[i].isSubscribed) {
|
||||
results.push(this.results[i]);
|
||||
break;
|
||||
}
|
||||
} else if (value.replace(/["']/g, "") == 'nonsubscribed') {
|
||||
if (!this.results[i].isSubscribed) {
|
||||
results.push(this.results[i]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(filterId == 'role') {
|
||||
for (let i = 0; i < this.results.length; i++) {
|
||||
if (values.length == 0) {
|
||||
results.push(this.results[i]);
|
||||
} else {
|
||||
for (let value of values) {
|
||||
if (value.replace(/["']/g, "") == 'manager') {
|
||||
if (this.results[i].isManager) {
|
||||
results.push(this.results[i]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return results;
|
||||
}
|
||||
|
||||
/**
|
||||
* Reset the values of filter with id filterId with zero.
|
||||
*
|
||||
* @param filterId
|
||||
*/
|
||||
private resetFilterNumbers(filterId: string) {
|
||||
for (let i = 0; i < this.filters.length; i++) {
|
||||
if(this.filters[i].filterId == filterId) {
|
||||
for (let j = 0; j < this.filters[i].values.length; j++) {
|
||||
this.filters[i].values[j].number = 0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the values of filter with id filterId based on
|
||||
* results.
|
||||
*
|
||||
* @param results
|
||||
* @param filterId
|
||||
*/
|
||||
private updateFilterNumbers(results: CommunityInfo[], filterId: string) {
|
||||
for(let k = 0; k < results.length; k++) {
|
||||
for (let i = 0; i < this.filters.length; i++) {
|
||||
if(this.filters[i].filterId == filterId) {
|
||||
if (this.filters[i].filterId == 'type') {
|
||||
for (let j = 0; j < this.filters[i].values.length; j++) {
|
||||
if (results[k].type == this.filters[i].values[j].id) {
|
||||
this.filters[i].values[j].number++;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (this.filters[i].filterId == 'status') {
|
||||
if (results[k].isSubscribed) {
|
||||
this.filters[i].values[0].number++;
|
||||
} else {
|
||||
this.filters[i].values[1].number++;
|
||||
}
|
||||
}
|
||||
else if (this.filters[i].filterId == 'role') {
|
||||
if (results[k].isManager) {
|
||||
this.filters[i].values[0].number++;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sorting results based on sortBy.
|
||||
*/
|
||||
private sort() {
|
||||
if(this.searchUtils.sortBy == '') {
|
||||
this.results.sort((left, right): number => {
|
||||
if (left.title > right.title) {
|
||||
return 1;
|
||||
} else if (left.title < right.title) {
|
||||
return -1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
})
|
||||
} else if(this.searchUtils.sortBy == 'creationdate,descending') {
|
||||
this.results.sort((left, right): number => {
|
||||
if (!right.date || left.date > right.date) {
|
||||
return -1;
|
||||
} else if (!left.date || left.date < right.date) {
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
})
|
||||
} else if(this.searchUtils.sortBy == 'creationdate,ascending') {
|
||||
this.results.sort((left, right): number => {
|
||||
if (!right.date || left.date > right.date) {
|
||||
return 1;
|
||||
} else if (!left.date || left.date < right.date) {
|
||||
return -1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private isCommunityManager(community: CommunityInfo): boolean {
|
||||
return Session.isCommunityCurator(this.user) || community.managers.indexOf(this.user.email) != -1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create Search Communities filters.
|
||||
*
|
||||
*/
|
||||
private createFilters(): Filter[] {
|
||||
let filter_names = [];
|
||||
let filter_ids = [];
|
||||
let searchFields = new SearchFields();
|
||||
let filter_original_ids = searchFields.COMMUNITIES_SEARCH_FIELDS;
|
||||
let value_names = [];
|
||||
let value_original_ids=[];
|
||||
this.showType = this.results.filter(community => community.type === 'ri').length > 0;
|
||||
if(this.showType) {
|
||||
filter_names.push("Type");
|
||||
filter_ids.push("type");
|
||||
value_names.push([ "Research Communities", "Research Initiatives" ]);
|
||||
value_original_ids.push(["community","ri"]);
|
||||
} else {
|
||||
filter_original_ids = searchFields.COMMUNITIES_SEARCH_FIELDS.splice(0, 1);
|
||||
}
|
||||
if(this.user) {
|
||||
filter_names.push("Status");
|
||||
filter_ids.push("status");
|
||||
value_names.push([ "Subscribed", "Non-subscribed"]);
|
||||
value_original_ids.push(["subscribed", "nonsubscribed"]);
|
||||
filter_names.push("Role");
|
||||
filter_ids.push("role");
|
||||
value_names.push([ "Manager"]);
|
||||
value_original_ids.push(["manager"]);
|
||||
}
|
||||
let filters: Filter[] = [];
|
||||
for(let i =0 ; i < filter_names.length; i++){
|
||||
let values: Value[] = [];
|
||||
for(let j =0 ; j < value_names[i].length; j++){
|
||||
let value: Value = {name: value_names[i][j], id: value_original_ids[i][j], number:0, selected:false};
|
||||
values.push(value);
|
||||
}
|
||||
let filter: Filter = {title: filter_names[i], filterId: filter_ids[i], originalFilterId: filter_original_ids[i], values : values, countSelectedValues:0, "filterOperator": 'or', valueIsExact: true , valueIsUnique: false};
|
||||
filters.push(filter);
|
||||
}
|
||||
return filters;
|
||||
}
|
||||
|
||||
private handleError(message: string, error) {
|
||||
console.error('Communities Search Page: ' + message, error);
|
||||
}
|
||||
|
||||
}
|
|
@ -1,24 +0,0 @@
|
|||
import {NgModule} from "@angular/core";
|
||||
import {CommonModule} from "@angular/common";
|
||||
import {FormsModule} from "@angular/forms";
|
||||
import {SearchCommunitiesComponent} from "./searchCommunities.component";
|
||||
import {SearchPageModule} from "../../openaireLibrary/searchPages/searchUtils/searchPage.module";
|
||||
import {SearchFormModule} from "../../openaireLibrary/searchPages/searchUtils/searchForm.module";
|
||||
import {SearchCommunitiesRoutingModule} from "./searchCommunities-routing.module";
|
||||
import {PreviousRouteRecorder} from "../../openaireLibrary/utils/piwik/previousRouteRecorder.guard";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule,
|
||||
SearchFormModule, SearchPageModule,
|
||||
SearchCommunitiesRoutingModule
|
||||
],
|
||||
declarations: [
|
||||
SearchCommunitiesComponent
|
||||
],
|
||||
providers:[ PreviousRouteRecorder],
|
||||
exports: [
|
||||
SearchCommunitiesComponent
|
||||
]
|
||||
})
|
||||
export class SearchCommunitiesModule { }
|
|
@ -1,798 +0,0 @@
|
|||
<div class="uk-offcanvas-content">
|
||||
|
||||
<nav class="uk-navbar-container">
|
||||
<div class="uk-container">
|
||||
<div uk-navbar="" class="uk-navbar">
|
||||
<div class="uk-navbar-left">
|
||||
|
||||
<a class="uk-navbar-item uk-logo" href="#">Logo</a>
|
||||
|
||||
<ul class="uk-navbar-nav">
|
||||
<li class="uk-active"><a href="#">Active</a></li>
|
||||
<li>
|
||||
<a href="#" aria-expanded="false">Parent</a>
|
||||
<div class="uk-navbar-dropdown">
|
||||
<ul class="uk-nav uk-navbar-dropdown-nav">
|
||||
<li class="uk-active"><a href="#">Active</a></li>
|
||||
<li class="uk-parent">
|
||||
<a href="#">Parent</a>
|
||||
<ul class="uk-nav-sub">
|
||||
<li><a href="#">Sub item</a></li>
|
||||
<li><a href="#">Sub item</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="uk-nav-header">Header</li>
|
||||
<li><a href="#"><span class="uk-margin-small-right uk-icon" uk-icon="icon: table"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" data-svg="table"><rect x="1" y="3" width="18" height="1"></rect><rect x="1" y="7" width="18" height="1"></rect><rect x="1" y="11" width="18" height="1"></rect><rect x="1" y="15" width="18" height="1"></rect></svg></span> Item</a></li>
|
||||
<li><a href="#"><span class="uk-margin-small-right uk-icon" uk-icon="icon: thumbnails"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" data-svg="thumbnails"><rect fill="none" stroke="#000" x="3.5" y="3.5" width="5" height="5"></rect><rect fill="none" stroke="#000" x="11.5" y="3.5" width="5" height="5"></rect><rect fill="none" stroke="#000" x="11.5" y="11.5" width="5" height="5"></rect><rect fill="none" stroke="#000" x="3.5" y="11.5" width="5" height="5"></rect></svg></span> Item</a></li>
|
||||
<li class="uk-nav-divider"></li>
|
||||
<li><a href="#"><span class="uk-margin-small-right uk-icon" uk-icon="icon: trash"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" data-svg="trash"><polyline fill="none" stroke="#000" points="6.5 3 6.5 1.5 13.5 1.5 13.5 3"></polyline><polyline fill="none" stroke="#000" points="4.5 4 4.5 18.5 15.5 18.5 15.5 4"></polyline><rect x="8" y="7" width="1" height="9"></rect><rect x="11" y="7" width="1" height="9"></rect><rect x="2" y="3" width="16" height="1"></rect></svg></span> Item</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
<li><a href="#">Item</a></li>
|
||||
<li><a href="#">Item</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
<div class="uk-navbar-right">
|
||||
<a class="uk-navbar-toggle uk-icon" href="#modal" uk-icon="icon: more-vertical" uk-toggle=""><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" data-svg="more-vertical"><circle cx="10" cy="3" r="2"></circle><circle cx="10" cy="10" r="2"></circle><circle cx="10" cy="17" r="2"></circle></svg></a>
|
||||
<a class="uk-navbar-toggle uk-icon uk-search-icon" href="#modal-search" uk-search-icon="" uk-toggle=""><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" data-svg="search-icon"><circle fill="none" stroke="#000" stroke-width="1.1" cx="9" cy="9" r="7"></circle><path fill="none" stroke="#000" stroke-width="1.1" d="M14,14 L18,18 L14,14 Z"></path></svg></a>
|
||||
<a class="uk-navbar-toggle uk-icon uk-navbar-toggle-icon" href="#offcanvas" uk-navbar-toggle-icon="" uk-toggle=""><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" data-svg="navbar-toggle-icon"><rect y="9" width="20" height="2"></rect><rect y="3" width="20" height="2"></rect><rect y="15" width="20" height="2"></rect></svg></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="uk-section uk-section-default">
|
||||
<div class="uk-container">
|
||||
|
||||
<div uk-grid="" class="uk-grid">
|
||||
<div class="uk-width-2-3@m uk-first-column">
|
||||
|
||||
<ul class="uk-breadcrumb">
|
||||
<li><a href="#">Home</a></li>
|
||||
<li><a href="#">Blog</a></li>
|
||||
<li class="uk-disabled"><a>Category</a></li>
|
||||
<li><span>Post</span></li>
|
||||
</ul>
|
||||
|
||||
<article class="uk-article">
|
||||
|
||||
<h1 class="uk-article-title"><a class="uk-link-reset" href="#">Article Title</a></h1>
|
||||
|
||||
<hr class="uk-divider-small">
|
||||
|
||||
<p class="uk-text-lead">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
|
||||
|
||||
<p class="uk-column-1-2@s uk-dropcap">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
|
||||
|
||||
<p class="uk-article-meta">Written by <a href="#">Super User</a> on 12 April 2012. Posted in <a href="#">Blog</a></p>
|
||||
|
||||
<hr class="uk-divider-icon uk-margin-medium">
|
||||
|
||||
<div class="uk-grid-small uk-child-width-auto uk-flex-middle uk-margin-medium uk-grid" uk-grid="">
|
||||
<div class="uk-first-column">
|
||||
<button class="uk-button uk-button-default" aria-expanded="false">Default</button>
|
||||
<div uk-dropdown="mode: click" class="uk-dropdown">
|
||||
<ul class="uk-nav uk-dropdown-nav">
|
||||
<li class="uk-active"><a href="#">Active</a></li>
|
||||
<li class="uk-parent">
|
||||
<a href="#">Parent</a>
|
||||
<ul class="uk-nav-sub">
|
||||
<li><a href="#">Sub item</a></li>
|
||||
<li><a href="#">Sub item</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="uk-nav-header">Header</li>
|
||||
<li><a href="#"><span class="uk-margin-small-right uk-icon" uk-icon="icon: table"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" data-svg="table"><rect x="1" y="3" width="18" height="1"></rect><rect x="1" y="7" width="18" height="1"></rect><rect x="1" y="11" width="18" height="1"></rect><rect x="1" y="15" width="18" height="1"></rect></svg></span> Item</a></li>
|
||||
<li><a href="#"><span class="uk-margin-small-right uk-icon" uk-icon="icon: thumbnails"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" data-svg="thumbnails"><rect fill="none" stroke="#000" x="3.5" y="3.5" width="5" height="5"></rect><rect fill="none" stroke="#000" x="11.5" y="3.5" width="5" height="5"></rect><rect fill="none" stroke="#000" x="11.5" y="11.5" width="5" height="5"></rect><rect fill="none" stroke="#000" x="3.5" y="11.5" width="5" height="5"></rect></svg></span> Item</a></li>
|
||||
<li class="uk-nav-divider"></li>
|
||||
<li><a href="#"><span class="uk-margin-small-right uk-icon" uk-icon="icon: trash"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" data-svg="trash"><polyline fill="none" stroke="#000" points="6.5 3 6.5 1.5 13.5 1.5 13.5 3"></polyline><polyline fill="none" stroke="#000" points="4.5 4 4.5 18.5 15.5 18.5 15.5 4"></polyline><rect x="8" y="7" width="1" height="9"></rect><rect x="11" y="7" width="1" height="9"></rect><rect x="2" y="3" width="16" height="1"></rect></svg></span> Item</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<button class="uk-button uk-button-primary">Primary</button>
|
||||
</div>
|
||||
<div>
|
||||
<button class="uk-button uk-button-secondary">Secondary</button>
|
||||
</div>
|
||||
<div>
|
||||
<button class="uk-button uk-button-danger">Danger</button>
|
||||
</div>
|
||||
<div>
|
||||
<button class="uk-button uk-button-default" disabled="">Disabled</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr class="uk-margin-medium">
|
||||
|
||||
<div class="uk-child-width-1-2 uk-child-width-1-4@s uk-margin uk-grid" uk-grid="">
|
||||
<div class="uk-first-column">
|
||||
<ul class="uk-list">
|
||||
<li><a href="#">a element</a></li>
|
||||
<li><abbr title="Title text">abbr element</abbr></li>
|
||||
<li><code>code element</code></li>
|
||||
<li><del>del element</del></li>
|
||||
<li><dfn title="Title text">dfn element</dfn></li>
|
||||
<li><a href="#" class="uk-link-muted">Link Muted</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div>
|
||||
<ul class="uk-list">
|
||||
<li><em>em element</em></li>
|
||||
<li><ins>ins element</ins></li>
|
||||
<li><mark>mark element</mark></li>
|
||||
<li><q>q <q>inside</q> a q</q></li>
|
||||
<li><strong>strong element</strong></li>
|
||||
<li><a href="#" class="uk-link-reset">Link Reset</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div>
|
||||
<ul class="uk-list">
|
||||
<li class="uk-text-muted">Text Muted</li>
|
||||
<li class="uk-text-emphasis">Text Emphasis</li>
|
||||
<li class="uk-text-primary">Text Primary</li>
|
||||
<li class="uk-text-secondary">Text Secondary</li>
|
||||
<li class="uk-text-success">Text Success</li>
|
||||
<li class="uk-text-warning">Text Warning</li>
|
||||
<li class="uk-text-danger">Text Danger</li>
|
||||
<li class="uk-text-meta">Text Meta</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div>
|
||||
<ul class="uk-list">
|
||||
<li><span class="uk-label">Default</span></li>
|
||||
<li><span class="uk-label uk-label-success">Success</span></li>
|
||||
<li><span class="uk-label uk-label-warning">Warning</span></li>
|
||||
<li><span class="uk-label uk-label-danger">Danger</span></li>
|
||||
<li><a class="uk-badge" href="#">1</a></li>
|
||||
<li>
|
||||
<a class="uk-icon-button uk-icon" href="#" uk-icon="icon: home"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" data-svg="home"><polygon points="18.65 11.35 10 2.71 1.35 11.35 0.65 10.65 10 1.29 19.35 10.65"></polygon><polygon points="15 4 18 4 18 7 17 7 17 5 15 5"></polygon><polygon points="3 11 4 11 4 18 7 18 7 12 12 12 12 18 16 18 16 11 17 11 17 19 11 19 11 13 8 13 8 19 3 19"></polygon></svg></a>
|
||||
<a class="uk-icon-button uk-icon" href="#" uk-icon="icon: github"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" data-svg="github"><path d="M10,1 C5.03,1 1,5.03 1,10 C1,13.98 3.58,17.35 7.16,18.54 C7.61,18.62 7.77,18.34 7.77,18.11 C7.77,17.9 7.76,17.33 7.76,16.58 C5.26,17.12 4.73,15.37 4.73,15.37 C4.32,14.33 3.73,14.05 3.73,14.05 C2.91,13.5 3.79,13.5 3.79,13.5 C4.69,13.56 5.17,14.43 5.17,14.43 C5.97,15.8 7.28,15.41 7.79,15.18 C7.87,14.6 8.1,14.2 8.36,13.98 C6.36,13.75 4.26,12.98 4.26,9.53 C4.26,8.55 4.61,7.74 5.19,7.11 C5.1,6.88 4.79,5.97 5.28,4.73 C5.28,4.73 6.04,4.49 7.75,5.65 C8.47,5.45 9.24,5.35 10,5.35 C10.76,5.35 11.53,5.45 12.25,5.65 C13.97,4.48 14.72,4.73 14.72,4.73 C15.21,5.97 14.9,6.88 14.81,7.11 C15.39,7.74 15.73,8.54 15.73,9.53 C15.73,12.99 13.63,13.75 11.62,13.97 C11.94,14.25 12.23,14.8 12.23,15.64 C12.23,16.84 12.22,17.81 12.22,18.11 C12.22,18.35 12.38,18.63 12.84,18.54 C16.42,17.35 19,13.98 19,10 C19,5.03 14.97,1 10,1 L10,1 Z"></path></svg></a>
|
||||
<a class="uk-icon-link uk-icon" href="#" uk-icon="icon: trash"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" data-svg="trash"><polyline fill="none" stroke="#000" points="6.5 3 6.5 1.5 13.5 1.5 13.5 3"></polyline><polyline fill="none" stroke="#000" points="4.5 4 4.5 18.5 15.5 18.5 15.5 4"></polyline><rect x="8" y="7" width="1" height="9"></rect><rect x="11" y="7" width="1" height="9"></rect><rect x="2" y="3" width="16" height="1"></rect></svg></a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<pre class="uk-pre uk-margin-medium"><code><div class="myclass">...<div></code></pre>
|
||||
|
||||
<blockquote class="uk-margin-medium" cite="#">
|
||||
<p>The blockquote element represents content that is quoted from another source, optionally with a citation which must be within a footer or cite element.</p>
|
||||
<footer>Someone famous in <cite><a href="#">Source Title</a></cite></footer>
|
||||
</blockquote>
|
||||
|
||||
<div class="uk-grid-small uk-grid" uk-grid="">
|
||||
<div class="uk-first-column">
|
||||
<a class="uk-button uk-button-text" href="#">Read more</a>
|
||||
</div>
|
||||
<div>
|
||||
<a class="uk-button uk-button-text" href="#">5 Comments</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</article>
|
||||
|
||||
<hr class="uk-margin-medium">
|
||||
|
||||
<ul class="uk-comment-list uk-margin-medium">
|
||||
<li>
|
||||
<article class="uk-comment uk-visible-toggle" tabindex="-1">
|
||||
<header class="uk-comment-header uk-position-relative">
|
||||
<div class="uk-grid-medium uk-flex-middle uk-grid" uk-grid="">
|
||||
<div class="uk-width-auto uk-first-column">
|
||||
<canvas class="uk-comment-avatar test-img-small" width="50" height="50"></canvas>
|
||||
</div>
|
||||
<div class="uk-width-expand">
|
||||
<h4 class="uk-comment-title uk-margin-remove"><a class="uk-link-reset" href="#">Author</a></h4>
|
||||
<p class="uk-comment-meta uk-margin-remove-top"><a class="uk-link-reset" href="#">12 days ago</a></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="uk-position-top-right uk-position-small uk-hidden-hover"><a class="uk-button uk-button-text" href="#">Reply</a></div>
|
||||
</header>
|
||||
<div class="uk-comment-body">
|
||||
<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.</p>
|
||||
</div>
|
||||
</article>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul class="uk-pagination uk-flex-center" uk-margin="">
|
||||
<li class="uk-first-column"><a href="#"><span uk-pagination-previous="" class="uk-icon uk-pagination-previous"><svg width="7" height="12" viewBox="0 0 7 12" xmlns="http://www.w3.org/2000/svg" data-svg="pagination-previous"><polyline fill="none" stroke="#000" stroke-width="1.2" points="6 1 1 6 6 11"></polyline></svg></span></a></li>
|
||||
<li><a href="#">1</a></li>
|
||||
<li class="uk-disabled"><span>...</span></li>
|
||||
<li><a href="#">4</a></li>
|
||||
<li><a href="#">5</a></li>
|
||||
<li><a href="#">6</a></li>
|
||||
<li class="uk-active"><span>7</span></li>
|
||||
<li><a href="#">8</a></li>
|
||||
<li><a href="#">9</a></li>
|
||||
<li><a href="#">10</a></li>
|
||||
<li class="uk-disabled"><span>...</span></li>
|
||||
<li><a href="#">20</a></li>
|
||||
<li><a href="#"><span uk-pagination-next="" class="uk-icon uk-pagination-next"><svg width="7" height="12" viewBox="0 0 7 12" xmlns="http://www.w3.org/2000/svg" data-svg="pagination-next"><polyline fill="none" stroke="#000" stroke-width="1.2" points="1 1 6 6 1 11"></polyline></svg></span></a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
<div class="uk-width-expand@m">
|
||||
|
||||
<div class="uk-margin-medium-bottom">
|
||||
<form class="uk-search uk-search-default uk-width-1-1">
|
||||
<span uk-search-icon="" class="uk-icon uk-search-icon"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" data-svg="search-icon"><circle fill="none" stroke="#000" stroke-width="1.1" cx="9" cy="9" r="7"></circle><path fill="none" stroke="#000" stroke-width="1.1" d="M14,14 L18,18 L14,14 Z"></path></svg></span>
|
||||
<input class="uk-search-input" type="search" placeholder="Search...">
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<ul class="uk-nav-default uk-nav-parent-icon uk-margin-medium uk-nav" uk-nav="">
|
||||
<li class="uk-active"><a href="#">Active</a></li>
|
||||
<li class="uk-parent">
|
||||
<a href="#">Parent</a>
|
||||
<ul class="uk-nav-sub" aria-hidden="true" hidden="">
|
||||
<li><a href="#">Sub item</a></li>
|
||||
<li><a href="#">Sub item</a>
|
||||
<ul>
|
||||
<li><a href="#">Sub item</a></li>
|
||||
<li><a href="#">Sub item</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="uk-parent">
|
||||
<a href="#">Parent</a>
|
||||
<ul class="uk-nav-sub" aria-hidden="true" hidden="">
|
||||
<li><a href="#">Sub item</a></li>
|
||||
<li><a href="#">Sub item</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="uk-nav-header">Header</li>
|
||||
<li><a href="#"><span class="uk-margin-small-right uk-icon" uk-icon="icon: table"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" data-svg="table"><rect x="1" y="3" width="18" height="1"></rect><rect x="1" y="7" width="18" height="1"></rect><rect x="1" y="11" width="18" height="1"></rect><rect x="1" y="15" width="18" height="1"></rect></svg></span> Item</a></li>
|
||||
<li><a href="#"><span class="uk-margin-small-right uk-icon" uk-icon="icon: thumbnails"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" data-svg="thumbnails"><rect fill="none" stroke="#000" x="3.5" y="3.5" width="5" height="5"></rect><rect fill="none" stroke="#000" x="11.5" y="3.5" width="5" height="5"></rect><rect fill="none" stroke="#000" x="11.5" y="11.5" width="5" height="5"></rect><rect fill="none" stroke="#000" x="3.5" y="11.5" width="5" height="5"></rect></svg></span> Item</a></li>
|
||||
<li class="uk-nav-divider"></li>
|
||||
<li><a href="#"><span class="uk-margin-small-right uk-icon" uk-icon="icon: trash"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" data-svg="trash"><polyline fill="none" stroke="#000" points="6.5 3 6.5 1.5 13.5 1.5 13.5 3"></polyline><polyline fill="none" stroke="#000" points="4.5 4 4.5 18.5 15.5 18.5 15.5 4"></polyline><rect x="8" y="7" width="1" height="9"></rect><rect x="11" y="7" width="1" height="9"></rect><rect x="2" y="3" width="16" height="1"></rect></svg></span> Item</a></li>
|
||||
</ul>
|
||||
|
||||
<div class="uk-card uk-card-body uk-card-default uk-card-hover">
|
||||
<h3 class="uk-card-title">Default</h3>
|
||||
<p>Lorem ipsum <a href="#">dolor</a> sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
|
||||
</div>
|
||||
|
||||
<div class="uk-margin uk-card uk-card-body uk-card-primary uk-card-hover">
|
||||
<h3 class="uk-card-title">Primary</h3>
|
||||
<p>Lorem ipsum <a href="#">dolor</a> sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
|
||||
</div>
|
||||
|
||||
<div class="uk-margin uk-card uk-card-body uk-card-secondary uk-card-hover">
|
||||
<h3 class="uk-card-title">Secondary</h3>
|
||||
<p>Lorem ipsum <a href="#">dolor</a> sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
|
||||
</div>
|
||||
|
||||
<div class="uk-margin uk-card uk-card-body uk-card-hover">
|
||||
<h3 class="uk-card-title">Hover</h3>
|
||||
<p>Lorem ipsum <a href="#">dolor</a> sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr class="uk-margin-large">
|
||||
|
||||
<div class="uk-grid-divider uk-grid" uk-grid="">
|
||||
<div class="uk-width-3-5@m uk-first-column">
|
||||
|
||||
<div class="uk-child-width-expand@s uk-grid" uk-grid="">
|
||||
<div class="uk-first-column">
|
||||
|
||||
<form class="uk-form-stacked">
|
||||
|
||||
<div class="uk-margin-small">
|
||||
<label class="uk-form-label">Text</label>
|
||||
<input class="uk-input" type="text" placeholder="Some text...">
|
||||
</div>
|
||||
|
||||
<div class="uk-margin-small">
|
||||
<select class="uk-select">
|
||||
<option>Option 01</option>
|
||||
<option>Option 02</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="uk-margin-small">
|
||||
<textarea class="uk-textarea" rows="2" placeholder="Some text..."></textarea>
|
||||
</div>
|
||||
|
||||
<div class="uk-grid-small uk-child-width-auto uk-grid" uk-grid="">
|
||||
<div class="uk-first-column">
|
||||
<label><input class="uk-radio" type="radio" name="radio"> Radio</label>
|
||||
</div>
|
||||
<div>
|
||||
<label><input class="uk-checkbox" type="checkbox"> Checkbox</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="uk-margin-small">
|
||||
<input class="uk-range" type="range" value="2" min="0" max="10" step="0.1">
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
<div>
|
||||
|
||||
<form class="uk-form-stacked">
|
||||
|
||||
<div class="uk-margin-small">
|
||||
<label class="uk-form-label">States</label>
|
||||
<input class="uk-input" type="text" placeholder=":disabled" disabled="">
|
||||
</div>
|
||||
|
||||
<div class="uk-margin-small">
|
||||
<input class="uk-input uk-form-danger" type="text" placeholder="form-danger" value="form-danger">
|
||||
</div>
|
||||
<div class="uk-margin-small">
|
||||
<input class="uk-input uk-form-success" type="text" placeholder="form-success" value="form-success">
|
||||
</div>
|
||||
<div class="uk-margin-small">
|
||||
<input class="uk-input uk-form-blank" type="text" placeholder="form-blank">
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="uk-overflow-auto uk-margin-medium-top">
|
||||
<table class="uk-table uk-table-divider uk-table-hover uk-table-small">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Table Heading</th>
|
||||
<th>Table Heading</th>
|
||||
<th>Table Heading</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Table Data</td>
|
||||
<td>Table Data</td>
|
||||
<td>Table Data</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Table Data</td>
|
||||
<td>Table Data</td>
|
||||
<td>Table Data</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Table Data</td>
|
||||
<td>Table Data</td>
|
||||
<td>Table Data</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Table Data</td>
|
||||
<td>Table Data</td>
|
||||
<td>Table Data</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="uk-margin-medium-top uk-alert" uk-alert="">
|
||||
<a href="#" class="uk-alert-close uk-icon uk-close" uk-close=""><svg width="14" height="14" viewBox="0 0 14 14" xmlns="http://www.w3.org/2000/svg" data-svg="close-icon"><line fill="none" stroke="#000" stroke-width="1.1" x1="1" y1="1" x2="13" y2="13"></line><line fill="none" stroke="#000" stroke-width="1.1" x1="13" y1="1" x2="1" y2="13"></line></svg></a>
|
||||
<p>Default</p>
|
||||
</div>
|
||||
|
||||
<div class="uk-alert-primary uk-alert" uk-alert="">
|
||||
<a href="#" class="uk-alert-close uk-icon uk-close" uk-close=""><svg width="14" height="14" viewBox="0 0 14 14" xmlns="http://www.w3.org/2000/svg" data-svg="close-icon"><line fill="none" stroke="#000" stroke-width="1.1" x1="1" y1="1" x2="13" y2="13"></line><line fill="none" stroke="#000" stroke-width="1.1" x1="13" y1="1" x2="1" y2="13"></line></svg></a>
|
||||
<p>Primary</p>
|
||||
</div>
|
||||
|
||||
<div class="uk-alert-success uk-alert" uk-alert="">
|
||||
<a href="#" class="uk-alert-close uk-icon uk-close" uk-close=""><svg width="14" height="14" viewBox="0 0 14 14" xmlns="http://www.w3.org/2000/svg" data-svg="close-icon"><line fill="none" stroke="#000" stroke-width="1.1" x1="1" y1="1" x2="13" y2="13"></line><line fill="none" stroke="#000" stroke-width="1.1" x1="13" y1="1" x2="1" y2="13"></line></svg></a>
|
||||
<p>Success</p>
|
||||
</div>
|
||||
|
||||
<div class="uk-alert-warning uk-alert" uk-alert="">
|
||||
<a href="#" class="uk-alert-close uk-icon uk-close" uk-close=""><svg width="14" height="14" viewBox="0 0 14 14" xmlns="http://www.w3.org/2000/svg" data-svg="close-icon"><line fill="none" stroke="#000" stroke-width="1.1" x1="1" y1="1" x2="13" y2="13"></line><line fill="none" stroke="#000" stroke-width="1.1" x1="13" y1="1" x2="1" y2="13"></line></svg></a>
|
||||
<p>Warning</p>
|
||||
</div>
|
||||
|
||||
<div class="uk-alert-danger uk-margin-remove-bottom uk-alert" uk-alert="">
|
||||
<a href="#" class="uk-alert-close uk-icon uk-close" uk-close=""><svg width="14" height="14" viewBox="0 0 14 14" xmlns="http://www.w3.org/2000/svg" data-svg="close-icon"><line fill="none" stroke="#000" stroke-width="1.1" x1="1" y1="1" x2="13" y2="13"></line><line fill="none" stroke="#000" stroke-width="1.1" x1="13" y1="1" x2="1" y2="13"></line></svg></a>
|
||||
<p>Danger</p>
|
||||
</div>
|
||||
|
||||
<div class="uk-grid-small uk-child-width-auto uk-margin-medium-top uk-countdown uk-grid" uk-grid="" js-countdown="">
|
||||
<div class="uk-first-column">
|
||||
<div class="uk-countdown-number uk-countdown-days"><span>0</span><span>6</span></div>
|
||||
</div>
|
||||
<div class="uk-countdown-separator">:</div>
|
||||
<div>
|
||||
<div class="uk-countdown-number uk-countdown-hours"><span>2</span><span>3</span></div>
|
||||
</div>
|
||||
<div class="uk-countdown-separator">:</div>
|
||||
<div>
|
||||
<div class="uk-countdown-number uk-countdown-minutes"><span>5</span><span>9</span></div>
|
||||
</div>
|
||||
<div class="uk-countdown-separator">:</div>
|
||||
<div>
|
||||
<div class="uk-countdown-number uk-countdown-seconds"><span>5</span><span>0</span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
var date = (new Date(Date.now() + 864e5 * 7)).toISOString();
|
||||
|
||||
UIkit.util.$$('[js-countdown]').forEach(function(el) {
|
||||
UIkit.countdown(el, {date: date});
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
</div>
|
||||
<div class="uk-width-2-5@m">
|
||||
|
||||
<h1 class="uk-heading-2xlarge uk-margin-small">2XL</h1>
|
||||
<h1 class="uk-heading-xlarge uk-margin-small">XLarge</h1>
|
||||
<h1 class="uk-heading-large uk-margin-small">Heading L</h1>
|
||||
<h1 class="uk-heading-medium uk-margin-small">Heading M</h1>
|
||||
<h1 class="uk-heading-small uk-margin-small">Heading S</h1>
|
||||
|
||||
<h1 class="uk-margin-small">Heading H1</h1>
|
||||
<h2 class="uk-margin-small">Heading H2</h2>
|
||||
<h3 class="uk-margin-small">Heading H3</h3>
|
||||
<h4 class="uk-margin-small">Heading H4</h4>
|
||||
<h5 class="uk-margin-small">Heading H5</h5>
|
||||
<h6 class="uk-margin-small">Heading H6</h6>
|
||||
|
||||
<h3 class="uk-heading-divider">Heading Divider</h3>
|
||||
<h3 class="uk-heading-bullet">Heading Bullet</h3>
|
||||
<h3 class="uk-heading-line"><span>Heading Line</span></h3>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr class="uk-margin-medium">
|
||||
|
||||
<div class="uk-child-width-1-2@s uk-child-width-expand@m uk-grid" uk-grid="">
|
||||
<div class="uk-first-column">
|
||||
|
||||
<div class="uk-inline">
|
||||
<canvas width="800" height="600" class="test-img"></canvas>
|
||||
<a class="uk-position-absolute uk-transform-center uk-icon uk-marker" style="left: 20%; top: 30%" href="#" uk-marker=""><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" data-svg="marker"><rect x="9" y="4" width="1" height="11"></rect><rect x="4" y="9" width="11" height="1"></rect></svg></a>
|
||||
<a class="uk-position-absolute uk-transform-center uk-icon uk-marker" style="left: 60%; top: 40%" href="#" uk-marker=""><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" data-svg="marker"><rect x="9" y="4" width="1" height="11"></rect><rect x="4" y="9" width="11" height="1"></rect></svg></a>
|
||||
<a class="uk-position-absolute uk-transform-center uk-icon uk-marker" style="left: 80%; top: 70%" href="#" uk-marker=""><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" data-svg="marker"><rect x="9" y="4" width="1" height="11"></rect><rect x="4" y="9" width="11" height="1"></rect></svg></a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div>
|
||||
|
||||
<div class="uk-inline-clip">
|
||||
<canvas width="800" height="600" class="test-img"></canvas>
|
||||
<div class="uk-overlay uk-overlay-default uk-position-bottom">
|
||||
<p>Default Lorem ipsum dolor sit amet, consectetur.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div>
|
||||
|
||||
<div class="uk-inline-clip">
|
||||
<canvas width="800" height="600" class="test-img"></canvas>
|
||||
<div class="uk-overlay uk-overlay-primary uk-position-bottom">
|
||||
<p>Primary Lorem ipsum dolor sit amet, consectetur.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div>
|
||||
|
||||
<div class="uk-inline">
|
||||
<canvas width="800" height="600" class="test-img"></canvas>
|
||||
<div class="uk-position-center">
|
||||
<span uk-overlay-icon="" class="uk-icon uk-overlay-icon"><svg width="40" height="40" viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg" data-svg="overlay-icon"><rect x="19" y="0" width="1" height="40"></rect><rect x="0" y="19" width="40" height="1"></rect></svg></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr class="uk-margin-medium">
|
||||
|
||||
<div class="uk-grid-divider uk-child-width-auto@m uk-grid" uk-grid="">
|
||||
<div class="uk-first-column">
|
||||
|
||||
<ul class="uk-dotnav">
|
||||
<li class="uk-active"><a href="#">Item 1</a></li>
|
||||
<li><a href="#">Item 2</a></li>
|
||||
<li><a href="#">Item 3</a></li>
|
||||
<li><a href="#">Item 4</a></li>
|
||||
<li><a href="#">Item 5</a></li>
|
||||
<li><a href="#">Item 6</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
<div>
|
||||
|
||||
<a href="#" uk-slidenav-previous="" class="uk-icon uk-slidenav-previous uk-slidenav"><svg width="14px" height="24px" viewBox="0 0 14 24" xmlns="http://www.w3.org/2000/svg" data-svg="slidenav-previous"><polyline fill="none" stroke="#000" stroke-width="1.4" points="12.775,1 1.225,12 12.775,23 "></polyline></svg></a>
|
||||
<a href="#" uk-slidenav-next="" class="uk-icon uk-slidenav-next uk-slidenav"><svg width="14px" height="24px" viewBox="0 0 14 24" xmlns="http://www.w3.org/2000/svg" data-svg="slidenav-next"><polyline fill="none" stroke="#000" stroke-width="1.4" points="1.225,23 12.775,12 1.225,1 "></polyline></svg></a>
|
||||
|
||||
</div>
|
||||
<div>
|
||||
|
||||
<ul class="uk-thumbnav">
|
||||
<li class="uk-active"><a href="#"><canvas width="60" height="40" class="test-img"></canvas></a></li>
|
||||
<li><a href="#"><canvas width="60" height="40" class="test-img"></canvas></a></li>
|
||||
<li><a href="#"><canvas width="60" height="40" class="test-img"></canvas></a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
<div>
|
||||
|
||||
<div class="uk-tooltip uk-tooltip-top-center uk-display-inline-block uk-margin-remove uk-position-relative">Tooltip</div>
|
||||
|
||||
</div>
|
||||
<div class="uk-width-expand@m">
|
||||
|
||||
<progress class="uk-progress" value="45" max="100">45%</progress>
|
||||
|
||||
</div>
|
||||
<div>
|
||||
|
||||
<button type="button" uk-close="" class="uk-icon uk-close"><svg width="14" height="14" viewBox="0 0 14 14" xmlns="http://www.w3.org/2000/svg" data-svg="close-icon"><line fill="none" stroke="#000" stroke-width="1.1" x1="1" y1="1" x2="13" y2="13"></line><line fill="none" stroke="#000" stroke-width="1.1" x1="13" y1="1" x2="1" y2="13"></line></svg></button>
|
||||
|
||||
</div>
|
||||
<div>
|
||||
|
||||
<a href="#" uk-totop="" class="uk-icon uk-totop"><svg width="18" height="10" viewBox="0 0 18 10" xmlns="http://www.w3.org/2000/svg" data-svg="totop"><polyline fill="none" stroke="#000" stroke-width="1.2" points="1 9 9 1 17 9 "></polyline></svg></a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr class="uk-margin-medium">
|
||||
|
||||
<div class="uk-grid-divider uk-child-width-expand@m uk-grid" uk-grid="">
|
||||
<div class="uk-first-column">
|
||||
|
||||
<ul class="uk-subnav uk-subnav-divider" uk-margin="">
|
||||
<li class="uk-active uk-first-column"><a href="#">Active</a></li>
|
||||
<li><a href="#">Item</a></li>
|
||||
<li class="uk-disabled"><a>Disabled</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
<div>
|
||||
|
||||
<ul class="uk-subnav uk-subnav-pill" uk-margin="">
|
||||
<li class="uk-active uk-first-column"><a href="#">Active</a></li>
|
||||
<li><a href="#">Item</a></li>
|
||||
<li class="uk-disabled"><a>Disabled</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
<div>
|
||||
|
||||
<ul uk-tab="" class="uk-tab">
|
||||
<li class="uk-active"><a href="#">Active</a></li>
|
||||
<li><a href="#">Item</a></li>
|
||||
<li class="uk-disabled"><a>Disabled</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr class="uk-margin-medium">
|
||||
|
||||
<div class="uk-grid-divider uk-child-width-expand@m uk-grid" uk-grid="">
|
||||
<div class="uk-first-column">
|
||||
|
||||
<ul class="uk-list uk-list-bullet uk-margin-medium">
|
||||
<li>List item 1</li>
|
||||
<li>List item 2</li>
|
||||
<li>List item 3</li>
|
||||
</ul>
|
||||
|
||||
<ul class="uk-list uk-list-striped">
|
||||
<li>List item 1</li>
|
||||
<li>List item 2</li>
|
||||
<li>List item 3</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
<div>
|
||||
|
||||
<ul class="uk-list uk-list-divider uk-margin-medium">
|
||||
<li>List item 1</li>
|
||||
<li>List item 2</li>
|
||||
<li>List item 3</li>
|
||||
</ul>
|
||||
|
||||
<dl class="uk-description-list uk-description-list-divider">
|
||||
<dt>Description lists</dt>
|
||||
<dd>A description text</dd>
|
||||
<dt>Description lists</dt>
|
||||
<dd>A description text</dd>
|
||||
</dl>
|
||||
|
||||
</div>
|
||||
<div>
|
||||
|
||||
<ul uk-accordion="" class="uk-accordion">
|
||||
<li class="uk-open">
|
||||
|
||||
<a class="uk-accordion-title" href="#">Item 1</a>
|
||||
<div class="uk-accordion-content" aria-hidden="false">
|
||||
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco.</p>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<a class="uk-accordion-title" href="#">Item 2</a>
|
||||
<div class="uk-accordion-content" aria-hidden="true" hidden="">
|
||||
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco.</p>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<a class="uk-accordion-title" href="#">Item 3</a>
|
||||
<div class="uk-accordion-content" aria-hidden="true" hidden="">
|
||||
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco.</p>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="uk-section uk-padding-remove-vertical">
|
||||
<div class="uk-child-width-1-2@s uk-child-width-1-4@l uk-grid-collapse uk-grid-match uk-grid" uk-grid="">
|
||||
<div class="uk-first-column">
|
||||
<div class="uk-tile uk-tile-default">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor.</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="uk-tile uk-tile-muted">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor.</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="uk-tile uk-tile-primary">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor.</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="uk-tile uk-tile-secondary">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor.</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="uk-section uk-section-default">
|
||||
<div class="uk-container">
|
||||
|
||||
<div class="uk-grid-large uk-flex-middle uk-grid" uk-grid="">
|
||||
<div class="uk-width-expand@m uk-first-column">
|
||||
<p class="uk-text-large">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor.</p>
|
||||
</div>
|
||||
<div class="uk-width-auto@m">
|
||||
<a class="uk-button uk-button-default uk-button-large" href="#">Button</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="uk-section uk-section-muted">
|
||||
<div class="uk-container">
|
||||
|
||||
<div class="uk-grid-large uk-flex-middle uk-grid" uk-grid="">
|
||||
<div class="uk-width-expand@m uk-first-column">
|
||||
<p class="uk-text-large">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor.</p>
|
||||
</div>
|
||||
<div class="uk-width-auto@m">
|
||||
<a class="uk-button uk-button-default uk-button-large" href="#">Button</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="uk-section uk-section-primary">
|
||||
<div class="uk-container">
|
||||
|
||||
<div class="uk-grid-large uk-flex-middle uk-grid" uk-grid="">
|
||||
<div class="uk-width-expand@m uk-first-column">
|
||||
<p class="uk-text-large">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor.</p>
|
||||
</div>
|
||||
<div class="uk-width-auto@m">
|
||||
<a class="uk-button uk-button-default uk-button-large" href="#">Button</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="uk-section uk-section-secondary">
|
||||
<div class="uk-container">
|
||||
|
||||
<div class="uk-grid-large uk-flex-middle uk-grid" uk-grid="">
|
||||
<div class="uk-width-expand@m uk-first-column">
|
||||
<p class="uk-text-large">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor.</p>
|
||||
</div>
|
||||
<div class="uk-width-auto@m">
|
||||
<a class="uk-button uk-button-default uk-button-large" href="#">Button</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="modal" uk-modal="" class="uk-modal">
|
||||
<div class="uk-modal-dialog">
|
||||
<button class="uk-modal-close-default uk-icon uk-close" type="button" uk-close=""><svg width="14" height="14" viewBox="0 0 14 14" xmlns="http://www.w3.org/2000/svg" data-svg="close-icon"><line fill="none" stroke="#000" stroke-width="1.1" x1="1" y1="1" x2="13" y2="13"></line><line fill="none" stroke="#000" stroke-width="1.1" x1="13" y1="1" x2="1" y2="13"></line></svg></button>
|
||||
<div class="uk-modal-header">
|
||||
<h2 class="uk-modal-title">Headline</h2>
|
||||
</div>
|
||||
<div class="uk-modal-body">
|
||||
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
|
||||
</div>
|
||||
<div class="uk-modal-footer uk-text-right">
|
||||
<button class="uk-button uk-button-default uk-modal-close" type="button">Cancel</button>
|
||||
<button class="uk-button uk-button-primary" type="button">Save</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="modal-search" class="uk-modal-full uk-modal" uk-modal="">
|
||||
<div class="uk-modal-dialog uk-flex uk-flex-center uk-flex-middle" uk-height-viewport="">
|
||||
|
||||
<button class="uk-modal-close-full uk-close-large uk-icon uk-close" type="button" uk-close=""><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" data-svg="close-large"><line fill="none" stroke="#000" stroke-width="1.4" x1="1" y1="1" x2="19" y2="19"></line><line fill="none" stroke="#000" stroke-width="1.4" x1="19" y1="1" x2="1" y2="19"></line></svg></button>
|
||||
|
||||
<div>
|
||||
|
||||
<ul class="uk-nav-primary uk-nav-center uk-nav" uk-nav="">
|
||||
<li class="uk-active"><a href="#">Active</a></li>
|
||||
<li><a href="#">Item</a></li>
|
||||
<li><a href="#">Item</a></li>
|
||||
<li><a href="#">Item</a></li>
|
||||
</ul>
|
||||
|
||||
<div class="uk-margin">
|
||||
<form class="uk-search uk-search-large">
|
||||
<input class="uk-search-input uk-text-center" type="search" placeholder="Search...">
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="uk-container ">
|
||||
<button class="uk-button portal-button">Button</button>
|
||||
<div class="portal-color">portal-color</div>
|
||||
<div class="portal-secondary-color">portal-secondary-color</div>
|
||||
<div class="portal-background-color">portal-background-color</div>
|
||||
<a class="uk-link portal-link">portal-link</a>
|
||||
<div class="portal-box">portal-box</div>
|
||||
<div><span class="portal-icon-button uk-icon uk-icon-button" uk-icon="icon: check"></span> portal-icon-button
|
||||
uk-icon-button uk-icon</div>
|
||||
|
||||
</div>
|
||||
<div class="uk-container uk-container-small portal-box">
|
||||
<div class=" uk-text-large">small container</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="uk-container portal-box">
|
||||
<div class=" uk-text-large">large container</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="uk-container uk-container-large portal-box">
|
||||
<div class=" uk-text-large">large container</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
.
|
|
@ -1,11 +0,0 @@
|
|||
import {Component} from '@angular/core';
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'theme',
|
||||
templateUrl: 'theme.component.html',
|
||||
})
|
||||
|
||||
export class ThemeComponent {
|
||||
|
||||
}
|
Loading…
Reference in New Issue