Revision 56059
Added by Argiro Kokogiannaki over 5 years ago
modules/uoa-services-library/trunk/ng-openaire-library/src/app/services/organization.service.ts | ||
---|---|---|
99 | 99 |
} |
100 | 100 |
|
101 | 101 |
if(!this.organizationInfo.projects.has(relation['funding']['funder'].name)) { |
102 |
this.organizationInfo.projects.set(relation['funding']['funder'].name, |
|
102 |
this.organizationInfo.projects.setValues(relation['funding']['funder'].name,
|
|
103 | 103 |
new Array<{ "name": string, "id": string, "code": string, |
104 | 104 |
"acronym": string, "funder": string, "funderId": string, |
105 | 105 |
"fundingStream": string, "fundingLevel1": string, "fundingLevel2": string, |
modules/uoa-services-library/trunk/ng-openaire-library/src/app/services/searchOrganizations.service.ts | ||
---|---|---|
182 | 182 |
return this.numOfOrganizations(url, properties); |
183 | 183 |
} |
184 | 184 |
|
185 |
numOfSearchOrganizations(params: string, properties:EnvProperties ):any { |
|
185 |
numOfSearchOrganizations(params: string, properties:EnvProperties, refineParams:string=null ):any {
|
|
186 | 186 |
let url = properties.searchAPIURLLAst+"organizations/count?format=json"; |
187 | 187 |
if(params != "") { |
188 | 188 |
url += "&q=" + StringUtils.URIEncode(params); |
189 | 189 |
} |
190 |
if(refineParams!= null && refineParams != '' ) { |
|
191 |
url += refineParams; |
|
192 |
} |
|
190 | 193 |
return this.numOfOrganizations(url, properties); |
191 | 194 |
} |
192 | 195 |
} |
modules/uoa-services-library/trunk/ng-openaire-library/src/app/landingPages/publication/publication.component.html | ||
---|---|---|
427 | 427 |
</li> |
428 | 428 |
</ul> |
429 | 429 |
|
430 |
<button class=" uk-button portal-button uk-width-1-1 "> |
|
430 |
<button *ngIf="isRouteAvailable('/participate/direct-claim') " class=" uk-button portal-button uk-width-1-1 ">
|
|
431 | 431 |
<span class="uk-icon"> |
432 | 432 |
<svg icon="link" ratio="1" xmlns="http://www.w3.org/2000/svg" width="25" viewBox="0 0 20 20" height="25"><path d="M10.625,12.375 L7.525,15.475 C6.825,16.175 5.925,16.175 5.225,15.475 L4.525,14.775 C3.825,14.074 3.825,13.175 4.525,12.475 L7.625,9.375" fill="none" stroke="#000" stroke-width="1.1"></path><path d="M9.325,7.375 L12.425,4.275 C13.125,3.575 14.025,3.575 14.724,4.275 L15.425,4.975 C16.125,5.675 16.125,6.575 15.425,7.275 L12.325,10.375" fill="none" stroke="#000" stroke-width="1.1"></path><path d="M7.925,11.875 L11.925,7.975" fill="none" stroke="#000" stroke-width="1.1"></path></svg> |
433 | 433 |
</span> Link this publication to... |
434 | 434 |
</button> |
435 | 435 |
|
436 |
<div class=" uk-margin-remove-top uk-padding-small" uk-dropdown="pos: bottom-left; mode:click" style="background: transparent !important;box-shadow: none; max-width: 70px !important; min-width: 70px !important;"> |
|
436 |
<div *ngIf="isRouteAvailable('/participate/direct-claim')" class=" uk-margin-remove-top uk-padding-small" |
|
437 |
uk-dropdown="pos: bottom-left; mode:click" style="background: transparent !important;box-shadow: none; max-width: 70px !important; min-width: 70px !important;"> |
|
437 | 438 |
<ul class="uk-iconnav uk-iconnav-vertical"> |
438 | 439 |
<li uk-tooltip="pos:right;" title="<div class='tooltip-custom-font-size '>Projects</div>"> |
439 | 440 |
<a class=" uk-icon-button portal-button shadowBox" style="padding: 6px;" [queryParams]="routerHelper.createQueryParams(['id','type','linkTo'],[articleId,'publication','project'])" routerLinkActive="router-link-active" routerLink="/participate/direct-claim"> |
modules/uoa-services-library/trunk/ng-openaire-library/src/app/landingPages/software/software.component.html | ||
---|---|---|
242 | 242 |
</li--> |
243 | 243 |
|
244 | 244 |
</ul> |
245 |
<button class=" uk-button portal-button uk-width-1-1 "> |
|
245 |
<button *ngIf="isRouteAvailable('/participate/direct-claim') " class=" uk-button portal-button uk-width-1-1 ">
|
|
246 | 246 |
<span class="uk-icon"> |
247 | 247 |
<svg icon="link" ratio="1" xmlns="http://www.w3.org/2000/svg" width="25" viewBox="0 0 20 20" height="25"><path d="M10.625,12.375 L7.525,15.475 C6.825,16.175 5.925,16.175 5.225,15.475 L4.525,14.775 C3.825,14.074 3.825,13.175 4.525,12.475 L7.625,9.375" fill="none" stroke="#000" stroke-width="1.1"></path><path d="M9.325,7.375 L12.425,4.275 C13.125,3.575 14.025,3.575 14.724,4.275 L15.425,4.975 C16.125,5.675 16.125,6.575 15.425,7.275 L12.325,10.375" fill="none" stroke="#000" stroke-width="1.1"></path><path d="M7.925,11.875 L11.925,7.975" fill="none" stroke="#000" stroke-width="1.1"></path></svg> |
248 | 248 |
</span> Link this software to... |
249 | 249 |
</button> |
250 | 250 |
|
251 |
<div uk-dropdown="pos: bottom-left; mode:click" style="background: transparent !important;box-shadow: none; max-width: 70px !important; min-width: 70px !important;"> |
|
251 |
<div *ngIf="isRouteAvailable('/participate/direct-claim') " uk-dropdown="pos: bottom-left; mode:click" style="background: transparent !important;box-shadow: none; max-width: 70px !important; min-width: 70px !important;">
|
|
252 | 252 |
<ul class="uk-iconnav uk-iconnav-vertical"> |
253 | 253 |
<li uk-tooltip="pos:right;" title="<div class='tooltip-custom-font-size '>Projects</div>"> |
254 | 254 |
<a class=" uk-icon-button portal-button shadowBox" style="padding: 6px;" [queryParams]="routerHelper.createQueryParams(['id','type','linkTo'],[softwareId,'software','project'])" routerLinkActive="router-link-active" routerLink="/participate/direct-claim" > |
modules/uoa-services-library/trunk/ng-openaire-library/src/app/searchPages/find/search.component.html | ||
---|---|---|
155 | 155 |
</search-result> |
156 | 156 |
</div> |
157 | 157 |
<div *ngIf = "keyword.length == 0 && activeTab=='publications'" class ="uk-animation-fade" > |
158 |
<browse-entities [(properties)]=properties entityName="publication" baseUrl="/search/find/publications" [refineFields]=searchFields.RESULT_REFINE_FIELDS [connectCommunityId]=connectCommunityId ></browse-entities>
|
|
158 |
<browse-entities [(properties)]=properties entityName="publication" baseUrl="/search/find/publications" [refineFields]=searchFields.RESULT_REFINE_FIELDS [connectCommunityId]=connectCommunityId [customFilter]="customFilter"></browse-entities>
|
|
159 | 159 |
</div> |
160 | 160 |
<!--/li> |
161 | 161 |
<li--> |
... | ... | |
175 | 175 |
</search-result> |
176 | 176 |
</div> |
177 | 177 |
<div *ngIf = "keyword.length == 0 && activeTab=='research data'" class ="uk-animation-fade"> |
178 |
<browse-entities [(properties)]=properties entityName="dataset" baseUrl="/search/find/datasets" [refineFields]=searchFields.RESULT_REFINE_FIELDS [connectCommunityId]=connectCommunityId ></browse-entities>
|
|
178 |
<browse-entities [(properties)]=properties entityName="dataset" baseUrl="/search/find/datasets" [refineFields]=searchFields.RESULT_REFINE_FIELDS [connectCommunityId]=connectCommunityId [customFilter]="customFilter"></browse-entities>
|
|
179 | 179 |
</div> |
180 | 180 |
<!--/li> |
181 | 181 |
<li--> |
... | ... | |
194 | 194 |
</search-result> |
195 | 195 |
</div> |
196 | 196 |
<div *ngIf = "keyword.length == 0 && activeTab=='software'" class ="uk-animation-fade"> |
197 |
<browse-entities [(properties)]=properties entityName="software" baseUrl="/search/find/software" [refineFields]=searchFields.RESULT_REFINE_FIELDS [connectCommunityId]=connectCommunityId ></browse-entities>
|
|
197 |
<browse-entities [(properties)]=properties entityName="software" baseUrl="/search/find/software" [refineFields]=searchFields.RESULT_REFINE_FIELDS [connectCommunityId]=connectCommunityId [customFilter]="customFilter"></browse-entities>
|
|
198 | 198 |
</div> |
199 | 199 |
<!--/li> |
200 | 200 |
<li--> |
... | ... | |
213 | 213 |
</search-result> |
214 | 214 |
</div> |
215 | 215 |
<div *ngIf = "keyword.length == 0 && activeTab=='other research products'" class ="uk-animation-fade"> |
216 |
<browse-entities [(properties)]=properties entityName="other" baseUrl="/search/find/other" [refineFields]=searchFields.RESULT_REFINE_FIELDS [connectCommunityId]=connectCommunityId ></browse-entities>
|
|
216 |
<browse-entities [(properties)]=properties entityName="other" baseUrl="/search/find/other" [refineFields]=searchFields.RESULT_REFINE_FIELDS [connectCommunityId]=connectCommunityId [customFilter]="customFilter"></browse-entities>
|
|
217 | 217 |
</div> |
218 | 218 |
<!--/li> |
219 | 219 |
<li--> |
... | ... | |
269 | 269 |
</div> |
270 | 270 |
<search-result [(results)]="fetchOrganizations.results" |
271 | 271 |
[(status)]= "fetchOrganizations.searchUtils.status" showLoading = true |
272 |
type="organization" urlParam="organizationId" [(properties)]=properties> |
|
272 |
type="organization" urlParam="organizationId" [(properties)]=properties >
|
|
273 | 273 |
</search-result> |
274 | 274 |
</div> |
275 | 275 |
<div *ngIf = "keyword.length == 0" class ="uk-animation-fade"> |
276 |
<browse-entities [(properties)]=properties entityName="organization" baseUrl="/search/find/organizations" [refineFields]=searchFields.ORGANIZATION_REFINE_FIELDS></browse-entities> |
|
276 |
<browse-entities [(properties)]=properties entityName="organization" |
|
277 |
baseUrl="/search/find/organizations" [refineFields]=searchFields.ORGANIZATION_REFINE_FIELDS [customFilter]="customFilter"></browse-entities> |
|
277 | 278 |
</div> |
278 | 279 |
|
279 | 280 |
</div> |
modules/uoa-services-library/trunk/ng-openaire-library/src/app/utils/fetchEntitiesClasses/fetchOrps.class.ts | ||
---|---|---|
1 | 1 |
import {SearchOrpsService} from '../../services/searchOrps.service'; |
2 | 2 |
import { ErrorCodes} from '../../utils/properties/errorCodes'; |
3 | 3 |
import {ErrorMessagesComponent} from '../../utils/errorMessages.component'; |
4 |
import {SearchUtilsClass } from '../../searchPages/searchUtils/searchUtils.class';
|
|
4 |
import {SearchCustomFilter, SearchUtilsClass} from '../../searchPages/searchUtils/searchUtils.class';
|
|
5 | 5 |
import {DOI} from '../../utils/string-utils.class'; |
6 | 6 |
import {Subject} from 'rxjs'; |
7 | 7 |
import{EnvProperties} from '../../utils/properties/env-properties'; |
... | ... | |
41 | 41 |
} |
42 | 42 |
|
43 | 43 |
|
44 |
public getResultsByKeyword(keyword:string, page: number, size: number, properties:EnvProperties, connectCommunityId=null){ |
|
44 |
public getResultsByKeyword(keyword:string, page: number, size: number, properties:EnvProperties, connectCommunityId=null, customFilter:SearchCustomFilter=null){
|
|
45 | 45 |
var parameters = ""; |
46 | 46 |
if(keyword.length > 0){ |
47 | 47 |
var DOIs:string[] = DOI.getDOIsFromString(keyword); |
... | ... | |
59 | 59 |
|
60 | 60 |
this.searchUtils.status = this.errorCodes.LOADING; |
61 | 61 |
var refineParams = (connectCommunityId)?("&fq="+StringUtils.URIEncode("communityId exact " + StringUtils.quote((connectCommunityId )))):null; |
62 |
if(customFilter){ |
|
63 |
refineParams = (refineParams?(refineParams+'&'):'')+"&fq="+StringUtils.URIEncode(customFilter.queryFieldName + " exact " + StringUtils.quote((customFilter.valueId ))); |
|
64 |
} |
|
62 | 65 |
this.subResults = this._searchOrpsService.searchOrps(parameters,refineParams, page, size, "", [], properties).subscribe( |
63 | 66 |
data => { |
64 | 67 |
this.searchUtils.totalResults = data[0]; |
modules/uoa-services-library/trunk/ng-openaire-library/src/app/searchPages/find/search.component.ts | ||
---|---|---|
33 | 33 |
import {EnvProperties} from '../../utils/properties/env-properties'; |
34 | 34 |
import { SEOService } from '../../sharedComponents/SEO/SEO.service'; |
35 | 35 |
import {StringUtils} from '../../utils/string-utils.class'; |
36 |
import {SearchCustomFilter} from "../searchUtils/searchUtils.class"; |
|
36 | 37 |
|
37 | 38 |
@Component({ |
38 | 39 |
changeDetection: ChangeDetectionStrategy.Default, |
... | ... | |
101 | 102 |
@Input() logoURL; |
102 | 103 |
@Input() name; |
103 | 104 |
@Input() connectCommunityId =null; |
105 |
@Input() customFilter:SearchCustomFilter= null; |
|
104 | 106 |
@Input() piwikSiteId = null; |
105 | 107 |
@Input() formPlaceholderText = "Search for research results, projects, content providers & organizations in OpenAIRE"; |
106 | 108 |
|
... | ... | |
171 | 173 |
this.showOrganizations = false; |
172 | 174 |
this.showDataProviders = false; |
173 | 175 |
} |
176 |
if((this.customFilter && this.customFilter.queryFieldName=="country")){ |
|
177 |
this.showProjects = false; |
|
178 |
// this.showOrganizations = false; |
|
179 |
this.showDataProviders = false; |
|
180 |
} |
|
174 | 181 |
|
175 | 182 |
this.sub = this.route.queryParams.subscribe(params => { |
176 | 183 |
|
177 | 184 |
this.reloadTabs(); |
178 | 185 |
this.keyword = (params['keyword'])?params['keyword']:""; |
179 | 186 |
if(this.keyword !=null && this.keyword.length > 0){ |
180 |
//if showPublications == false will set another entity as the first |
|
187 |
//if showPublications == false will setValues another entity as the first
|
|
181 | 188 |
if(this.showPublications){ |
182 | 189 |
this.activeTab = "publications"; |
183 | 190 |
this.searchPublications(); |
... | ... | |
249 | 256 |
this.fetchPublications.searchUtils.status != this.errorCodes.NONE /*&& |
250 | 257 |
this.fetchPublications.searchUtils.status != this.errorCodes.ERROR*/) { |
251 | 258 |
this.reloadPublications = false; |
252 |
this.fetchPublications.getResultsByKeyword(this.keyword, 1, 10,this.properties, this.connectCommunityId); |
|
259 |
this.fetchPublications.getResultsByKeyword(this.keyword, 1, 10,this.properties, this.connectCommunityId, this.customFilter);
|
|
253 | 260 |
this.linkToSearchPublications = this.properties.searchLinkToPublications;// + "?keyword=" + this.keyword; |
254 | 261 |
} |
255 | 262 |
} |
... | ... | |
260 | 267 |
this.fetchDatasets.searchUtils.status != this.errorCodes.NONE /*&& |
261 | 268 |
this.fetchDatasets.searchUtils.status != this.errorCodes.ERROR*/) { |
262 | 269 |
this.reloadDatasets = false; |
263 |
this.fetchDatasets.getResultsByKeyword(this.keyword, 1, 10,this.properties, this.connectCommunityId); |
|
270 |
this.fetchDatasets.getResultsByKeyword(this.keyword, 1, 10,this.properties, this.connectCommunityId, this.customFilter);
|
|
264 | 271 |
this.linkToSearchDatasets =this.properties.searchLinkToDatasets;// + "?keyword=" + this.keyword; |
265 | 272 |
} |
266 | 273 |
} |
... | ... | |
273 | 280 |
( this.fetchSoftware.searchUtils.status == this.errorCodes.LOADING || |
274 | 281 |
this.fetchSoftware.searchUtils.status == this.errorCodes.DONE )*/) { |
275 | 282 |
this.reloadSoftware = false; |
276 |
this.fetchSoftware.getResultsByKeyword(this.keyword, 1, 10,this.properties, this.connectCommunityId); |
|
283 |
this.fetchSoftware.getResultsByKeyword(this.keyword, 1, 10,this.properties, this.connectCommunityId, this.customFilter);
|
|
277 | 284 |
this.linkToSearchSoftware = this.properties.searchLinkToSoftware;// + "?keyword=" + this.keyword; |
278 | 285 |
} |
279 | 286 |
} |
... | ... | |
284 | 291 |
this.fetchOrps.searchUtils.status != this.errorCodes.NONE /*&& |
285 | 292 |
this.fetchOrps.searchUtils.status != this.errorCodes.ERROR*/) { |
286 | 293 |
this.reloadOrps = false; |
287 |
this.fetchOrps.getResultsByKeyword(this.keyword, 1, 10,this.properties, this.connectCommunityId); |
|
294 |
this.fetchOrps.getResultsByKeyword(this.keyword, 1, 10,this.properties, this.connectCommunityId, this.customFilter);
|
|
288 | 295 |
this.linkToSearchOrps =this.properties.searchLinkToOrps; |
289 | 296 |
} |
290 | 297 |
} |
... | ... | |
356 | 363 |
|
357 | 364 |
private count() { |
358 | 365 |
var refineParams = this.connectCommunityId?("&fq="+StringUtils.URIEncode("communityId exact " + StringUtils.quote((this.connectCommunityId )))):null; |
366 |
if(this.customFilter){ |
|
367 |
refineParams = (refineParams?(refineParams+'&'):'')+"&fq="+StringUtils.URIEncode(this.customFilter.queryFieldName + " exact " + StringUtils.quote((this.customFilter.valueId ))); |
|
368 |
} |
|
359 | 369 |
if(this.activeTab != "publications" && this.showPublications){ |
360 | 370 |
this.fetchPublications.searchUtils.status = this.errorCodes.LOADING; |
361 | 371 |
this.fetchPublications.results = []; |
modules/uoa-services-library/trunk/ng-openaire-library/src/app/searchPages/advanced/advancedSearchOrps.component.ts | ||
---|---|---|
8 | 8 |
import {ErrorMessagesComponent} from '../../utils/errorMessages.component'; |
9 | 9 |
import {AdvancedSearchPageComponent} from '../searchUtils/advancedSearchPage.component'; |
10 | 10 |
import {SearchFields, FieldDetails} from '../../utils/properties/searchFields'; |
11 |
import {SearchUtilsClass } from '../searchUtils/searchUtils.class';
|
|
11 |
import {SearchCustomFilter, SearchUtilsClass} from '../searchUtils/searchUtils.class';
|
|
12 | 12 |
import{EnvProperties} from '../../utils/properties/env-properties'; |
13 | 13 |
|
14 | 14 |
|
... | ... | |
38 | 38 |
properties:EnvProperties; |
39 | 39 |
@Input() piwikSiteId = null; |
40 | 40 |
@Input() connectCommunityId: string; |
41 |
@Input() customFilter:SearchCustomFilter= null; |
|
42 |
|
|
41 | 43 |
public results =[]; |
42 | 44 |
public filters =[]; |
43 | 45 |
|
... | ... | |
100 | 102 |
this.searchPage.selectedFields = this.selectedFields; |
101 | 103 |
this.searchPage.fieldIdsMap = this.fieldIdsMap; |
102 | 104 |
this.searchPage.connectCommunityId = this.connectCommunityId; |
105 |
this.searchPage.customFilter = this.customFilter; |
|
103 | 106 |
this.searchPage.getSelectedFiltersFromUrl(params); |
104 | 107 |
this.getResults(this.searchPage.createQueryParameters(), this.searchUtils.page, this.searchUtils.size, this.searchUtils.sortBy); |
105 | 108 |
|
modules/uoa-services-library/trunk/ng-openaire-library/src/app/utils/fetchEntitiesClasses/fetchSoftware.class.ts | ||
---|---|---|
1 | 1 |
import {SearchSoftwareService} from '../../services/searchSoftware.service'; |
2 | 2 |
import { ErrorCodes} from '../../utils/properties/errorCodes'; |
3 | 3 |
import {ErrorMessagesComponent} from '../../utils/errorMessages.component'; |
4 |
import {SearchUtilsClass } from '../../searchPages/searchUtils/searchUtils.class';
|
|
4 |
import {SearchCustomFilter, SearchUtilsClass} from '../../searchPages/searchUtils/searchUtils.class';
|
|
5 | 5 |
import {DOI} from '../../utils/string-utils.class'; |
6 | 6 |
import {Subject} from 'rxjs'; |
7 | 7 |
import{EnvProperties} from '../../utils/properties/env-properties'; |
... | ... | |
41 | 41 |
} |
42 | 42 |
|
43 | 43 |
|
44 |
public getResultsByKeyword(keyword:string, page: number, size: number, properties:EnvProperties, connectCommunityId=null){ |
|
44 |
public getResultsByKeyword(keyword:string, page: number, size: number, properties:EnvProperties, connectCommunityId=null, customFilter:SearchCustomFilter=null){
|
|
45 | 45 |
var parameters = ""; |
46 | 46 |
if(keyword.length > 0){ |
47 | 47 |
var DOIs:string[] = DOI.getDOIsFromString(keyword); |
... | ... | |
60 | 60 |
//var errorCodes:ErrorCodes = new ErrorCodes(); |
61 | 61 |
this.searchUtils.status = this.errorCodes.LOADING; |
62 | 62 |
var refineParams = (connectCommunityId)?("&fq="+StringUtils.URIEncode("communityId exact " + StringUtils.quote((connectCommunityId )))):null; |
63 |
|
|
63 |
if(customFilter){ |
|
64 |
refineParams = (refineParams?(refineParams+'&'):'')+"&fq="+StringUtils.URIEncode(customFilter.queryFieldName + " exact " + StringUtils.quote((customFilter.valueId ))); |
|
65 |
} |
|
64 | 66 |
this.subResults = this._searchSoftwareService.searchSoftware(parameters,refineParams, page, size, "", [], properties).subscribe( |
65 | 67 |
data => { |
66 | 68 |
this.searchUtils.totalResults = data[0]; |
modules/uoa-services-library/trunk/ng-openaire-library/src/app/sharedComponents/navigationBar.component.ts | ||
---|---|---|
20 | 20 |
// @Input() logOutUrl; |
21 | 21 |
// @Input() APIUrl; |
22 | 22 |
@Input() communityId; |
23 |
// @Input() cookieDomain;
|
|
23 |
@Input() showCommunityName:boolean = false;
|
|
24 | 24 |
@Input() userMenuItems:MenuItem[] ; |
25 | 25 |
@Input() menuItems:RootMenuItem [] ; |
26 | 26 |
@Input() community: {id:string, name:string, logoUrl:string}; |
modules/uoa-services-library/trunk/ng-openaire-library/src/app/searchPages/advanced/advancedSearchOrganizations.component.ts | ||
---|---|---|
8 | 8 |
import {ErrorMessagesComponent} from '../../utils/errorMessages.component'; |
9 | 9 |
import {AdvancedSearchPageComponent} from '../searchUtils/advancedSearchPage.component'; |
10 | 10 |
import {SearchFields, FieldDetails} from '../../utils/properties/searchFields'; |
11 |
import {SearchUtilsClass } from '../searchUtils/searchUtils.class';
|
|
11 |
import {SearchCustomFilter, SearchUtilsClass} from '../searchUtils/searchUtils.class';
|
|
12 | 12 |
import{EnvProperties} from '../../utils/properties/env-properties'; |
13 | 13 |
|
14 | 14 |
|
... | ... | |
52 | 52 |
public isPiwikEnabled; |
53 | 53 |
|
54 | 54 |
@ViewChild (AdvancedSearchPageComponent) searchPage : AdvancedSearchPageComponent ; |
55 |
@Input() customFilter:SearchCustomFilter= null; |
|
55 | 56 |
|
56 | 57 |
public resourcesQuery = "(oaftype exact organization)"; |
57 | 58 |
constructor (private route: ActivatedRoute, private _searchOrganizationsService: SearchOrganizationsService ) { |
... | ... | |
93 | 94 |
this.selectedFields =[]; |
94 | 95 |
this.searchPage.selectedFields = this.selectedFields; |
95 | 96 |
this.searchPage.fieldIdsMap = this.fieldIdsMap; |
97 |
this.searchPage.customFilter = this.customFilter; |
|
96 | 98 |
this.searchPage.getSelectedFiltersFromUrl(params); |
97 | 99 |
this.getResults(this.searchPage.createQueryParameters(), this.searchUtils.page, this.searchUtils.size); |
98 | 100 |
|
modules/uoa-services-library/trunk/ng-openaire-library/src/app/searchPages/advanced/advancedSearchDatasets.component.ts | ||
---|---|---|
8 | 8 |
import {ErrorMessagesComponent} from '../../utils/errorMessages.component'; |
9 | 9 |
import {AdvancedSearchPageComponent} from '../searchUtils/advancedSearchPage.component'; |
10 | 10 |
import {SearchFields, FieldDetails} from '../../utils/properties/searchFields'; |
11 |
import {SearchUtilsClass } from '../searchUtils/searchUtils.class';
|
|
11 |
import {SearchCustomFilter, SearchUtilsClass} from '../searchUtils/searchUtils.class';
|
|
12 | 12 |
import{EnvProperties} from '../../utils/properties/env-properties'; |
13 | 13 |
|
14 | 14 |
|
... | ... | |
38 | 38 |
properties:EnvProperties; |
39 | 39 |
@Input() piwikSiteId = null; |
40 | 40 |
@Input() connectCommunityId: string; |
41 |
@Input() customFilter:SearchCustomFilter= null; |
|
42 |
|
|
41 | 43 |
public results =[]; |
42 | 44 |
public filters =[]; |
43 | 45 |
|
... | ... | |
100 | 102 |
this.searchPage.selectedFields = this.selectedFields; |
101 | 103 |
this.searchPage.fieldIdsMap = this.fieldIdsMap; |
102 | 104 |
this.searchPage.connectCommunityId = this.connectCommunityId; |
105 |
this.searchPage.customFilter = this.customFilter; |
|
103 | 106 |
this.searchPage.getSelectedFiltersFromUrl(params); |
104 | 107 |
this.getResults(this.searchPage.createQueryParameters(), this.searchUtils.page, this.searchUtils.size, this.searchUtils.sortBy); |
105 | 108 |
|
modules/uoa-services-library/trunk/ng-openaire-library/src/app/searchPages/advanced/advancedSearchSoftware.component.ts | ||
---|---|---|
8 | 8 |
import {ErrorMessagesComponent} from '../../utils/errorMessages.component'; |
9 | 9 |
import {AdvancedSearchPageComponent} from '../searchUtils/advancedSearchPage.component'; |
10 | 10 |
import {SearchFields, FieldDetails} from '../../utils/properties/searchFields'; |
11 |
import {SearchUtilsClass } from '../searchUtils/searchUtils.class';
|
|
11 |
import {SearchCustomFilter, SearchUtilsClass} from '../searchUtils/searchUtils.class';
|
|
12 | 12 |
import{EnvProperties} from '../../utils/properties/env-properties'; |
13 | 13 |
|
14 | 14 |
|
... | ... | |
37 | 37 |
private errorMessages: ErrorMessagesComponent; |
38 | 38 |
@Input() piwikSiteId = null; |
39 | 39 |
@Input() connectCommunityId: string; |
40 |
@Input() customFilter:SearchCustomFilter= null; |
|
40 | 41 |
public results =[]; |
41 | 42 |
public filters =[]; |
42 | 43 |
|
... | ... | |
101 | 102 |
this.searchPage.selectedFields = this.selectedFields; |
102 | 103 |
this.searchPage.fieldIdsMap = this.fieldIdsMap; |
103 | 104 |
this.searchPage.connectCommunityId = this.connectCommunityId; |
105 |
this.searchPage.customFilter = this.customFilter; |
|
104 | 106 |
this.searchPage.getSelectedFiltersFromUrl(params); |
105 | 107 |
this.getResults(this.searchPage.createQueryParameters(), this.searchUtils.page, this.searchUtils.size, this.searchUtils.sortBy); |
106 | 108 |
|
modules/uoa-services-library/trunk/ng-openaire-library/src/app/searchPages/advanced/advancedSearchPublications.component.ts | ||
---|---|---|
8 | 8 |
import {ErrorMessagesComponent} from '../../utils/errorMessages.component'; |
9 | 9 |
import {AdvancedSearchPageComponent} from '../searchUtils/advancedSearchPage.component'; |
10 | 10 |
import {SearchFields, FieldDetails} from '../../utils/properties/searchFields'; |
11 |
import {SearchUtilsClass } from '../searchUtils/searchUtils.class';
|
|
11 |
import {SearchCustomFilter, SearchUtilsClass} from '../searchUtils/searchUtils.class';
|
|
12 | 12 |
import{EnvProperties} from '../../utils/properties/env-properties'; |
13 | 13 |
|
14 | 14 |
|
... | ... | |
53 | 53 |
public oldTotalResults: number = 0; |
54 | 54 |
@Input() openaireLink: string ; |
55 | 55 |
@Input() connectCommunityId: string; |
56 |
@Input() customFilter:SearchCustomFilter= null; |
|
56 | 57 |
public pagingLimit: number = 0; |
57 | 58 |
public isPiwikEnabled; |
58 | 59 |
public sort: boolean = true; |
... | ... | |
105 | 106 |
this.searchPage.selectedFields = this.selectedFields; |
106 | 107 |
this.searchPage.fieldIdsMap = this.fieldIdsMap; |
107 | 108 |
this.searchPage.connectCommunityId = this.connectCommunityId; |
109 |
this.searchPage.customFilter = this.customFilter; |
|
108 | 110 |
this.searchPage.getSelectedFiltersFromUrl(params); |
109 | 111 |
this.getResults(this.searchPage.createQueryParameters(), this.searchUtils.page, this.searchUtils.size, this.searchUtils.sortBy); |
110 | 112 |
}); |
modules/uoa-services-library/trunk/ng-openaire-library/src/app/searchPages/searchUtils/searchUtils.class.ts | ||
---|---|---|
8 | 8 |
totalResultsNoFilters:number; // for organization landing - tab with projects |
9 | 9 |
sortBy: string = ""; |
10 | 10 |
} |
11 |
|
|
12 |
export class SearchCustomFilter{ |
|
13 |
fieldName:string; //Country |
|
14 |
queryFieldName:string; //country |
|
15 |
valueId:string; //gr |
|
16 |
valueName:string; // Greece |
|
17 |
isApplied:boolean; |
|
18 |
constructor( fieldName:string, queryFieldName:string, valueId:string, valueName:string ){ |
|
19 |
this.isApplied = true; |
|
20 |
|
|
21 |
this.fieldName = fieldName; |
|
22 |
this.queryFieldName = queryFieldName; |
|
23 |
this.valueId = valueId; |
|
24 |
this.valueName = valueName; |
|
25 |
} |
|
26 |
// public setFilter(filter:SearchCustomFilter){ |
|
27 |
// if(!filter){ |
|
28 |
// return; |
|
29 |
// } |
|
30 |
// this.fieldName = filter.fieldName; |
|
31 |
// this.queryFieldName = filter.queryFieldName; |
|
32 |
// this.valueId = filter.valueId; |
|
33 |
// this.valueName = filter.valueName; |
|
34 |
// } |
|
35 |
} |
modules/uoa-services-library/trunk/ng-openaire-library/src/app/searchPages/searchUtils/browseEntities.component.ts | ||
---|---|---|
9 | 9 |
import {ErrorMessagesComponent} from '../../utils/errorMessages.component'; |
10 | 10 |
import {SearchFields, FieldDetails} from '../../utils/properties/searchFields'; |
11 | 11 |
import {SearchPageComponent } from '../searchUtils/searchPage.component'; |
12 |
import {SearchUtilsClass} from '../searchUtils/searchUtils.class'; |
|
12 |
import {SearchCustomFilter, SearchUtilsClass} from '../searchUtils/searchUtils.class';
|
|
13 | 13 |
import{EnvProperties} from '../../utils/properties/env-properties'; |
14 | 14 |
import {StringUtils} from '../../utils/string-utils.class'; |
15 | 15 |
|
... | ... | |
24 | 24 |
<div *ngIf="status == errorCodes.NOT_FOUND" class="uk-alert uk-alert-danger" role="alert">No filters found</div--> |
25 | 25 |
<errorMessages [status]="[status]" [type]="'results'"></errorMessages> |
26 | 26 |
|
27 |
<div class ="uk-grid"> |
|
27 |
<div class ="uk-grid" *ngIf="status ===errorCodes.DONE">
|
|
28 | 28 |
<div *ngFor= "let filter of filters" class = "uk-margin-bottom uk-width-1-3@l uk-width-1-3@m uk-width-1-2@s"> |
29 | 29 |
<browse-statistic [baseUrl]=baseUrl [filter]=filter ></browse-statistic> |
30 | 30 |
</div> |
... | ... | |
41 | 41 |
@Input() public refineFields: string[] ;//= this.searchFields.RESULT_REFINE_FIELDS; |
42 | 42 |
@Input() properties:EnvProperties; |
43 | 43 |
@Input() connectCommunityId =null; |
44 |
@Input() customFilter:SearchCustomFilter= null; |
|
44 | 45 |
|
45 | 46 |
public sub: any; |
46 | 47 |
public errorCodes:ErrorCodes = new ErrorCodes(); |
... | ... | |
74 | 75 |
|
75 | 76 |
this.status = this.errorCodes.LOADING; |
76 | 77 |
var refineParams = this.connectCommunityId?("&fq="+StringUtils.URIEncode("communityId exact " + StringUtils.quote((this.connectCommunityId )))):null; |
77 |
|
|
78 |
if(this.customFilter){ |
|
79 |
refineParams = (refineParams?(refineParams+'&'):'')+"&fq="+StringUtils.URIEncode(this.customFilter.queryFieldName + " exact " + StringUtils.quote((this.customFilter.valueId ))); |
|
80 |
} |
|
78 | 81 |
this.sub = this._refineFieldsService.getRefineFieldsResultsByEntityName(this.refineFields,this.entityName, this.properties,refineParams).subscribe( |
79 | 82 |
data => { |
80 | 83 |
//console.info("Get Stats for "+this.entityName+ ": [Total:"+data[0]+" ] [fields: "+data[1].length+"]"); |
modules/uoa-services-library/trunk/ng-openaire-library/src/app/searchPages/searchUtils/searchPage.component.ts | ||
---|---|---|
7 | 7 |
|
8 | 8 |
import {Filter, Value} from './searchHelperClasses.class'; |
9 | 9 |
import {SearchFields} from '../../utils/properties/searchFields'; |
10 |
import {SearchUtilsClass} from './searchUtils.class';
|
|
10 |
import {SearchCustomFilter, SearchUtilsClass} from './searchUtils.class';
|
|
11 | 11 |
import {DOI, StringUtils} from '../../utils/string-utils.class'; |
12 | 12 |
import {RouterHelper} from '../../utils/routerHelper.class'; |
13 | 13 |
import {ModalLoading} from '../../utils/modal/loading.component'; |
... | ... | |
48 | 48 |
@Input() searchFormClass: string = "searchForm"; |
49 | 49 |
@Input() openaireLink: string; |
50 | 50 |
@Input() connectCommunityId: string; |
51 |
@Input() customFilter:SearchCustomFilter= null; |
|
51 | 52 |
@Input() sort: boolean = false; |
52 | 53 |
@Input() mapUrl: string = ""; |
53 | 54 |
@Input() mapTooltipType: string ="content providers"; |
... | ... | |
175 | 176 |
if(this.connectCommunityId ){ |
176 | 177 |
allFqs+= "&fq="+StringUtils.URIEncode("communityId exact " + StringUtils.quote((this.connectCommunityId ))); |
177 | 178 |
} |
178 |
|
|
179 |
if(this.customFilter){ |
|
180 |
allFqs+= "&fq="+StringUtils.URIEncode(this.customFilter.queryFieldName + " exact " + StringUtils.quote((this.customFilter.valueId ))); |
|
181 |
} |
|
179 | 182 |
var keyword = params['keyword']; |
180 | 183 |
var doiQuery = ""; |
181 | 184 |
var keywordQuery = ""; |
modules/uoa-services-library/trunk/ng-openaire-library/src/app/searchPages/searchUtils/advancedSearchPage.component.ts | ||
---|---|---|
9 | 9 |
import {Filter, Value, AdvancedField} from '../searchUtils/searchHelperClasses.class'; |
10 | 10 |
import {SearchResult} from '../../utils/entities/searchResult'; |
11 | 11 |
import {SearchFields, FieldDetails} from '../../utils/properties/searchFields'; |
12 |
import {SearchUtilsClass} from './searchUtils.class';
|
|
12 |
import {SearchCustomFilter, SearchUtilsClass} from './searchUtils.class';
|
|
13 | 13 |
import {ModalLoading} from '../../utils/modal/loading.component'; |
14 | 14 |
import {StringUtils, Dates} from '../../utils/string-utils.class'; |
15 | 15 |
import {ErrorCodes} from '../../utils/properties/errorCodes'; |
... | ... | |
43 | 43 |
@Input() oldTotalResults: number = 0; |
44 | 44 |
@Input() openaireLink: string; |
45 | 45 |
@Input() connectCommunityId: string; |
46 |
@Input() customFilter:SearchCustomFilter= null; |
|
46 | 47 |
@Input() sort: boolean = false; |
47 | 48 |
@Input() searchFormClass: string = "searchForm"; |
48 | 49 |
piwiksub: any; |
... | ... | |
256 | 257 |
//community |
257 | 258 |
if(this.connectCommunityId ){ |
258 | 259 |
params += (countParams == 0 ? "" : " and " ) + "communityId exact "+'"' + this.connectCommunityId +'"' + " "; |
260 |
countParams++; |
|
259 | 261 |
} |
262 |
if(this.customFilter){ |
|
263 |
params+= (countParams == 0 ? "" : " and " ) + this.customFilter.queryFieldName + " exact " + StringUtils.quote((this.customFilter.valueId )); |
|
264 |
} |
|
260 | 265 |
return params; |
261 | 266 |
|
262 | 267 |
} |
modules/uoa-services-library/trunk/ng-openaire-library/src/app/searchPages/simple/searchOrps.component.ts | ||
---|---|---|
9 | 9 |
import {ErrorMessagesComponent} from '../../utils/errorMessages.component'; |
10 | 10 |
import {SearchFields, FieldDetails} from '../../utils/properties/searchFields'; |
11 | 11 |
import {SearchPageComponent } from '../searchUtils/searchPage.component'; |
12 |
import {SearchUtilsClass } from '../searchUtils/searchUtils.class';
|
|
12 |
import {SearchCustomFilter, SearchUtilsClass} from '../searchUtils/searchUtils.class';
|
|
13 | 13 |
import {DOI} from '../../utils/string-utils.class'; |
14 | 14 |
import{EnvProperties} from '../../utils/properties/env-properties'; |
15 | 15 |
|
... | ... | |
45 | 45 |
public baseUrl:string; |
46 | 46 |
@Input() openaireLink: string ; |
47 | 47 |
@Input() connectCommunityId: string; |
48 |
@Input() customFilter:SearchCustomFilter= null; |
|
48 | 49 |
@Input() advancedSearchParameters ; |
49 | 50 |
public searchUtils:SearchUtilsClass = new SearchUtilsClass(); |
50 | 51 |
private sub: any; |
... | ... | |
106 | 107 |
} |
107 | 108 |
|
108 | 109 |
this.searchPage.connectCommunityId = this.connectCommunityId; |
110 |
this.searchPage.customFilter = this.customFilter; |
|
109 | 111 |
var queryParameters = this.searchPage.getQueryParametersFromUrl(params); |
110 | 112 |
this._getResults(queryParameters, refine, this.searchUtils.page, this.searchUtils.size, this.searchUtils.sortBy); |
111 | 113 |
|
modules/uoa-services-library/trunk/ng-openaire-library/src/app/searchPages/simple/searchOrganizations.component.ts | ||
---|---|---|
8 | 8 |
import {ErrorMessagesComponent} from '../../utils/errorMessages.component'; |
9 | 9 |
import {SearchFields, FieldDetails} from '../../utils/properties/searchFields'; |
10 | 10 |
import {SearchPageComponent } from '../searchUtils/searchPage.component'; |
11 |
import {SearchUtilsClass } from '../searchUtils/searchUtils.class';
|
|
11 |
import {SearchCustomFilter, SearchUtilsClass} from '../searchUtils/searchUtils.class';
|
|
12 | 12 |
import{EnvProperties} from '../../utils/properties/env-properties'; |
13 | 13 |
|
14 | 14 |
@Component({ |
... | ... | |
53 | 53 |
pagingLimit = 0; |
54 | 54 |
properties: EnvProperties; |
55 | 55 |
@ViewChild (SearchPageComponent) searchPage : SearchPageComponent ; |
56 |
@Input() customFilter:SearchCustomFilter= null; |
|
56 | 57 |
|
57 | 58 |
constructor (private route: ActivatedRoute, private _searchOrganizationsService: SearchOrganizationsService ) { |
58 | 59 |
|
... | ... | |
93 | 94 |
this.searchUtils.size = 10; |
94 | 95 |
} |
95 | 96 |
|
97 |
this.searchPage.customFilter = this.customFilter; |
|
96 | 98 |
var queryParameters = this.searchPage.getQueryParametersFromUrl(params); |
97 | 99 |
this._getResults(queryParameters, refine, this.searchUtils.page, this.searchUtils.size); |
98 | 100 |
}); |
modules/uoa-services-library/trunk/ng-openaire-library/src/app/searchPages/simple/searchDatasets.component.ts | ||
---|---|---|
9 | 9 |
import {ErrorMessagesComponent} from '../../utils/errorMessages.component'; |
10 | 10 |
import {SearchFields, FieldDetails} from '../../utils/properties/searchFields'; |
11 | 11 |
import {SearchPageComponent } from '../searchUtils/searchPage.component'; |
12 |
import {SearchUtilsClass } from '../searchUtils/searchUtils.class';
|
|
12 |
import {SearchCustomFilter, SearchUtilsClass} from '../searchUtils/searchUtils.class';
|
|
13 | 13 |
import {DOI} from '../../utils/string-utils.class'; |
14 | 14 |
import{EnvProperties} from '../../utils/properties/env-properties'; |
15 | 15 |
|
... | ... | |
47 | 47 |
public baseUrl:string; |
48 | 48 |
@Input() openaireLink: string ; |
49 | 49 |
@Input() connectCommunityId: string; |
50 |
@Input() customFilter:SearchCustomFilter= null; |
|
50 | 51 |
@Input() advancedSearchParameters ; |
51 | 52 |
public searchUtils:SearchUtilsClass = new SearchUtilsClass(); |
52 | 53 |
private sub: any; |
... | ... | |
109 | 110 |
} |
110 | 111 |
|
111 | 112 |
this.searchPage.connectCommunityId = this.connectCommunityId; |
113 |
this.searchPage.customFilter = this.customFilter; |
|
112 | 114 |
var queryParameters = this.searchPage.getQueryParametersFromUrl(params); |
113 | 115 |
this._getResults(queryParameters, refine, this.searchUtils.page, this.searchUtils.size, this.searchUtils.sortBy); |
114 | 116 |
|
modules/uoa-services-library/trunk/ng-openaire-library/src/app/searchPages/simple/searchSoftware.component.ts | ||
---|---|---|
9 | 9 |
import {ErrorMessagesComponent} from '../../utils/errorMessages.component'; |
10 | 10 |
import {SearchFields, FieldDetails} from '../../utils/properties/searchFields'; |
11 | 11 |
import {SearchPageComponent } from '../searchUtils/searchPage.component'; |
12 |
import {SearchUtilsClass } from '../searchUtils/searchUtils.class';
|
|
12 |
import {SearchCustomFilter, SearchUtilsClass} from '../searchUtils/searchUtils.class';
|
|
13 | 13 |
import {DOI} from '../../utils/string-utils.class'; |
14 | 14 |
import{EnvProperties} from '../../utils/properties/env-properties'; |
15 | 15 |
|
... | ... | |
27 | 27 |
[loadPaging]="loadPaging" |
28 | 28 |
[oldTotalResults]="oldTotalResults" |
29 | 29 |
searchFormClass="softwareSearchForm" |
30 |
[(openaireLink)]=openaireLink |
|
30 |
[(openaireLink)]=openaireLinks
|
|
31 | 31 |
[(advancedSearchParameters)]=advancedSearchParameters |
32 | 32 |
[piwikSiteId]=piwikSiteId |
33 | 33 |
[(connectCommunityId)]=connectCommunityId |
... | ... | |
41 | 41 |
private errorMessages: ErrorMessagesComponent; |
42 | 42 |
@Input() openaireLink: string ; |
43 | 43 |
@Input() connectCommunityId: string; |
44 |
@Input() customFilter:SearchCustomFilter= null; |
|
44 | 45 |
@Input() advancedSearchParameters ; |
45 | 46 |
@Input() piwikSiteId = null; |
46 | 47 |
public results =[]; |
... | ... | |
108 | 109 |
} |
109 | 110 |
|
110 | 111 |
this.searchPage.connectCommunityId = this.connectCommunityId; |
112 |
this.searchPage.customFilter = this.customFilter; |
|
111 | 113 |
var queryParameters = this.searchPage.getQueryParametersFromUrl(params); |
112 | 114 |
this._getResults(queryParameters, refine, this.searchUtils.page, this.searchUtils.size, this.searchUtils.sortBy); |
113 | 115 |
|
modules/uoa-services-library/trunk/ng-openaire-library/src/app/searchPages/simple/searchPublications.component.ts | ||
---|---|---|
10 | 10 |
import {ErrorMessagesComponent} from '../../utils/errorMessages.component'; |
11 | 11 |
import {SearchFields, FieldDetails} from '../../utils/properties/searchFields'; |
12 | 12 |
import {SearchPageComponent } from '../searchUtils/searchPage.component'; |
13 |
import {SearchUtilsClass} from '../searchUtils/searchUtils.class'; |
|
13 |
import {SearchCustomFilter, SearchUtilsClass} from '../searchUtils/searchUtils.class';
|
|
14 | 14 |
import {DOI} from '../../utils/string-utils.class'; |
15 | 15 |
import{EnvProperties} from '../../utils/properties/env-properties'; |
16 | 16 |
|
... | ... | |
70 | 70 |
public oldTotalResults: number = 0; |
71 | 71 |
@Input() openaireLink: string; |
72 | 72 |
@Input() connectCommunityId: string; |
73 |
@Input() customFilter:SearchCustomFilter= null; |
|
73 | 74 |
@Input() advancedSearchParameters ; |
74 | 75 |
pagingLimit = 0; |
75 | 76 |
public sort: boolean = true; |
... | ... | |
118 | 119 |
} |
119 | 120 |
|
120 | 121 |
this.searchPage.connectCommunityId = this.connectCommunityId; |
122 |
this.searchPage.customFilter = this.customFilter; |
|
121 | 123 |
var queryParameters = this.searchPage.getQueryParametersFromUrl(params); |
122 | 124 |
this._getResults(queryParameters, refine, this.searchUtils.page, this.searchUtils.size, this.searchUtils.sortBy); |
123 | 125 |
}); |
modules/uoa-services-library/trunk/ng-openaire-library/src/app/landingPages/orp/orp.component.html | ||
---|---|---|
179 | 179 |
|
180 | 180 |
</li> |
181 | 181 |
</ul> |
182 |
<button class=" uk-button portal-button uk-width-1-1 "> |
|
182 |
<button *ngIf="isRouteAvailable('/participate/direct-claim') " class=" uk-button portal-button uk-width-1-1 ">
|
|
183 | 183 |
<span class="uk-icon"> |
184 | 184 |
<svg icon="link" ratio="1" xmlns="http://www.w3.org/2000/svg" width="25" viewBox="0 0 20 20" height="25"><path d="M10.625,12.375 L7.525,15.475 C6.825,16.175 5.925,16.175 5.225,15.475 L4.525,14.775 C3.825,14.074 3.825,13.175 4.525,12.475 L7.625,9.375" fill="none" stroke="#000" stroke-width="1.1"></path><path d="M9.325,7.375 L12.425,4.275 C13.125,3.575 14.025,3.575 14.724,4.275 L15.425,4.975 C16.125,5.675 16.125,6.575 15.425,7.275 L12.325,10.375" fill="none" stroke="#000" stroke-width="1.1"></path><path d="M7.925,11.875 L11.925,7.975" fill="none" stroke="#000" stroke-width="1.1"></path></svg> |
185 | 185 |
</span> Link this product to... |
186 | 186 |
</button> |
187 | 187 |
|
188 |
<div uk-dropdown="pos: bottom-left; mode:click" style="background: transparent !important;box-shadow: none; max-width: 70px !important; min-width: 70px !important;"> |
|
188 |
<div *ngIf="isRouteAvailable('/participate/direct-claim') " uk-dropdown="pos: bottom-left; mode:click" style="background: transparent |
|
189 |
!important;box-shadow: none; max-width: 70px !important; min-width: 70px !important;"> |
|
189 | 190 |
<ul class="uk-iconnav uk-iconnav-vertical"> |
190 | 191 |
<li uk-tooltip="pos:right;" title="<div class='tooltip-custom-font-size '>Projects</div>"> |
191 | 192 |
<a class=" uk-icon-button portal-button shadowBox" style="padding: 6px;" [queryParams]="routerHelper.createQueryParams(['id','type','linkTo'],[orpId,'orp','project'])" routerLinkActive="router-link-active" routerLink="/participate/direct-claim" > |
modules/uoa-services-library/trunk/ng-openaire-library/src/app/landingPages/orp/orp.component.ts | ||
---|---|---|
65 | 65 |
constructor (private _orpService: OrpService, |
66 | 66 |
private _piwikService:PiwikService, |
67 | 67 |
private route: ActivatedRoute, |
68 |
private router: Router, |
|
68 | 69 |
private _meta: Meta, |
69 | 70 |
private _title: Title, |
70 | 71 |
private _router: Router, |
... | ... | |
207 | 208 |
} |
208 | 209 |
return totalPages; |
209 | 210 |
} |
211 |
isRouteAvailable(routeToCheck:string){ |
|
212 |
for (let i = 0; i < this.router.config.length; i++) { |
|
213 |
let routePath:string = this.router.config[i].path; |
|
214 |
if(routePath == routeToCheck){ |
|
215 |
return true; |
|
216 |
} |
|
217 |
} |
|
218 |
return false; |
|
219 |
} |
|
210 | 220 |
} |
modules/uoa-services-library/trunk/ng-openaire-library/src/app/landingPages/dataset/dataset.component.html | ||
---|---|---|
246 | 246 |
</li> |
247 | 247 |
|
248 | 248 |
</ul> |
249 |
<button class=" uk-button portal-button uk-width-1-1 "> |
|
249 |
<button *ngIf="isRouteAvailable('/participate/direct-claim') " class=" uk-button portal-button uk-width-1-1 ">
|
|
250 | 250 |
<span class="uk-icon"> |
251 | 251 |
<svg icon="link" ratio="1" xmlns="http://www.w3.org/2000/svg" width="25" viewBox="0 0 20 20" height="25"><path d="M10.625,12.375 L7.525,15.475 C6.825,16.175 5.925,16.175 5.225,15.475 L4.525,14.775 C3.825,14.074 3.825,13.175 4.525,12.475 L7.625,9.375" fill="none" stroke="#000" stroke-width="1.1"></path><path d="M9.325,7.375 L12.425,4.275 C13.125,3.575 14.025,3.575 14.724,4.275 L15.425,4.975 C16.125,5.675 16.125,6.575 15.425,7.275 L12.325,10.375" fill="none" stroke="#000" stroke-width="1.1"></path><path d="M7.925,11.875 L11.925,7.975" fill="none" stroke="#000" stroke-width="1.1"></path></svg> |
252 | 252 |
</span> Link this dataset to... |
253 | 253 |
</button> |
254 | 254 |
|
255 |
<div uk-dropdown="pos: bottom-left; mode:click" style="background: transparent !important;box-shadow: none; max-width: 70px !important; min-width: 70px !important;">
|
|
255 |
<div *ngIf="isRouteAvailable('/participate/direct-claim') " uk-dropdown="pos: bottom-left; mode:click" style="background: transparent !important;box-shadow: none; max-width: 70px !important; min-width: 70px !important;">
|
|
256 | 256 |
<ul class="uk-iconnav uk-iconnav-vertical"> |
257 | 257 |
<li uk-tooltip="pos:right;" title="<div class='tooltip-custom-font-size '>Projects</div>"> |
258 | 258 |
<a class=" uk-icon-button portal-button shadowBox" style="padding: 6px;" [queryParams]="routerHelper.createQueryParams(['id','type','linkTo'],[datasetId,'dataset','project'])" routerLinkActive="router-link-active" routerLink="/participate/direct-claim" > |
modules/uoa-services-library/trunk/ng-openaire-library/src/app/landingPages/dataset/dataset.component.ts | ||
---|---|---|
65 | 65 |
constructor (private _datasetService: DatasetService, |
66 | 66 |
private _piwikService:PiwikService, |
67 | 67 |
private route: ActivatedRoute, |
68 |
private router: Router, |
|
68 | 69 |
private _meta: Meta, |
69 | 70 |
private _title: Title, |
70 | 71 |
private _router: Router, |
... | ... | |
221 | 222 |
public scroll() { |
222 | 223 |
HelperFunctions.scroll(); |
223 | 224 |
} |
225 |
isRouteAvailable(routeToCheck:string){ |
|
226 |
for (let i = 0; i < this.router.config.length; i++) { |
|
227 |
let routePath:string = this.router.config[i].path; |
|
228 |
if(routePath == routeToCheck){ |
|
229 |
return true; |
|
230 |
} |
|
231 |
} |
|
232 |
return false; |
|
233 |
} |
|
224 | 234 |
} |
modules/uoa-services-library/trunk/ng-openaire-library/src/app/landingPages/project/project.component.html | ||
---|---|---|
453 | 453 |
<span class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="download" ratio="1"><polyline fill="none" stroke="#000" points="14,10 9.5,14.5 5,10"></polyline><rect x="3" y="17" width="13" height="1"></rect><line fill="none" stroke="#000" x1="9.5" y1="13.91" x2="9.5" y2="3"></line></svg></span> Get {{projectInfo.funder}} report (CSV) |
454 | 454 |
</a> |
455 | 455 |
</li> |
456 |
<li> |
|
456 |
<li *ngIf="isRouteAvailable('/participate/deposit-publications') ">
|
|
457 | 457 |
<a routerLinkActive="router-link-active" routerLink="/participate/deposit-publications"> |
458 | 458 |
<span class="uk-icon"> |
459 | 459 |
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" ratio="1"><polyline fill="none" stroke="#000" points="5 8 9.5 3.5 14 8 "></polyline><rect x="3" y="17" width="13" height="1"></rect><line fill="none" stroke="#000" x1="9.5" y1="15" x2="9.5" y2="4"></line></svg> |
... | ... | |
490 | 490 |
<span class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="download" ratio="1"><polyline fill="none" stroke="#000" points="14,10 9.5,14.5 5,10"></polyline><rect x="3" y="17" width="13" height="1"></rect><line fill="none" stroke="#000" x1="9.5" y1="13.91" x2="9.5" y2="3"></line></svg></span> Get {{projectInfo.funder}} report (CSV) |
491 | 491 |
</a> |
492 | 492 |
</li> |
493 |
<li> |
|
493 |
<li *ngIf="isRouteAvailable('/participate/deposit-datasets') ">
|
|
494 | 494 |
<a routerLinkActive="router-link-active" routerLink="/participate/deposit-datasets"> |
495 | 495 |
<span class="uk-icon"> |
496 | 496 |
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" ratio="1"><polyline fill="none" stroke="#000" points="5 8 9.5 3.5 14 8 "></polyline><rect x="3" y="17" width="13" height="1"></rect><line fill="none" stroke="#000" x1="9.5" y1="15" x2="9.5" y2="4"></line></svg> |
... | ... | |
502 | 502 |
</ul> |
503 | 503 |
|
504 | 504 |
</div> |
505 |
<button class=" uk-button portal-button uk-margin-small-top uk-width-1-1"> |
|
505 |
<button *ngIf="isRouteAvailable('/participate/direct-claim') " class=" uk-button portal-button uk-margin-small-top uk-width-1-1">
|
|
506 | 506 |
<span class="uk-icon"> |
507 | 507 |
<svg icon="link" ratio="1" xmlns="http://www.w3.org/2000/svg" width="25" viewBox="0 0 20 20" height="25"><path d="M10.625,12.375 L7.525,15.475 C6.825,16.175 5.925,16.175 5.225,15.475 L4.525,14.775 C3.825,14.074 3.825,13.175 4.525,12.475 L7.625,9.375" fill="none" stroke="#000" stroke-width="1.1"></path><path d="M9.325,7.375 L12.425,4.275 C13.125,3.575 14.025,3.575 14.724,4.275 L15.425,4.975 C16.125,5.675 16.125,6.575 15.425,7.275 L12.325,10.375" fill="none" stroke="#000" stroke-width="1.1"></path><path d="M7.925,11.875 L11.925,7.975" fill="none" stroke="#000" stroke-width="1.1"></path></svg> |
508 | 508 |
</span> Link this project to... |
509 | 509 |
</button> |
510 | 510 |
|
511 |
<div uk-dropdown="pos: bottom-left; mode:click" style="background: transparent !important;box-shadow: none; max-width: 70px !important; min-width: 70px !important;" class=" uk-margin-remove-top uk-padding-small"> |
|
511 |
<div *ngIf="isRouteAvailable('/participate/direct-claim') " uk-dropdown="pos: bottom-left; mode:click" style="background: transparent !important;box-shadow: none; max-width: 70px !important; min-width: 70px !important;" class=" uk-margin-remove-top uk-padding-small">
|
|
512 | 512 |
<ul class="uk-iconnav uk-iconnav-vertical"> |
513 | 513 |
<li uk-tooltip="pos:right;" title="<div class='tooltip-custom-font-size uk-margin-small'>Research results</div>"> |
514 | 514 |
<a class=" uk-icon-button portal-button shadowBox" style="padding: 6px;" [queryParams]="routerHelper.createQueryParams(['id','type','linkTo'],[projectId,'project','result'])" routerLinkActive="router-link-active" routerLink="/participate/direct-claim" > |
modules/uoa-services-library/trunk/ng-openaire-library/src/app/landingPages/project/project.component.ts | ||
---|---|---|
105 | 105 |
constructor ( private _projectService: ProjectService, |
106 | 106 |
private _piwikService:PiwikService, |
107 | 107 |
private route: ActivatedRoute, |
108 |
private router: Router, |
|
108 | 109 |
private _searchPublicationsService: SearchPublicationsService, |
109 | 110 |
private _searchDatasetsService: SearchDatasetsService, |
110 | 111 |
private _searchSoftwareService: SearchSoftwareService, |
... | ... | |
492 | 493 |
private handleError(message: string, error) { |
493 | 494 |
console.error("Project Landing Page: "+message, error); |
494 | 495 |
} |
496 |
isRouteAvailable(routeToCheck:string){ |
|
497 |
for (let i = 0; i < this.router.config.length; i++) { |
|
498 |
let routePath:string = this.router.config[i].path; |
|
499 |
if(routePath == routeToCheck){ |
|
500 |
return true; |
|
501 |
} |
|
502 |
} |
|
503 |
return false; |
|
504 |
} |
|
495 | 505 |
} |
modules/uoa-services-library/trunk/ng-openaire-library/src/app/landingPages/publication/publication.component.ts | ||
---|---|---|
76 | 76 |
constructor ( private _publicationService: PublicationService, |
77 | 77 |
private _piwikService:PiwikService, |
78 | 78 |
private route: ActivatedRoute, |
79 |
private router: Router, |
|
79 | 80 |
private _meta: Meta, |
80 | 81 |
private _title: Title, |
81 | 82 |
private _router: Router, |
... | ... | |
361 | 362 |
private handleError(message: string, error) { |
362 | 363 |
console.error("Publication Landing Page: "+message, error); |
363 | 364 |
} |
365 |
isRouteAvailable(routeToCheck:string){ |
|
366 |
for (let i = 0; i < this.router.config.length; i++) { |
|
367 |
let routePath:string = this.router.config[i].path; |
|
368 |
if(routePath == routeToCheck){ |
|
369 |
return true; |
|
370 |
} |
|
371 |
} |
|
372 |
return false; |
|
373 |
} |
|
364 | 374 |
} |
modules/uoa-services-library/trunk/ng-openaire-library/src/app/landingPages/software/software.component.ts | ||
---|---|---|
60 | 60 |
constructor (private _softwareService: SoftwareService, |
61 | 61 |
private _piwikService:PiwikService, |
62 | 62 |
private route: ActivatedRoute, |
63 |
private router: Router, |
|
63 | 64 |
private _meta: Meta, |
64 | 65 |
private _title: Title, |
65 | 66 |
private _router: Router, |
... | ... | |
202 | 203 |
private handleError(message: string, error) { |
203 | 204 |
console.error("Software Landing Page: "+message, error); |
204 | 205 |
} |
206 |
isRouteAvailable(routeToCheck:string){ |
|
207 |
for (let i = 0; i < this.router.config.length; i++) { |
|
208 |
let routePath:string = this.router.config[i].path; |
|
209 |
if(routePath == routeToCheck){ |
|
210 |
return true; |
|
211 |
} |
|
212 |
} |
|
213 |
return false; |
|
214 |
} |
|
205 | 215 |
} |
modules/uoa-services-library/trunk/ng-openaire-library/src/app/utils/fetchEntitiesClasses/fetchPublications.class.ts | ||
---|---|---|
3 | 3 |
import {ErrorCodes} from '../../utils/properties/errorCodes'; |
4 | 4 |
import {ErrorMessagesComponent} from '../../utils/errorMessages.component'; |
5 | 5 |
import {SearchFields, FieldDetails} from '../../utils/properties/searchFields'; |
6 |
import {SearchUtilsClass } from '../../searchPages/searchUtils/searchUtils.class';
|
|
6 |
import {SearchCustomFilter, SearchUtilsClass} from '../../searchPages/searchUtils/searchUtils.class';
|
|
7 | 7 |
import {DOI} from '../../utils/string-utils.class'; |
8 | 8 |
import {Subject} from 'rxjs'; |
9 | 9 |
import{EnvProperties} from '../../utils/properties/env-properties'; |
... | ... | |
52 | 52 |
} |
53 | 53 |
} |
54 | 54 |
|
55 |
public getResultsByKeyword(keyword:string, page: number, size: number, properties:EnvProperties, connectCommunityId=null){ |
|
55 |
public getResultsByKeyword(keyword:string, page: number, size: number, properties:EnvProperties, connectCommunityId=null, customFilter:SearchCustomFilter=null){
|
|
56 | 56 |
var parameters = ""; |
57 | 57 |
if(keyword.length > 0){ |
58 | 58 |
var DOIs:string[] = DOI.getDOIsFromString(keyword); |
... | ... | |
72 | 72 |
//var errorCodes:ErrorCodes = new ErrorCodes(); |
73 | 73 |
this.searchUtils.status = this.errorCodes.LOADING; |
74 | 74 |
var refineParams = (connectCommunityId)?("&fq="+StringUtils.URIEncode("communityId exact " + StringUtils.quote((connectCommunityId )))):null; |
75 |
if(customFilter){ |
|
76 |
refineParams = (refineParams?(refineParams+'&'):'')+"&fq="+StringUtils.URIEncode(customFilter.queryFieldName + " exact " + StringUtils.quote((customFilter.valueId ))); |
|
77 |
} |
|
75 | 78 |
this.subResults = this._searchPublicationsService.searchPublications(parameters,refineParams, page, size, "", [], properties).subscribe( |
76 | 79 |
data => { |
77 | 80 |
this.searchUtils.totalResults = data[0]; |
modules/uoa-services-library/trunk/ng-openaire-library/src/app/utils/fetchEntitiesClasses/fetchDatasets.class.ts | ||
---|---|---|
1 | 1 |
import {SearchDatasetsService} from '../../services/searchDatasets.service'; |
2 | 2 |
import { ErrorCodes} from '../../utils/properties/errorCodes'; |
3 | 3 |
import {ErrorMessagesComponent} from '../../utils/errorMessages.component'; |
4 |
import {SearchUtilsClass } from '../../searchPages/searchUtils/searchUtils.class';
|
|
4 |
import {SearchCustomFilter, SearchUtilsClass} from '../../searchPages/searchUtils/searchUtils.class';
|
|
5 | 5 |
import {DOI} from '../../utils/string-utils.class'; |
6 | 6 |
import {Subject} from 'rxjs'; |
7 | 7 |
import{EnvProperties} from '../../utils/properties/env-properties'; |
... | ... | |
40 | 40 |
} |
41 | 41 |
|
42 | 42 |
|
43 |
public getResultsByKeyword(keyword:string, page: number, size: number, properties:EnvProperties, connectCommunityId=null){ |
|
43 |
public getResultsByKeyword(keyword:string, page: number, size: number, properties:EnvProperties, connectCommunityId=null, customFilter:SearchCustomFilter=null){
|
|
44 | 44 |
var parameters = ""; |
45 | 45 |
if(keyword.length > 0){ |
46 | 46 |
var DOIs:string[] = DOI.getDOIsFromString(keyword); |
... | ... | |
59 | 59 |
//var errorCodes:ErrorCodes = new ErrorCodes(); |
60 | 60 |
this.searchUtils.status = this.errorCodes.LOADING; |
61 | 61 |
var refineParams = (connectCommunityId)?("&fq="+StringUtils.URIEncode("communityId exact " + StringUtils.quote((connectCommunityId )))):null; |
62 |
|
|
62 |
if(customFilter){ |
|
63 |
refineParams = (refineParams?(refineParams+'&'):'')+"&fq="+StringUtils.URIEncode(customFilter.queryFieldName + " exact " + StringUtils.quote((customFilter.valueId ))); |
|
64 |
} |
|
63 | 65 |
this.subResults = this._searchDatasetsService.searchDatasets(parameters,refineParams, page, size, "", [], properties).subscribe( |
64 | 66 |
data => { |
65 | 67 |
this.searchUtils.totalResults = data[0]; |
modules/uoa-services-library/trunk/ng-openaire-library/src/app/sharedComponents/navigationBar.component.html | ||
---|---|---|
12 | 12 |
</a> |
13 | 13 |
<a *ngIf="community && !homeurl" class="uk-navbar-item uk-logo" [href]="'https://'+(properties.environment =='beta'?'beta.':'')+community.id+'.openaire.eu'" target="_blank"> |
14 | 14 |
<img *ngIf="community.logoUrl && community.logoUrl.length > 0" src="{{community.logoUrl}}" [alt]=community.name class="uk-responsive-height"> |
15 |
<div *ngIf="!community.logoUrl || community.logoUrl.length == 0" class="uk-margin-left uk-text-large"> {{community.name}} </div> |
|
15 |
<div *ngIf="!community.logoUrl || community.logoUrl.length == 0 || showCommunityName" class="uk-margin-left uk-text-large"> |
|
16 |
{{community.name}} </div> |
|
16 | 17 |
</a> |
17 | 18 |
<a *ngIf="community && homeurl" class="uk-navbar-item uk-logo" routerLinkActive="uk-link" routerLink="/" > |
18 | 19 |
<img *ngIf="community.logoUrl && community.logoUrl.length > 0" src="{{community.logoUrl}}" [alt]=community.name class="uk-responsive-height"> |
19 |
<div *ngIf="!community.logoUrl || community.logoUrl.length == 0" class="uk-margin-left uk-text-large"> {{community.name}} </div> |
|
20 |
<div *ngIf="!community.logoUrl || community.logoUrl.length == 0 || showCommunityName" class="uk-margin-left uk-text-large"> |
|
21 |
{{community.name}} </div> |
|
20 | 22 |
</a> |
21 | 23 |
|
22 | 24 |
</div> |
... | ... | |
114 | 116 |
<a *ngIf="community && homeurl" routerLinkActive="uk-link" routerLink="/" class="uk-logo uk-navbar-item"> |
115 | 117 |
|
116 | 118 |
<img *ngIf="community.logoUrl && community.logoUrl.length > 0" src="{{community.logoUrl}}" [alt]=community.name class="uk-responsive-height"> |
117 |
<div *ngIf="!community.logoUrl || community.logoUrl.length == 0" class="uk-margin-left uk-text-large"> {{community.name}} </div> |
|
119 |
<div *ngIf="!community.logoUrl || community.logoUrl.length == 0 || showCommunityName" class="uk-margin-left uk-text-large"> {{community.name}} </div>
|
|
118 | 120 |
</a> |
119 | 121 |
<a *ngIf="community && !homeurl" [href]="'https://'+(properties.environment =='beta'?'beta.':'')+community.id+'.openaire.eu'" target="_blank" class="uk-logo uk-navbar-item"> |
120 | 122 |
|
121 | 123 |
<img *ngIf="community.logoUrl && community.logoUrl.length > 0" src="{{community.logoUrl}}" [alt]=community.name class="uk-responsive-height"> |
122 |
<div *ngIf="!community.logoUrl || community.logoUrl.length == 0" class="uk-margin-left uk-text-large"> {{community.name}} </div> |
|
124 |
<div *ngIf="!community.logoUrl || community.logoUrl.length == 0 || showCommunityName" |
|
125 |
class="uk-margin-left uk-text-large"> {{community.name}} </div> |
|
123 | 126 |
</a> |
124 | 127 |
</div> |
125 | 128 |
<div class="uk-navbar-left uk-visible@m uk-hidden@l uk-width-1-3"> |
... | ... | |
128 | 131 |
</a> |
129 | 132 |
<a *ngIf="community && homeurl" routerLinkActive="uk-link" routerLink="/" class="uk-logo uk-navbar-item"> |
130 | 133 |
<img *ngIf="community.logoUrl && community.logoUrl.length > 0" src="{{community.logoUrl}}" [alt]=community.name class="uk-responsive-height"> |
131 |
<div *ngIf="!community.logoUrl || community.logoUrl.length == 0" class="uk-margin-left uk-text-large"> {{community.name}} </div> |
|
134 |
<div *ngIf="!community.logoUrl || community.logoUrl.length == 0 || showCommunityName" |
|
135 |
class="uk-margin-left uk-text-large"> {{community.name}} </div> |
|
132 | 136 |
</a> |
133 | 137 |
<a *ngIf="community && !homeurl" [href]="'https://'+(properties.environment =='beta'?'beta.':'')+community.id+'.openaire.eu'" target="_blank" class="uk-logo uk-navbar-item"> |
134 | 138 |
<img *ngIf="community.logoUrl && community.logoUrl.length > 0" src="{{community.logoUrl}}" [alt]=community.name class="uk-responsive-height"> |
135 |
<div *ngIf="!community.logoUrl || community.logoUrl.length == 0" class="uk-margin-left uk-text-large"> {{community.name}} </div> |
|
139 |
<div *ngIf="!community.logoUrl || community.logoUrl.length == 0 || showCommunityName" |
|
140 |
class="uk-margin-left uk-text-large"> {{community.name}} </div> |
|
136 | 141 |
</a> |
137 | 142 |
|
138 | 143 |
</div> |
139 | 144 |
<!-- <div *ngIf="!onlyTop" class="uk-navbar-center"> --> |
140 | 145 |
<div *ngIf="!onlyTop" class="uk-navbar-right uk-position-top-right"> |
141 |
<ul *ngIf= "isClient" class="uk-navbar-nav">
|
|
146 |
<ul *ngIf= "isClient" [class]="'uk-navbar-nav'+(!userMenu?' uk-margin-right':'')">
|
|
142 | 147 |
<ng-container *ngFor="let menu of menuItems"> |
143 | 148 |
<li class="uk-parent" *ngIf="isAtleastOneEnabled(menu.rootItem.entitiesRequired,showEntity) && isAtleastOneEnabled(menu.rootItem.routeRequired, showPage)"> |
144 | 149 |
<!--a routerLinkActive="uk-link" routerLink="{{menu.rootItem.route}}" [queryParams]=menu.rootItem.params class="" aria-expanded="false">{{menu.rootItem.title}}</a--> |
Also available in: Unified diff
[Library|Trunk]
Changes for Aggregator portal:
use a customFilter in search pages, and pass it through the components
for landing pages check if a route is available in order to add linking and deposit links