[Trunk|Connect]

app: add user menu "Support"

browseCommunity Component: 
	separate html, add community check in the template (error in build)
	remove isManager attribute

Search communities:
	add new class for the form
	add new image

User/Invite components:
	add a field, make a class public (correct errors in build)


git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-connect-portal/trunk@55375 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
argiro.kokogiannaki 2019-04-16 10:43:08 +00:00
parent de5c6889ef
commit 65c522ee64
9 changed files with 62 additions and 76 deletions

View File

@ -186,7 +186,7 @@ export class AppComponent {
new MenuItem("","Invite users","","/invite",false,[],[],this.properties.environment!="development"?{}:{communityId:community.communityId}),
];
if(this.managerOfCommunities.length > 0 ){
this.userMenuItems.push(new MenuItem("","Technical support","https://openaire-connect.d4science.org/group/openaire-connect-gateway/explore?siteId=172366611","",false,[],[],{}))
this.userMenuItems.push(new MenuItem("","Support","https://openaire-connect.d4science.org/group/openaire-connect-gateway/explore?siteId=172366611","",false,[],[],{}))
}
}
this.showMenu = true;

View File

@ -0,0 +1,48 @@
<div class="uk-container" *ngIf="community" >
<span>
<div class="uk-card-media-top">
<a (click)="confirmModalOpen()">
<div style="" class="uk-margin-auto communitiesImageBox">
<div *ngIf="community.status =='manager'" class="uk-card-badge private-card-badge uk-width-1-3 uk-position-top-left uk-text-small uk-text-center">
Private
</div>
<div *ngIf="community.isSubscribed" class="uk-position-top-right uk-card-badge portal-card-badge uk-width-1-2 uk-text-small uk-text-center">
<span>Subscribed</span>
</div>
<img *ngIf= "community.logoUrl != null && community.logoUrl != '' " src="{{community.logoUrl}}" alt="{{(community.title)?community.title:community.shortTitle}} logo" class="uk-height-small uk-responsive-height uk-padding-small">
<span *ngIf= "community.logoUrl == null || community.logoUrl == '' "class="uk-icon uk-padding-small">
<svg width="50" height="37" 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>
</div>
</a>
</div>
</span>
<div class="uk-text-center community-main">
<p class="uk-text-small uk-text-bold uk-margin-small community-title">
<a (click)="confirmModalOpen()">
<span class="uk-text-small uk-margin-small" *ngIf="community.title" >
{{community.title.slice(0,thresholdTitle)}}
<span *ngIf="community.title.length > thresholdTitle">...</span>
</span>
<span class="uk-text-small uk-margin-small" *ngIf="!community.title && community.shortTitle" >
{{community.shortTitle.slice(0,thresholdTitle)}}
<span *ngIf="community.shortTitle.length > thresholdTitle">...</span>
</span>
</a>
</p>
<p class="uk-text-small uk-margin-small community-title2" *ngIf="community.description != null && showDescription">
<span>{{community.description.slice(0,thresholdDescription)}}<span *ngIf="community.description.length > thresholdDescription">...</span></span>
</p>
</div>
<div *ngIf="community.isManager" class=" uk-margin-small">
<manage [communityId]="community.communityId"></manage>
</div>
</div>
<modal-alert #AlertModal (alertOutput)="goToCommunityPage($event)">
<div class="uk-text-center">
The profile will be presented in a new tab.<br>
Are you sure that you want to proceed?
</div>
</modal-alert>

View File

