connect/src/app/utils/subscribe/invite/invite.component.html

200 lines
11 KiB
HTML
Raw Normal View History

<schema2jsonld *ngIf="url" [URL]="url" [name]="pageTitle" type="other"></schema2jsonld>
<div *ngIf="longView == true" class="">
[Trunk | Connect]: 1. app-routing.module.ts: Add route '/subjects'. 2. app.component.ts: Group subscribe and invite buttons under id="subscribeAndInviteBtn" (keep distance between them alwayes the same) | uncomment menu item 'Subjects' in About. 3. app.module.ts: import 'SubscribeService' (singleton service to update everywhere subscriber status). 4. libUser.module.ts & subscribe.module.ts: remove import of 'SubscribeService' (singleton service to update everywhere subscriber status). 5. community.component.html: a. Improve some checks b. In main tabs of the page (class main-tabs) add class 'uk-text-truncate' and remove class 'uk-width-3-4' (each tab has max-width) c. Add icon in 'Analytics' tab d. [Bug fix] In description, fix overflow and max height of box 6. community.component.ts: Add field '@ViewChild(SubscribeComponent) subscribeComponent: SubscribeComponent' to add some checks in html. 7. curators.component.html: Remove div with class 'image-front-topbar' | Update css for title | Add <breadcrumbs> | Add user icon for each curator. 8. curators.component.ts: Initialize breadcrumb | [Bug fix] In methods 'getPageContents()' and 'getDivContents()' use communityId (instead of 'connect'). 9. curators.module.ts & organizationsPage.module.ts & inviteBasic.module.ts: import 'BreadcrumbsModule'. 10. organizationsPage.component.ts: Update css for title | Add <breadcrumbs> | Initialize breadcrumb. 11. subjects.component.ts, subjects.module.ts, subjects-routing.module.ts: Add page for Subjects. 12. invite.component.html: Add <breadcrumbs> in longView | Add icon in button 'Invite users'. 13. invite.component.ts: Initialize breadcrumb. 14. subscribe.component.ts: a. Add icon in button "Subscribe"/ "Subscribed" b. Add class 'uk-display-inline-block' in showNumbers (members) c. Initialize and get subscriber status with new methods of service (initIsSubscribedToCommunity() & isSubscribed - BehaviorSubject instead of isSubscribedToCommunity()) 15. connect-custom.css: Group css for #subscribeBtn, #inviteBtn into #subscribeAndInviteBtn | Add css for class 'user-circle-background' (background of user icon in curators). git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-connect-portal/trunk@58574 d315682c-612b-4755-9ff5-7f18f6832af3
2020-04-28 13:07:36 +02:00
<div class="uk-section uk-padding-remove-top tm-middle" id="tm-main">
<breadcrumbs addClass="uk-margin-large-left uk-margin-remove-bottom uk-margin-small-top"
[breadcrumbs]="breadcrumbs"></breadcrumbs>
<div class="uk-container uk-margin-bottom">
<helper *ngIf="pageContents && pageContents['top'] && pageContents['top'].length > 0"
[texts]="pageContents['top']"></helper>
<div id="invite" class=" uk-card uk-card-default uk-padding uk-margin-top">
<div class="uk-text-large uk-text-center uk-width-5-6@l uk-width ">Invite users to subscribe</div>
<div class="uk-margin-top">
<errorMessages [status]="[status]" [type]="'community'"></errorMessages>
</div>
<div *ngIf="missingCommunityId" class="uk-alert uk-alert-warning" role="alert">{{missingCommunityId}}</div>
<div *ngIf="successfulSentMessage" class="uk-alert uk-alert-success"
role="alert">{{successfulSentMessage}} {{successfulSentRecipients}}</div>
<div *ngIf="failureSentMessage" class="uk-alert uk-alert-warning"
role="alert">{{failureSentMessage}} {{failureSentRecipients}}</div>
<div *ngIf="inviteErrorMessage" class="uk-alert uk-alert-warning" role="alert">{{inviteErrorMessage}}</div>
<div *ngIf="communityId != null && status == errorCodes.DONE">
<table class="uk-table uk-align-center">
<tbody>
<!-- <tr>
<td>
</td>
<td>
<li>Invite by email</li>
</td>
</tr> -->
<tr>
<td for="from" class="uk-text-bold uk-width-1-4 uk-text-right">From <span
class="uk-text-danger uk-text-bold">*</span> :
</td>
<td class="uk-text-left uk-width-expand">
<input placeholder="Type your name" type="text" (click)="resetMessages()"
class="form-control uk-input uk-width-large@l uk-width-medium@s" [(ngModel)]="body.fromName"
id="from" required>
<div *ngIf="!body.fromName" class="uk-width-large uk-text-danger uk-text-small">Please add your name.
</div>
</td>
</tr>
<tr>
<td for="recipients" class="uk-text-bold uk-text-right">To <span
class="uk-text-danger uk-text-bold">*</span> :
</td>
<td class="uk-text-left">
<input placeholder="email" type="text" (click)="resetMessages(); areValid=true"
class="form-control uk-input uk-width-large@l uk-width-medium@s" [(ngModel)]="recipients"
id="recipients"
required>
<div *ngIf="areValid && !showAddRecipientMessage" class="uk-width-medium uk-text-muted uk-text-small">
separate multiple emails with a comma
</div>
<div *ngIf="recipients && !areValid" class="uk-width-large uk-text-danger uk-text-small">Please add
valid email/s.
</div>
<div *ngIf="isEmpty(recipients) && showAddRecipientMessage"
class="uk-width-large uk-text-danger uk-text-small">Please add a recipient.
</div>
</td>
</tr>
</tbody>
</table>
<div class="boundary-align uk-panel uk-placeholder">
<table class="uk-table uk-align-center uk-padding">
<tbody>
<tr>
<td for="email.body" class="uk-text-bold">Message:</td>
<td *ngIf="allowEdit()" class="uk-width-expand uk-text-left">
<ckeditor (click)="resetMessages()"
class="form-control" [(ngModel)]="body.paragraphs" id="message"
debounce="400"
[config]="{ extraAllowedContent: '* [uk-*](*) ; span', disallowedContent: 'script; *[on*]', removeButtons: 'Save,NewPage,DocProps,Preview,Print',
extraPlugins: 'divarea'}">
<!-- <id="contentTag"-->
<!--(ready)="onReady($event)"-->
<!--(focus)="onFocus($event)"-->
<!--[config]="{uiColor: '#99000'}"-->
<!--(blur)="onBlur($event)"-->
<!--(change)="onChange($event)"-->
</ckeditor>
</td>
<td *ngIf="!allowEdit()" class="uk-text-left">
<div [innerHtml]="body.paragraphs"></div>
</td>
</tr>
<tr>
<td></td>
<td class="uk-text-left">
<!-- {{body.closing}}<br> -->
{{body.signature}}
<span *ngIf="body.fromName == ''" class="uk-text-muted">
<i>{{body.fromMessage}}...</i>
</span>
<span *ngIf="body.fromName !=''">
{{body.fromMessage}}
<b>{{body.fromName}}</b>
</span>
<br><a href="https://www.openaire.eu">www.openaire.eu</a>
</td>
</tr>
</tbody>
</table>
</div>
<table class="uk-table uk-align-center">
<tbody>
<tr>
<td class="uk-text-bold uk-width-3-5@xl uk-width-3-5@m uk-width-3-5@s uk-text-right"></td>
<td>
<div class="uk-padding uk-padding-remove-top uk-padding-remove-bottom uk-text-danger uk-text-bold">*
Required fields
</div>
</td>
</tr>
<tr>
<td class="uk-text-right"></td>
<td>
<div
class="uk-grid-margin uk-first-column uk-align-center uk-text-left uk-padding uk-padding-remove-top uk-padding-remove-bottom">
<button class="uk-button portal-button" (click)="invite()">Invite</button>
</div>
</td>
</tr>
</tbody>
</table>
<div class="uk-text-left">
<span uk-icon="chevron-left"></span><span class="uk-margin-small-left">
[Trunk | Connect]: Connect redesing 1. app.component.ts: <subscribe> and <invite> components added (floating buttons on the right side of each page for communities). 2. community.component.html: 3. community.component.ts: a. 'projectsCalculated' and 'contentProvidersCalculated' fields added, to calculate tootlip after both requests complete b. added methods for building tootips c. 'activeTab' set to 'summary'. 4. affiliations.component.html: minor phrasing changes (e.g. title). 5. curators.component.html: shortview changed. 6. results.component.ts: Title changed | 'View all' moved to the bottom. 7. customization.component.ts: Changed '--portal-main-color' from '#4C9CD5' to '#4687E6' | Changed '--portal-dark-color' from '#24857F' to '#2D72D6'. 8. invite.component.html: shortview changed. 9. invite.component.ts: 'properties' field as input (get it is called from app.component). 10. invite.module.ts & inviteBasic.module.ts: InviteBasicModule created to declare InviteComponent without routing and login guard | InviteModule imports InviteBasicModule and adds routing and login guar$ 11. subscribe.component.ts: Changes for subscribe button and members | 'properties' field as input (get it is called from app.component). 12. connect-custom.css: css for subscribe and invite buttons and for tooltip with 'community-page-tooltip' class. 13. customization.css: class 'communityBackground' added and css for 'subtitle' class inside 'communityBackground'. git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-connect-portal/trunk@58549 d315682c-612b-4755-9ff5-7f18f6832af3
2020-04-24 18:38:35 +02:00
<a [queryParams]="communityIdParam" routerLinkActive="router-link-active"
routerLink="/" class="portal-link">Back</a>
</span>
</div>
</div>
</div>
<helper *ngIf="pageContents && pageContents['bottom'] && pageContents['bottom'].length > 0"
[texts]="pageContents['bottom']"></helper>
</div>
</div>
</div>
[Trunk | Connect]: 1. app-routing.module.ts: Add route '/subjects'. 2. app.component.ts: Group subscribe and invite buttons under id="subscribeAndInviteBtn" (keep distance between them alwayes the same) | uncomment menu item 'Subjects' in About. 3. app.module.ts: import 'SubscribeService' (singleton service to update everywhere subscriber status). 4. libUser.module.ts & subscribe.module.ts: remove import of 'SubscribeService' (singleton service to update everywhere subscriber status). 5. community.component.html: a. Improve some checks b. In main tabs of the page (class main-tabs) add class 'uk-text-truncate' and remove class 'uk-width-3-4' (each tab has max-width) c. Add icon in 'Analytics' tab d. [Bug fix] In description, fix overflow and max height of box 6. community.component.ts: Add field '@ViewChild(SubscribeComponent) subscribeComponent: SubscribeComponent' to add some checks in html. 7. curators.component.html: Remove div with class 'image-front-topbar' | Update css for title | Add <breadcrumbs> | Add user icon for each curator. 8. curators.component.ts: Initialize breadcrumb | [Bug fix] In methods 'getPageContents()' and 'getDivContents()' use communityId (instead of 'connect'). 9. curators.module.ts & organizationsPage.module.ts & inviteBasic.module.ts: import 'BreadcrumbsModule'. 10. organizationsPage.component.ts: Update css for title | Add <breadcrumbs> | Initialize breadcrumb. 11. subjects.component.ts, subjects.module.ts, subjects-routing.module.ts: Add page for Subjects. 12. invite.component.html: Add <breadcrumbs> in longView | Add icon in button 'Invite users'. 13. invite.component.ts: Initialize breadcrumb. 14. subscribe.component.ts: a. Add icon in button "Subscribe"/ "Subscribed" b. Add class 'uk-display-inline-block' in showNumbers (members) c. Initialize and get subscriber status with new methods of service (initIsSubscribedToCommunity() & isSubscribed - BehaviorSubject instead of isSubscribedToCommunity()) 15. connect-custom.css: Group css for #subscribeBtn, #inviteBtn into #subscribeAndInviteBtn | Add css for class 'user-circle-background' (background of user icon in curators). git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-connect-portal/trunk@58574 d315682c-612b-4755-9ff5-7f18f6832af3
2020-04-28 13:07:36 +02:00
<div *ngIf="!longView" class="uk-margin-small-top">
<button
[class]=" ((buttonSizeSmall)?'uk-button-small':'') + ' uk-button portal-button uk-button-small uk-width-1-1'">
[Trunk | Connect]: 1. app-routing.module.ts: Add route '/subjects'. 2. app.component.ts: Group subscribe and invite buttons under id="subscribeAndInviteBtn" (keep distance between them alwayes the same) | uncomment menu item 'Subjects' in About. 3. app.module.ts: import 'SubscribeService' (singleton service to update everywhere subscriber status). 4. libUser.module.ts & subscribe.module.ts: remove import of 'SubscribeService' (singleton service to update everywhere subscriber status). 5. community.component.html: a. Improve some checks b. In main tabs of the page (class main-tabs) add class 'uk-text-truncate' and remove class 'uk-width-3-4' (each tab has max-width) c. Add icon in 'Analytics' tab d. [Bug fix] In description, fix overflow and max height of box 6. community.component.ts: Add field '@ViewChild(SubscribeComponent) subscribeComponent: SubscribeComponent' to add some checks in html. 7. curators.component.html: Remove div with class 'image-front-topbar' | Update css for title | Add <breadcrumbs> | Add user icon for each curator. 8. curators.component.ts: Initialize breadcrumb | [Bug fix] In methods 'getPageContents()' and 'getDivContents()' use communityId (instead of 'connect'). 9. curators.module.ts & organizationsPage.module.ts & inviteBasic.module.ts: import 'BreadcrumbsModule'. 10. organizationsPage.component.ts: Update css for title | Add <breadcrumbs> | Initialize breadcrumb. 11. subjects.component.ts, subjects.module.ts, subjects-routing.module.ts: Add page for Subjects. 12. invite.component.html: Add <breadcrumbs> in longView | Add icon in button 'Invite users'. 13. invite.component.ts: Initialize breadcrumb. 14. subscribe.component.ts: a. Add icon in button "Subscribe"/ "Subscribed" b. Add class 'uk-display-inline-block' in showNumbers (members) c. Initialize and get subscriber status with new methods of service (initIsSubscribedToCommunity() & isSubscribed - BehaviorSubject instead of isSubscribedToCommunity()) 15. connect-custom.css: Group css for #subscribeBtn, #inviteBtn into #subscribeAndInviteBtn | Add css for class 'user-circle-background' (background of user icon in curators). git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-connect-portal/trunk@58574 d315682c-612b-4755-9ff5-7f18f6832af3
2020-04-28 13:07:36 +02:00
<span class="uk-icon uk-flex uk-flex-middle">
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24">
<path d="M0 0h24v24H0z" fill="none"></path>
<path
d="M8 10H5V7H3v3H0v2h3v3h2v-3h3v-2zm10 1c1.66 0 2.99-1.34 2.99-3S19.66 5 18 5c-.32 0-.63.05-.91.14.57.81.9 1.79.9 2.86s-.34 2.04-.9 2.86c.28.09.59.14.91.14zm-5 0c1.66 0 2.99-1.34 2.99-3S14.66 5 13 5c-1.66 0-3 1.34-3 3s1.34 3 3 3zm6.62 2.16c.83.73 1.38 1.66 1.38 2.84v2h3v-2c0-1.54-2.37-2.49-4.38-2.84zM13 13c-2 0-6 1-6 3v2h12v-2c0-2-4-3-6-3z"></path>
[Trunk | Connect]: 1. app-routing.module.ts: Add route '/subjects'. 2. app.component.ts: Group subscribe and invite buttons under id="subscribeAndInviteBtn" (keep distance between them alwayes the same) | uncomment menu item 'Subjects' in About. 3. app.module.ts: import 'SubscribeService' (singleton service to update everywhere subscriber status). 4. libUser.module.ts & subscribe.module.ts: remove import of 'SubscribeService' (singleton service to update everywhere subscriber status). 5. community.component.html: a. Improve some checks b. In main tabs of the page (class main-tabs) add class 'uk-text-truncate' and remove class 'uk-width-3-4' (each tab has max-width) c. Add icon in 'Analytics' tab d. [Bug fix] In description, fix overflow and max height of box 6. community.component.ts: Add field '@ViewChild(SubscribeComponent) subscribeComponent: SubscribeComponent' to add some checks in html. 7. curators.component.html: Remove div with class 'image-front-topbar' | Update css for title | Add <breadcrumbs> | Add user icon for each curator. 8. curators.component.ts: Initialize breadcrumb | [Bug fix] In methods 'getPageContents()' and 'getDivContents()' use communityId (instead of 'connect'). 9. curators.module.ts & organizationsPage.module.ts & inviteBasic.module.ts: import 'BreadcrumbsModule'. 10. organizationsPage.component.ts: Update css for title | Add <breadcrumbs> | Initialize breadcrumb. 11. subjects.component.ts, subjects.module.ts, subjects-routing.module.ts: Add page for Subjects. 12. invite.component.html: Add <breadcrumbs> in longView | Add icon in button 'Invite users'. 13. invite.component.ts: Initialize breadcrumb. 14. subscribe.component.ts: a. Add icon in button "Subscribe"/ "Subscribed" b. Add class 'uk-display-inline-block' in showNumbers (members) c. Initialize and get subscriber status with new methods of service (initIsSubscribedToCommunity() & isSubscribed - BehaviorSubject instead of isSubscribedToCommunity()) 15. connect-custom.css: Group css for #subscribeBtn, #inviteBtn into #subscribeAndInviteBtn | Add css for class 'user-circle-background' (background of user icon in curators). git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-connect-portal/trunk@58574 d315682c-612b-4755-9ff5-7f18f6832af3
2020-04-28 13:07:36 +02:00
</svg>
<span class="space">Invite users</span>
</span>
</button>
<div uk-dropdown="mode: click" class="uk-form uk-margin-small uk-alert uk-background-default" id="toggle-usage">
<div class="uk-margin-top">
<errorMessages [status]="[status]" [type]="'community'"></errorMessages>
</div>
<div *ngIf="missingCommunityId" class="uk-width-large uk-text-warning uk-text-small uk-margin-top"
role="alert">{{missingCommunityId}}</div>
<div *ngIf="successfulSentMessage" class="uk-width-large uk-text-success uk-text-small uk-margin-top"
role="alert">{{successfulSentMessage}} {{successfulSentRecipients}}</div>
<div *ngIf="failureSentMessage" class="uk-width-large uk-text-warning uk-text-small uk-margin-top"
role="alert">{{failureSentMessage}} {{failureSentRecipients}}</div>
<div *ngIf="inviteErrorMessage" class="uk-width-large uk-text-warning uk-text-small uk-margin-top"
role="alert">{{inviteErrorMessage}}</div>
<div *ngIf="recipients && !areValid" class="uk-width-large uk-text-danger uk-text-small uk-margin-top">Please add
valid email/s.
</div>
<div *ngIf="isEmpty(recipients) && showAddRecipientMessage"
class="uk-width-large uk-text-danger uk-text-small uk-margin-top">Please add a recipient.
</div>
<input (click)="resetMessages(); areValid=true" placeholder="Type e-mails" type="text"
class="form-control uk-input uk-form-small uk-form" [(ngModel)]="recipients" id="recipients"
required>
<div class="uk-width-medium uk-text-muted uk-text-small">separate with commas</div>
<div class="uk-margin-small-top uk-text-center ">
<button class=" uk-button portal-button ignoreCommunityPanelBackground uk-button-small " (click)="invite()">
Invite
</button>
{{" "}}
<a class=" uk-button uk-button-default uk-button-small ignoreCommunityPanelBackground "
[queryParams]="communityIdParam"
routerLinkActive="router-link-active" routerLink="/invite">
<span class="uk-margin-xsmall-left uk-icon">
<svg width="16" height="16" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"
icon="cog"
ratio="0.8"><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>
Customize
</a>
</div>
</div>
</div>