Revision 51557
Added by Konstantina Galouni over 6 years ago
modules/uoa-admin-portal/branches/project-cli/src/app/pages/community/projects/add-projects.component.html | ||
---|---|---|
42 | 42 |
<li *ngFor="let result of openaireProjects" class="uk-animation-fade"> |
43 | 43 |
<h6 class="uk-grid" uk-grid> |
44 | 44 |
<span class="uk-width-5-6"> |
45 |
<a class="custom-external" [href]="properties.baseLink+'/search/project?projectId='+result.id">
|
|
45 |
<a class="custom-external" target="_blank" [href]="properties.baseOpenaireLink+'/search/project?projectId='+result.id">
|
|
46 | 46 |
<span *ngIf="result['title'].name || result.acronym"> |
47 | 47 |
<span *ngIf="result.acronym">{{result.acronym}}</span> |
48 | 48 |
<span *ngIf="result.acronym && result['title'].name">-</span> |
... | ... | |
75 | 75 |
<span *ngIf="result.title && result.title.sc39" class="uk-label custom-label label-sc39 " title="Special Clause 39">Special Clause 39</span> |
76 | 76 |
|
77 | 77 |
<div *ngIf="result.startYear && result.endYear"> Start year: {{result.startYear}} - End year: {{result.endYear}}</div> |
78 |
<div *ngIf="showOrganizations && result['organizations'] != undefined && result['organizations'].length > 0">
|
|
78 |
<div *ngIf="result['organizations'] != undefined && result['organizations'].length > 0"> |
|
79 | 79 |
<span> Organization: </span> |
80 | 80 |
<span *ngFor="let organization of result['organizations'].slice(0,10) let i=index"> |
81 |
<!--a *ngIf="organization.url != undefined" href="{{organization.url}}"-->
|
|
82 |
<a *ngIf="organization.id" [queryParams]="{organizationId: organization.id}" routerLinkActive="router-link-active" routerLink="/search/organization">
|
|
81 |
<a *ngIf="organization.id" class="custom-external custom-icon" target="_blank"
|
|
82 |
[href]="properties.baseOpenaireLink+'/search/organization?organizationId='+organization.id">
|
|
83 | 83 |
{{organization.name}}</a><span |
84 | 84 |
|
85 | 85 |
*ngIf="!organization.id"> |
modules/uoa-admin-portal/branches/project-cli/src/app/pages/community/projects/add-projects.component.ts | ||
---|---|---|
114 | 114 |
|
115 | 115 |
public inCommunity(project: any): any { |
116 | 116 |
for(let communityProject of this.communityProjects) { |
117 |
if(communityProject.opeaireId == project.id) { |
|
117 |
if(communityProject.openaireId == project.id) {
|
|
118 | 118 |
return true; |
119 | 119 |
} else if(project.code == communityProject.grantId && project.funderShortname == communityProject.funder) { |
120 | 120 |
return true; |
modules/uoa-admin-portal/branches/project-cli/src/app/pages/community/projects/remove-projects.component.html | ||
---|---|---|
63 | 63 |
<tbody> |
64 | 64 |
<tr class="uk-table-middle" *ngFor="let result of communityProjects"> |
65 | 65 |
<td class="uk-text-center uk-width-1-4"> |
66 |
<a *ngIf="result.name || result.acronym" class="custom-external"
|
|
67 |
[href]="'https://beta.'+this.community+'.openaire.eu/search/project?' + ((result.openaireId) ? 'projectId='+result.openaireId : 'grantId='+result.grantId+'&funder='+result.funder)">
|
|
66 |
<a class="custom-external" target="_blank"
|
|
67 |
[href]="communityUrl+'/search/project?' + ((result.openaireId) ? 'projectId='+result.openaireId : 'grantId='+result.grantId+'&funder='+result.funder)">
|
|
68 | 68 |
<span *ngIf="result.name">{{result.name}}</span> |
69 | 69 |
<span *ngIf="result.name && result.acronym">(</span> |
70 | 70 |
<span *ngIf="result.acronym">{{result.acronym}}</span> |
71 | 71 |
<span *ngIf="result.name && result.acronym">)</span> |
72 |
<span *ngIf="!result.name && !result.acronym">[no title available]</span> |
|
72 | 73 |
</a> |
73 |
<span *ngIf="!result.name && !result.acronym">-</span> |
|
74 | 74 |
</td> |
75 | 75 |
<td class="uk-text-center uk-width-1-4"> |
76 | 76 |
<span *ngIf="result.grantId">{{result.grantId}}</span> |
modules/uoa-admin-portal/branches/project-cli/src/app/pages/community/projects/remove-projects.component.ts | ||
---|---|---|
31 | 31 |
public routerHelper:RouterHelper = new RouterHelper(); |
32 | 32 |
|
33 | 33 |
private community: string = ''; |
34 |
private communityUrl = "https://beta.explore.openaire.eu"; |
|
34 | 35 |
|
35 | 36 |
private errorCodes: ErrorCodes; |
36 | 37 |
|
... | ... | |
83 | 84 |
this.route.queryParams.subscribe(params => { |
84 | 85 |
if(params['communityId']) { |
85 | 86 |
this.community = params['communityId']; |
87 |
this.communityUrl = "https://beta."+this.community+".openaire.eu"; |
|
86 | 88 |
|
87 | 89 |
this._getCommunityProjects(); |
88 | 90 |
//this.getFunders(); |
... | ... | |
149 | 151 |
let returnValue: boolean = false; |
150 | 152 |
|
151 | 153 |
if(query) { |
152 |
for(var i=0; i <4; i++){
|
|
154 |
for(var i=0; i <3; i++){
|
|
153 | 155 |
var r= this.filterQuery(row[i], query); |
154 | 156 |
if(r) { |
155 | 157 |
returnValue = true; |
... | ... | |
265 | 267 |
if(communityProject.name && communityProject.acronym) { |
266 | 268 |
title += ")"; |
267 | 269 |
} |
268 |
this.alertModalDeleteCommunity.message = "Project '"+title+"' will be removed from your community. Are you sure?"; |
|
270 |
this.alertModalDeleteCommunity.message = "Project"; |
|
271 |
if(title) { |
|
272 |
this.alertModalDeleteCommunity.message += " '"+title+"' "; |
|
273 |
} |
|
274 |
this.alertModalDeleteCommunity.message += "will be removed from your community. Are you sure?"; |
|
269 | 275 |
this.alertModalDeleteCommunity.okButtonText = "Yes"; |
270 | 276 |
this.alertModalDeleteCommunity.open(); |
271 | 277 |
} |
... | ... | |
287 | 293 |
|
288 | 294 |
this.communitySearchUtils.totalResults = data.length; |
289 | 295 |
this.communitySearchUtils.status = this.errorCodes.DONE; |
290 |
if(this.communitySearchUtils.totalResults == 0 ){ |
|
291 |
this.communitySearchUtils.status = this.errorCodes.NONE; |
|
292 |
} |
|
296 |
// if(this.communitySearchUtils.totalResults == 0 ){
|
|
297 |
// this.communitySearchUtils.status = this.errorCodes.NONE;
|
|
298 |
// }
|
|
293 | 299 |
this.disableForms = false; |
294 | 300 |
if(!this.triggered) { |
295 | 301 |
this.triggerInitialLoad(); |
modules/uoa-admin-portal/branches/project-cli/src/assets/env-properties.json | ||
---|---|---|
67 | 67 |
"resultsPerPage": 10, |
68 | 68 |
|
69 | 69 |
"baseLink" : "https://demo.openaire.eu", |
70 |
"baseOpenaireLink" : "https://beta.explore.openaire.eu", |
|
70 | 71 |
|
71 | 72 |
"searchLinkToPublication" : "/search/publication?articleId=", |
72 | 73 |
"searchLinkToProject" : "/search/project?projectId=", |
Also available in: Unified diff
1. env-properties.json: 'baseOpenaireLink' field added for base link of OpenAIRE portal.
2. remove-projects.component.ts: 'communityUrl' variable added to build url for community portal, as soon as the communityId changes.
3. remove-projects.component.ts: do not set status of searchUtils to NONE, to avoid 2 messages about no results.
4. remove-projects.component.ts: in alertModalDeleteCommunity.message, show title(name, acronym) of selected project only if title exists.
5. remove-projects.component.html: link to landing page always in the first column.
6. add-projects.component.ts: bug fix in 'inCommunity' method about spelling.
7. target="_blank" added in external links | all links to community or openaire portal are external.