@ -10,76 +10,11 @@ import {CommunityInfo} from '../../openaireLibrary/co
@Component({
selector: 'browse-community',
template: `
<!--community-card-height-->
<!--div [class]="(showDescription ? 'uk-height-max-medium' : 'uk-height-max-medium') + ' uk-card uk-card-default uk-padding-small'"
[attr.uk-tooltip]="((!showDescription && community.description) ? ('title: '+ community.description) : 'cls: uk-invisible')"-->
<!--+ (community.status != 'all' ? '<hr> '+hiddenMessage : '')-->
<div class="uk-container">
<span>
<div class="uk-card-media-top">
<a (click)="confirmModalOpen()">
<div style="" class="uk-margin-auto communitiesImageBox">
<!--class="uk-card-badge portal-card-badge uk-width-1-2 uk-position-top-left uk-text-small uk-text-center"-->
<!--div *ngIf="community.status !='all'" class="uk-card-badge portal-card-badge uk-width-1-3 uk-position-top-left uk-text-small uk-text-center"
[attr.uk-tooltip]="showDescription || !community.description ? 'title: ' + hiddenMessage : 'cls: uk-invisible'">
Private
</div-->
<!--div *ngIf="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-->
<div *ngIf="community.status =='manager'" class="uk-card-badge private-card-badge uk-width-1-3 uk-position-top-left uk-text-small uk-text-center">
Private
</div>
<div *ngIf="community.isSubscribed" class="uk-position-top-right uk-card-badge portal-card-badge uk-width-1-2 uk-text-small uk-text-center">
<span>Subscribed</span>
</div>
<img *ngIf= "community.logoUrl != null && community.logoUrl != '' " src="{{community.logoUrl}}" alt="{{(community.title)?community.title:community.shortTitle}} logo" class="uk-height-small uk-responsive-height uk-padding-small">
<span *ngIf= "community.logoUrl == null || community.logoUrl == '' "class="uk-icon uk-padding-small">
<svg width="50" height="37" 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>
</div>
</a>
</div>
</span>
<!--uk-height-match=".community-title"-->
<div class="uk-text-center community-main">
<!--[class]="(isManager ? 'community-title-height ' : '') + -->
<p class="uk-text-small uk-text-bold uk-margin-small community-title">
<a (click)="confirmModalOpen()">
<!--{{(community.title)?community.title:community.shortTitle}}-->
<span class="uk-text-small uk-margin-small" *ngIf="community.title" >{{community.title.slice(0,thresholdTitle)}}<span *ngIf="community.title.length > thresholdTitle">...</span></span>
<span class="uk-text-small uk-margin-small" *ngIf="!community.title && community.shortTitle" >{{community.shortTitle.slice(0,thresholdTitle)}}<span *ngIf="community.shortTitle.length > thresholdTitle">...</span></span>
</a>
</p>
<!--[class]="(isManager ? 'community-description-height ' : '') + -->
<!--community-description-font -->
<p class="uk-text-small uk-margin-small community-title2" *ngIf="community.description != null && showDescription">
<span>{{community.description.slice(0,thresholdDescription)}}<span *ngIf="community.description.length > thresholdDescription">...</span></span>
</p>
</div>
<!--uk-margin-small-bottom-->
<!--uk-position-bottom-->
<!--*ngIf="isManager" -->
<div *ngIf="community.isManager" class=" uk-margin-small">
<manage [communityId]="community.communityId"></manage>
</div>
</div>
<modal-alert #AlertModal (alertOutput)="goToCommunityPage($event)">
<div class="uk-text-center">
The profile will be presented in a new tab.<br>
Are you sure that you want to proceed?
</div>
</modal-alert>
`
templateUrl: 'browse-community.component.html'
})
export class BrowseCommunityComponent {
@Input() public community: CommunityInfo = null;
@Input() public isManager: boolean = false;
@Input() public showDescription: boolean = true;
@ViewChild('AlertModal') modal;

View File

@ -17,7 +17,7 @@
<div *ngFor="let community of managerOfCommunities.slice(0,3); let i = index">
<div class="uk-padding-small uk-height-max-medium uk-card uk-card-default"
[attr.uk-tooltip]="((community.description) ? ('title: '+ community.description + '; pos: bottom-right') : 'cls: uk-invisible')">
<browse-community [community]="community" [showDescription]="false" [isManager]="true"></browse-community>
<browse-community [community]=community [showDescription]=false></browse-community>
</div>
</div>
</div>
@ -44,7 +44,7 @@
<div *ngFor="let community of subscriberOfCommunities.slice(0,3); let i = index">
<div class="uk-padding-small uk-height-max-medium uk-card uk-card-default"
[attr.uk-tooltip]="((community.description) ? ('title: '+ community.description + '; pos: bottom-right') : 'cls: uk-invisible')">
<browse-community [community]="community" [showDescription]="false"></browse-community>
<browse-community [community]=community [showDescription]=false></browse-community>
</div>
</div>
</div>
@ -110,7 +110,7 @@
<div class="uk-grid-match uk-grid-small uk-child-width-1-5@m uk-child-width-1-2@s uk-child-width-1-1@xs uk-text-center" uk-grid uk-height-match=".community-main">
<div *ngFor="let community of researchCommunities.slice(0,5); let i = index">
<div class="uk-padding-small uk-height-max-medium uk-card uk-card-default">
<browse-community [community]="community"></browse-community>
<browse-community [community]=community></browse-community>
</div>
</div>
</div>
@ -131,7 +131,7 @@
<div class="uk-grid-match uk-grid-small uk-child-width-1-5@m uk-child-width-1-2@s uk-child-width-1-1@xs uk-text-center" uk-grid uk-height-match=".community-main">
<div *ngFor="let community of researchInitiatives.slice(0,5); let i = index">
<div class="uk-padding-small uk-height-max-medium uk-card uk-card-default">
<browse-community [community]="community"></browse-community>
<browse-community [community]=community></browse-community>
</div>
</div>
</div>

View File

@ -51,10 +51,13 @@ export class OpenaireUserComponent {
subscribeLoading:boolean = false;
subscribeError:boolean = false;
isSubscribed:boolean = false;
public server: boolean = true;
constructor(private _subscribeService: SubscribeService,
private _emailService: EmailService, private route: ActivatedRoute){}
public ngOnInit() {
if( typeof document !== 'undefined') {
this.server = false;
}
this.route.data
.subscribe((data: { envSpecific: any }) => {
this.route.queryParams.subscribe(

View File

@ -21,7 +21,7 @@ import {of} from "rxjs/observable/of";
selector: 'search-communities',
template: `
<search-page pageTitle="OpenAIRE-Connect | Search Communities"
[hasPrefix]=false
[hasPrefix]=false searchFormClass="communitiesSearchForm"
formPlaceholderText="Search for Research Communities and Initiatives"
type="communities" entityType="community" [filters]="filters"
[results]="results" [searchUtils]="searchUtils"

View File

@ -174,7 +174,7 @@ export class InviteComponent implements OnInit {
}
}
private isEmpty(data: string): boolean {
public isEmpty(data: string): boolean {
if (data != undefined && !data.replace(/\s/g, '').length)
return true;
else

View File

@ -54,9 +54,9 @@
}
.searchForm{
.searchForm, .communitiesSearchForm{
background: url('./home.jpg') !important;
background: url('./search.jpg') !important;
}
.generalSearchForm,

BIN
src/assets/search.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 322 KiB