[Trunk|Librady]: 1. Change color of Okbutton(when is right) to portal button. 2. Add isSubscribed and isManager to CommunityInfo and removed all from SearchResults.
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@55339 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
5fc08be901
commit
bb3a22be2b
|
@ -11,4 +11,6 @@ export class CommunityInfo {
|
||||||
subjects: string[];
|
subjects: string[];
|
||||||
status:string;
|
status:string;
|
||||||
zenodoCommunity:string;
|
zenodoCommunity:string;
|
||||||
|
isSubscribed: boolean;
|
||||||
|
isManager: boolean;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,38 +2,38 @@
|
||||||
<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 uk-inline" (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)">
|
||||||
<div *ngIf="result.isSubscribed" class="uk-position-top-right uk-card-badge portal-card-badge uk-width-1-2 uk-text-small uk-text-center">
|
<div *ngIf="result.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>
|
<span>Subscribed</span>
|
||||||
</div>
|
</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.logoUrl != null && result.logoUrl != '' " class="uk-padding uk-position-center" src="{{result.logoUrl}}" alt="{{(result.title)?result.title:result.shortTitle}} logo" >
|
||||||
<span *ngIf= "result.community.logoUrl == null || result.community.logoUrl == '' " class="uk-icon uk-padding uk-position-center">
|
<span *ngIf= "result.logoUrl == null || result.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-card-badge private-card-badge uk-width-2-5 uk-position-top-left uk-text-small uk-text-center ">
|
<div *ngIf="result.status == 'manager'" class="uk-card-badge private-card-badge uk-width-2-5 uk-position-top-left uk-text-small uk-text-center ">
|
||||||
<span class="uk-padding-small">Private</span>
|
<span class="uk-padding-small">Private</span>
|
||||||
</div>
|
</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.shortTitle class="uk-text-large uk-grid">
|
||||||
<a (click)="confirmModalOpen(result.community)" [class]="(result.isManager)?'uk-width-3-4':''">
|
<a (click)="confirmModalOpen(result)" [class]="(result.isManager)?'uk-width-3-4':''">
|
||||||
{{(result.community.title)?result.community.title:result.community.shortTitle}}
|
{{(result.title)?result.title:result.shortTitle}}
|
||||||
</a>
|
</a>
|
||||||
<manage *ngIf="result.isManager" [communityId]="result.community.communityId" class="uk-width-expand uk-margin-auto-right"></manage>
|
<manage *ngIf="result.isManager" [communityId]="result.communityId" class="uk-width-expand uk-margin-auto-right"></manage>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="result.community.description">
|
<div *ngIf="result.description">
|
||||||
<div class="text-justify descriptionText uk-margin-auto-right" [title]="result.community.description">
|
<div class="text-justify descriptionText uk-margin-auto-right" [title]="result.description">
|
||||||
{{_formatDescription(result.community.description)}}
|
{{_formatDescription(result.description)}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="uk-padding-small uk-padding-remove-left uk-grid">
|
<div class="uk-padding-small uk-padding-remove-left uk-grid">
|
||||||
<div class="uk-width-1-2">
|
<div class="uk-width-1-2">
|
||||||
<span *ngIf="result.community.date"><b> Creation Date: </b></span>
|
<span *ngIf="result.date"><b> Creation Date: </b></span>
|
||||||
<span *ngIf="result.community.date">{{result.community.date | date:'dd-MM-yyyy'}}</span>
|
<span *ngIf="result.date">{{result.date | date:'dd-MM-yyyy'}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="uk-width-expand uk-align-right uk-margin-auto-right">
|
<div class="uk-width-expand uk-align-right uk-margin-auto-right">
|
||||||
<span *ngIf="result.community.type && result.community.type != ''" ><b> Type: </b></span>
|
<span *ngIf="result.type && result.type != ''" ><b> Type: </b></span>
|
||||||
<span *ngIf="result.community.type && result.community.type != ''" >{{(result.community.type == 'ri')? 'Research Initiative': 'Research Community'}}</span>
|
<span *ngIf="result.type && result.type != ''" >{{(result.type == 'ri')? 'Research Initiative': 'Research '}}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -2,7 +2,6 @@ import {Component, Input, ViewChild} from '@angular/core';
|
||||||
import {ErrorCodes} from '../../utils/properties/errorCodes';
|
import {ErrorCodes} from '../../utils/properties/errorCodes';
|
||||||
import {RouterHelper} from '../../utils/routerHelper.class';
|
import {RouterHelper} from '../../utils/routerHelper.class';
|
||||||
import{EnvProperties} from '../../utils/properties/env-properties';
|
import{EnvProperties} from '../../utils/properties/env-properties';
|
||||||
import {SearchResult} from "../../utils/entities/searchResult";
|
|
||||||
import {CommunityInfo} from "../../connect/community/communityInfo";
|
import {CommunityInfo} from "../../connect/community/communityInfo";
|
||||||
import {Router} from "@angular/router";
|
import {Router} from "@angular/router";
|
||||||
@Component({
|
@Component({
|
||||||
|
@ -11,7 +10,7 @@ import {Router} from "@angular/router";
|
||||||
})
|
})
|
||||||
|
|
||||||
export class CommunitySearchResultsComponent {
|
export class CommunitySearchResultsComponent {
|
||||||
@Input() results: SearchResult[];
|
@Input() results: CommunityInfo[];
|
||||||
@Input() status: number;
|
@Input() status: number;
|
||||||
@Input() type: string;
|
@Input() type: string;
|
||||||
@Input() showLoading: boolean = false;
|
@Input() showLoading: boolean = false;
|
||||||
|
|
|
@ -52,11 +52,6 @@ export class SearchResult {
|
||||||
entityType: string;
|
entityType: string;
|
||||||
types: string[];
|
types: string[];
|
||||||
|
|
||||||
// communities
|
|
||||||
community: CommunityInfo;
|
|
||||||
isSubscribed: boolean;
|
|
||||||
isManager: boolean;
|
|
||||||
|
|
||||||
constructor(){}
|
constructor(){}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,10 +17,10 @@ import {Component, ViewEncapsulation, ElementRef, EventEmitter, Output} from '@a
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="okButtonLeft" class="uk-text-right" [hidden]=!alertFooter>
|
<div *ngIf="okButtonLeft" class="uk-text-right" [hidden]=!alertFooter>
|
||||||
<span [hidden]=!okButton >
|
<span [hidden]=!okButton >
|
||||||
<button class=" uk-button uk-button-default " (click)="ok()">{{okButtonText}}</button>
|
<button class="uk-button uk-button-default" (click)="ok()">{{okButtonText}}</button>
|
||||||
</span>
|
</span>
|
||||||
<span [hidden]=!cancelButton>
|
<span [hidden]=!cancelButton>
|
||||||
<button class=" uk-button uk-button-default" (click)="cancel()">{{cancelButtonText}}</button>
|
<button class="uk-button uk-button-default" (click)="cancel()">{{cancelButtonText}}</button>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="!okButtonLeft" class="uk-text-right" [hidden]=!alertFooter>
|
<div *ngIf="!okButtonLeft" class="uk-text-right" [hidden]=!alertFooter>
|
||||||
|
@ -28,7 +28,7 @@ import {Component, ViewEncapsulation, ElementRef, EventEmitter, Output} from '@a
|
||||||
<button class="uk-button uk-button-default" (click)="cancel()">{{cancelButtonText}}</button>
|
<button class="uk-button uk-button-default" (click)="cancel()">{{cancelButtonText}}</button>
|
||||||
</span>
|
</span>
|
||||||
<span [hidden]=!okButton >
|
<span [hidden]=!okButton >
|
||||||
<button class="uk-button uk-button-default" (click)="ok()">{{okButtonText}}</button>
|
<button class="uk-button portal-button" (click)="ok()">{{okButtonText}}</button>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue