Change scripts in deploy folder

Community page:
	add is route enabled check to show zenodo communities link and number

Invite:
	allow customize html text for community managers too
Subscribe:
	add error section, to catch the case the service response 403 -> the button is enabled again and a message appears


git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-connect-portal/trunk@54622 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
argiro.kokogiannaki 2019-01-23 08:55:08 +00:00
parent 9e654489f7
commit e3c5e28e23
6 changed files with 45 additions and 28 deletions

View File

@ -1,20 +0,0 @@
#ATTENTION
#DON'T run it in svn folder - it REMOVES files
#Copy project in another file "deploy-folder"
#cd "deploy-folder"
#run the script
## cp the file according to the deploy environment
# cp beta-properties.json ../src/assets/env-properties.json;
## uncommect from here-->
# echo -n 'Check properties service to have the url for the deployment environment!!';
# echo -n "Press key:";
# read -n1 ans
# echo -n "Pressed";
# pico ../src/app/openaireLibrary/utils/properties/environment-specific.service.ts;
# rm -rf ../src/assets/common-assets/.svn/;
# rm -rf ../src/app/openaireLibrary/.svn/;
# echo 'Run "cd ..; npm run build:dynamic; cd deploy;" ';
# echo 'Then run prepary deploy script';
##<-- to here

View File

@ -1,9 +1,21 @@
#ATTENTION
#DON'T run it in svn folder - it REMOVES files
#First you have to run prepareBuild Script!!!!!!!
#Copy project in another file "deploy-folder"
#cd "deploy-folder/deploy"
#run the script
## cp the file according to the deploy environment
# cp beta-properties.json ../src/assets/env-properties.json;
## uncommect from here-->
# echo -n 'Check properties service to have the url for the deployment environment!!';
# echo -n "Press key:";
# read -n1 ans
# echo -n "Pressed";
# pico ../src/app/openaireLibrary/utils/properties/environment-specific.service.ts;
# rm -rf ../src/assets/common-assets/.svn/;
# rm -rf ../src/app/openaireLibrary/.svn/;
# cd ..; npm run build:dynamic; cd deploy;
# rm -rf ../src ../node_modules ../.idea/ ../installOpenaireLib.sh;
# echo 'Now copy to the server!'
#echo 'remove this deploy folder'

View File

@ -51,7 +51,7 @@
</span>
<span *ngIf="community.date != null" class="uk-margin-left"> Created: {{community.date | date:'dd-MM-yyyy'}}</span>
<subscribe *ngIf="communityId != null" [communityId]="communityId" showNumbers=true class="uk-margin-left"></subscribe>
<span *ngIf="masterZenodoCommunity || zenodoCommunityIdS.length > 0 && IsRouteEnabled('/participate/share-zenodo')" class="uk-margin-left">
<span *ngIf=" IsRouteEnabled('/participate/share-zenodo')" class="uk-margin-left">
<a [queryParams]=params routerLinkActive="router-link-active" routerLink="/participate/share-zenodo" >
Zenodo communities:<span> {{zenodoCommunityIdS.length + ((masterZenodoCommunity)?1:0)}}</span>
</a>

View File

@ -10,7 +10,7 @@ import {Session} from '../../openaireLibrary/login/utils/helper.class';
<a *ngIf="isManager" [href]="'https://beta.admin.connect.openaire.eu/dashboard?communityId='+communityId" class="uk-button uk-button-default uk-margin-left" target="_blank" >
<span class="uk-margin-small-right uk-icon"> <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="cog" ratio="1"><circle fill="none" stroke="#000" cx="9.997" cy="10" r="3.31"></circle><path fill="none" stroke="#000" d="M18.488,12.285 L16.205,16.237 C15.322,15.496 14.185,15.281 13.303,15.791 C12.428,16.289 12.047,17.373 12.246,18.5 L7.735,18.5 C7.938,17.374 7.553,16.299 6.684,15.791 C5.801,15.27 4.655,15.492 3.773,16.237 L1.5,12.285 C2.573,11.871 3.317,10.999 3.317,9.991 C3.305,8.98 2.573,8.121 1.5,7.716 L3.765,3.784 C4.645,4.516 5.794,4.738 6.687,4.232 C7.555,3.722 7.939,2.637 7.735,1.5 L12.263,1.5 C12.072,2.637 12.441,3.71 13.314,4.22 C14.206,4.73 15.343,4.516 16.225,3.794 L18.487,7.714 C17.404,8.117 16.661,8.988 16.67,10.009 C16.672,11.018 17.415,11.88 18.488,12.285 L18.488,12.285 Z"></path></svg></span>
<span class=" uk-icon"> <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="cog" ratio="1"><circle fill="none" stroke="#000" cx="9.997" cy="10" r="3.31"></circle><path fill="none" stroke="#000" d="M18.488,12.285 L16.205,16.237 C15.322,15.496 14.185,15.281 13.303,15.791 C12.428,16.289 12.047,17.373 12.246,18.5 L7.735,18.5 C7.938,17.374 7.553,16.299 6.684,15.791 C5.801,15.27 4.655,15.492 3.773,16.237 L1.5,12.285 C2.573,11.871 3.317,10.999 3.317,9.991 C3.305,8.98 2.573,8.121 1.5,7.716 L3.765,3.784 C4.645,4.516 5.794,4.738 6.687,4.232 C7.555,3.722 7.939,2.637 7.735,1.5 L12.263,1.5 C12.072,2.637 12.441,3.71 13.314,4.22 C14.206,4.73 15.343,4.516 16.225,3.794 L18.487,7.714 C17.404,8.117 16.661,8.988 16.67,10.009 C16.672,11.018 17.415,11.88 18.488,12.285 L18.488,12.285 Z"></path></svg></span>
Manage</a>

View File

@ -218,6 +218,8 @@ export class InviteComponent implements OnInit {
index = this.community.managers.indexOf(email);
}
return Session.isPortalAdministrator() || Session.isCommunityCurator()
return Session.isPortalAdministrator() || Session.isCommunityCurator() || index!=-1;
}
}

View File

@ -106,7 +106,7 @@ export class SubscribeComponent {
console.log(res);
if(res.status && res.status != 200) {
UIkit.notification({
message : '<strong>There was an error in your subscription. Please try again!<strong>',
message : '<strong>An error occured. Please try again!<strong>',
status : 'warning',
timeout : 3000,
pos : 'top-center'
@ -118,10 +118,23 @@ export class SubscribeComponent {
res => {
console.log("The email has been sent successfully!")
},
error => console.log(error)
error => {
console.log(error)
}
);
}
}
},
error => {
this.loading = false;
UIkit.notification({
message : '<strong>An error occured. Please try again!<strong>',
status : 'warning',
timeout : 3000,
pos : 'top-center'
});
console.log(error)
});
}
}
@ -138,7 +151,7 @@ export class SubscribeComponent {
this.loading = false;
if(res.status && res.status != 200) {
UIkit.notification({
message : '<strong>There was an error in your unsubscription. Please try again!<strong>',
message : '<strong>An error occured. Please try again!<strong>',
status : 'warning',
timeout : 3000,
pos : 'top-center'
@ -149,6 +162,16 @@ export class SubscribeComponent {
this.subscribed = false;
}
}
},
error => {
this.loading = false;
UIkit.notification({
message : '<strong>An error occured. Please try again!<strong>',
status : 'warning',
timeout : 3000,
pos : 'top-center'
});
console.log(error)
});
}
}