[Trunk|Library]: 1. Compose email for request for new community. 2. Change community view on results

git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@55287 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
k.triantafyllou 2019-04-12 08:52:31 +00:00
parent 0c01cd65f7
commit c156ac3b8f
4 changed files with 17 additions and 13 deletions

View File

@ -2,12 +2,17 @@
<errorMessages [status]="[status]" [type]="'results'"></errorMessages> <errorMessages [status]="[status]" [type]="'results'"></errorMessages>
<li *ngFor="let result of results" class="uk-animation-fade uk-margin-auto" uk-grid> <li *ngFor="let result of results" class="uk-animation-fade uk-margin-auto" uk-grid>
<a class="uk-width-1-5 uk-height-small uk-card uk-card-default uk-card-body" (click)="confirmModalOpen(result.community)"> <a class="uk-width-1-5 uk-height-small uk-card uk-card-default uk-card-body uk-inline" (click)="confirmModalOpen(result.community)">
<div *ngIf="result.isSubscribed" class="uk-card-badge portal-card-badge uk-width-1-2 uk-position-top-left uk-text-small uk-text-center">Subscribed</div> <div *ngIf="result.isSubscribed" class="uk-position-top-left uk-card-badge portal-card-badge uk-width-1-2 uk-text-small uk-text-center">
<span>Subscribed</span>
</div>
<img *ngIf= "result.community.logoUrl != null && result.community.logoUrl != '' " class="uk-padding uk-position-center" src="{{result.community.logoUrl}}" alt="{{(result.community.title)?result.community.title:result.community.shortTitle}} logo" > <img *ngIf= "result.community.logoUrl != null && result.community.logoUrl != '' " class="uk-padding uk-position-center" src="{{result.community.logoUrl}}" alt="{{(result.community.title)?result.community.title:result.community.shortTitle}} logo" >
<span *ngIf= "result.community.logoUrl == null || result.community.logoUrl == '' " class="uk-icon uk-padding uk-position-center"> <span *ngIf= "result.community.logoUrl == null || result.community.logoUrl == '' " class="uk-icon uk-padding uk-position-center">
<svg width="50" height="50" 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> <svg width="50" height="50" 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> </span>
<div *ngIf="result.community.status == 'manager'" class="uk-position-top-right uk-card-badge private-card-badge uk-text-small">
<span class="uk-padding-small">Private</span>
</div>
</a> </a>
<div class="uk-width-expand"> <div class="uk-width-expand">
<div [title] = result.community.shortTitle class="uk-text-large uk-grid"> <div [title] = result.community.shortTitle class="uk-text-large uk-grid">

View File

@ -32,11 +32,6 @@ export class CommunitySearchResultsComponent {
} }
public quote(params: string):string {
return '"'+params+'"';
}
getProductionPrefix():string{ getProductionPrefix():string{
return (this.properties.environment == "beta")?"beta.":"" return (this.properties.environment == "beta")?"beta.":""
} }

View File

@ -52,12 +52,16 @@ export class Composer {
public static composeEmailForNewCommunity(contactForm: ContactForm, admins: any): Email { public static composeEmailForNewCommunity(contactForm: ContactForm, admins: any): Email {
let email: Email = new Email(); let email: Email = new Email();
email.subject = this.subjectPrefix + contactForm.community + ": Welcome new community"; email.subject = "RCD: Request for new community";
email.body = "<div style='font-size:" + this.noteBodySize + "'><p>Welcome to OpenAIRE Connect!</p>" email.body = "<div style='font-size:" + this.noteBodySize + "'>"
+ "<p>You are receiving this e-mail as test" + "<span><b>Name</b>: " + contactForm.name + "</span><br>"
+ "<span><b>Surname</b>: " + contactForm.surname + "</span><br>"
+ "<span><b>Email</b>: " + contactForm.email + "</span><br>"
+ "<span><b>Affiliation</b>: " + contactForm.affiliation + "</span><br>"
+ "<span><b>Community Name</b>: " + contactForm.community + "</span>"
+ "<p>" + contactForm.message + "</p>"
+ "</div>";
email.recipients = admins; email.recipients = admins;
console.log(email)
return email; return email;
} }

View File

@ -134,7 +134,7 @@ export class SearchFields {
public ADVANCED_SEARCH_OPERATORS:[{name:string, id:string}] = [{name:"AND",id:"and"},{name:"OR",id:"or"},{name:"NOT",id:"not"}]; public ADVANCED_SEARCH_OPERATORS:[{name:string, id:string}] = [{name:"AND",id:"and"},{name:"OR",id:"or"},{name:"NOT",id:"not"}];
public COMMUNITIES_SEARCH_FIELDS:string[] = ["type","status"]; public COMMUNITIES_SEARCH_FIELDS:string[] = ["type","status","role"];
constructor (){ constructor (){
} }
getFieldName(fieldId:string,fieldType:string):string{ getFieldName(fieldId:string,fieldType:string):string{