[master | DONE | ADDED] Discover orcid links, add property
This commit is contained in:
parent
cdb80161b1
commit
7e9dae0e20
|
@ -80,6 +80,7 @@ const routes: Routes = [
|
|||
},
|
||||
{path: 'orcid', loadChildren: () => import('./orcid/orcid.module').then(m => m.LibOrcidModule), canActivate: [HasConsentGuard]},
|
||||
{path: 'my-orcid-links', loadChildren: () => import('./orcid/my-orcid-links/myOrcidLinks.module').then(m => m.LibMyOrcidLinksModule), canActivate: [HasConsentGuard]},
|
||||
{path: 'orcid-discover-links', loadChildren: () => import('./orcid/discover-links/discover-links.module').then(m => m.DiscoverLinksModule), canActivate: [HasConsentGuard]},
|
||||
{path: 'error', component: ErrorPageComponent},
|
||||
{path: '**', pathMatch: 'full', component: ErrorPageComponent}
|
||||
];
|
||||
|
|
|
@ -0,0 +1,37 @@
|
|||
<div>
|
||||
<div class="uk-banner">
|
||||
<div class="uk-container uk-container-large">
|
||||
<div class="uk-padding-small uk-padding-remove-vertical">
|
||||
<div class="uk-grid uk-flex-middle" uk-grid>
|
||||
<div class="uk-width-expand">
|
||||
<h1 class="uk-h4 uk-margin-small-bottom">Discover your research results</h1>
|
||||
<div class="uk-margin-bottom"> <span *ngIf="user"> Below are research results for <span class="uk-text-large uk-text-primary">'{{user.firstname + ' ' + user.lastname}}'</span>. <br>
|
||||
Select your works to add them to your ORCID profile, by clicking on "claim" below each record.</span> </div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--<div class="uk-section uk-container uk-container-large" >
|
||||
|
||||
<sea
|
||||
</div>-->
|
||||
<div class=" uk-flex uk-flex-center uk-margin-medium-bottom">
|
||||
<div class="uk-margin-top">
|
||||
|
||||
<div search-input [(value)]="keyword" [placeholder]="'Search by title, author, abstract, DOI, orcid...'"
|
||||
[searchInputClass]="'flat'" [iconPosition]="'left'" (searchEmitter)="search()" class="uk-width-xlarge@l uk-width-large@m uk-width-1-1"></div>
|
||||
</div>
|
||||
</div>
|
||||
<search-research-results *ngIf="filters" [customFilters]="filters"
|
||||
[includeOnlyResultsAndFilter]="true"
|
||||
resultType="result" [simpleView]="true"
|
||||
[hasPrefix]="false"
|
||||
[showBreadcrumb]="false"
|
||||
[showSwitchSearchLink]="false"
|
||||
[searchForm]="{dark: false, class: 'search-form'}"
|
||||
[pageTitlePrefix]="title"
|
||||
></search-research-results>
|
||||
</div>
|
|
@ -0,0 +1,43 @@
|
|||
import {Component, OnInit} from '@angular/core';
|
||||
import {SearchResearchResultsService} from "../../openaireLibrary/services/searchResearchResults.service";
|
||||
import {LogService} from "../../openaireLibrary/utils/log/log.service";
|
||||
import {ActivatedRoute, Router} from '@angular/router';
|
||||
import {SEOService} from '../../openaireLibrary/sharedComponents/SEO/SEO.service';
|
||||
import {PiwikService} from '../../openaireLibrary/utils/piwik/piwik.service';
|
||||
import {Meta, Title} from '@angular/platform-browser';
|
||||
import {UserManagementService} from "../../openaireLibrary/services/user-management.service";
|
||||
import {SearchCustomFilter} from "../../openaireLibrary/searchPages/searchUtils/searchUtils.class";
|
||||
import {SearchBaseComponent} from "../../search/searchPages/searchBaseComponent";
|
||||
|
||||
@Component({
|
||||
selector: 'discover-links',
|
||||
templateUrl: './discover-links.component.html'
|
||||
})
|
||||
export class DiscoverLinksComponent extends SearchBaseComponent implements OnInit {
|
||||
filters = null;
|
||||
user = null;
|
||||
constructor(private _searchResearchResultsService: SearchResearchResultsService,
|
||||
private _logService: LogService,
|
||||
protected router: Router,
|
||||
protected route: ActivatedRoute,
|
||||
protected seoService: SEOService,
|
||||
protected _piwikService: PiwikService,
|
||||
protected _title: Title,
|
||||
protected _meta: Meta, private _userManagementService: UserManagementService) {
|
||||
super();
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.title = 'Discover links';
|
||||
this.description = 'Discover links';
|
||||
this.setMetadata();
|
||||
|
||||
this.subscriptions.push(this._userManagementService.getUserInfo().subscribe(user => {
|
||||
this.user = user;
|
||||
this.filters = [new SearchCustomFilter("Author", "resultauthor", user.fullname, user.fullname, false, 'resultauthor="'+user.firstname + '" and resultauthor="'+ user.lastname+'"')];
|
||||
|
||||
|
||||
}));
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
import {NgModule} from '@angular/core';
|
||||
import {CommonModule} from '@angular/common';
|
||||
import {DiscoverLinksComponent} from "./discover-links.component";
|
||||
import {RouterModule} from "@angular/router";
|
||||
import {LoginGuard} from "../../openaireLibrary/login/loginGuard.guard";
|
||||
import {SearchResearchResultsModule} from "../../openaireLibrary/searchPages/searchResearchResults.module";
|
||||
import {SearchInputModule} from "../../openaireLibrary/sharedComponents/search-input/search-input.module";
|
||||
|
||||
|
||||
@NgModule({
|
||||
declarations: [DiscoverLinksComponent],
|
||||
imports: [
|
||||
CommonModule, RouterModule.forChild([
|
||||
{
|
||||
path: '',
|
||||
component: DiscoverLinksComponent, canActivate: [LoginGuard]
|
||||
}
|
||||
]), SearchResearchResultsModule, SearchInputModule
|
||||
|
||||
],
|
||||
})
|
||||
export class DiscoverLinksModule { }
|
|
@ -1,24 +0,0 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule } from '@angular/router';
|
||||
import {IsRouteEnabled} from "../../openaireLibrary/error/isRouteEnabled.guard";
|
||||
import {PreviousRouteRecorder} from "../../openaireLibrary/utils/piwik/previousRouteRecorder.guard";
|
||||
import {OpenaireSearchRecommendedResultsForOrcidComponent} from "./searchRecommendedResultsForOrcid.component";
|
||||
import {FreeGuard} from "../../openaireLibrary/login/freeGuard.guard";
|
||||
import {LoginGuard} from "../../openaireLibrary/login/loginGuard.guard";
|
||||
import {properties} from "../../../environments/environment";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forChild([
|
||||
// { path: '', component: OpenaireSearchMyResultsInOrcidComponent, canActivate: [IsRouteEnabled], data: {
|
||||
{ path: '', component: OpenaireSearchRecommendedResultsForOrcidComponent,
|
||||
canActivate: [LoginGuard], data: {
|
||||
redirect: properties.errorLink, community : 'openaire'
|
||||
},
|
||||
canDeactivate: [PreviousRouteRecorder]
|
||||
}
|
||||
|
||||
])
|
||||
]
|
||||
})
|
||||
export class SearchRecommendedResultsForOrcidRoutingModule { }
|
|
@ -1,18 +0,0 @@
|
|||
import {Component} from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'openaire-search-recommended-results-for-orcid',
|
||||
template: `
|
||||
<div class="uk-section">
|
||||
<search-recommended-results-for-orcid></search-recommended-results-for-orcid>
|
||||
</div>
|
||||
`
|
||||
})
|
||||
|
||||
export class OpenaireSearchRecommendedResultsForOrcidComponent {
|
||||
|
||||
constructor() {}
|
||||
|
||||
public ngOnInit() {}
|
||||
}
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import {OpenaireSearchRecommendedResultsForOrcidComponent} from "./searchRecommendedResultsForOrcid.component";
|
||||
import {PreviousRouteRecorder} from "../../openaireLibrary/utils/piwik/previousRouteRecorder.guard";
|
||||
import {IsRouteEnabled} from "../../openaireLibrary/error/isRouteEnabled.guard";
|
||||
import {SearchRecommendedResultsForOrcidModule} from "../../openaireLibrary/orcid/recommend-orcid-links/searchRecommendedResultsForOrcid.module";
|
||||
import {SearchRecommendedResultsForOrcidRoutingModule} from "./searchRecommendedResultsForOrcid-routing.module";
|
||||
import {FreeGuard} from "../../openaireLibrary/login/freeGuard.guard";
|
||||
import {LoginGuard} from "../../openaireLibrary/login/loginGuard.guard";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule,
|
||||
SearchRecommendedResultsForOrcidModule,
|
||||
SearchRecommendedResultsForOrcidRoutingModule
|
||||
],
|
||||
declarations: [
|
||||
OpenaireSearchRecommendedResultsForOrcidComponent
|
||||
],
|
||||
exports: [
|
||||
OpenaireSearchRecommendedResultsForOrcidComponent
|
||||
],
|
||||
// providers: [PreviousRouteRecorder, IsRouteEnabled]
|
||||
providers: [PreviousRouteRecorder, LoginGuard]
|
||||
})
|
||||
export class LibSearchRecommendedResultsForOrcidModule { }
|
|
@ -19,6 +19,7 @@ let props: EnvProperties = {
|
|||
helpdeskEmail: 'oamonitor.ireland@openaire.eu',
|
||||
admins: ['oamonitor.ireland@openaire.eu'],
|
||||
useHelpTexts: true,
|
||||
orcidDiscoverLinksPage: "/orcid-discover-links"
|
||||
}
|
||||
|
||||
export let properties: EnvProperties = {
|
||||
|
|
|
@ -24,6 +24,8 @@ let props: EnvProperties = {
|
|||
helpdeskEmail: 'oamonitor.ireland@openaire.eu',
|
||||
admins: ['oamonitor.ireland@openaire.eu'],
|
||||
useHelpTexts: true,
|
||||
orcidDiscoverLinksPage: "/orcid-discover-links"
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ let props: EnvProperties = {
|
|||
afterLoginRedirectLink: "/user-policy",
|
||||
helpdeskEmail: 'oamonitor.ireland@openaire.eu',
|
||||
useHelpTexts: true,
|
||||
useCache:false
|
||||
orcidDiscoverLinksPage: "/orcid-discover-links"
|
||||
}
|
||||
|
||||
export let properties: EnvProperties = {
|
||||
|
|
Loading…
Reference in New Issue