Progress in showing the communities properly - CONNECT

This commit is contained in:
Alex Martzios 2021-11-03 11:41:17 +02:00
parent afcd7fc3c3
commit 1ca8d54296
3 changed files with 13 additions and 4 deletions

View File

@ -6,7 +6,7 @@ export class ConnectHelper {
public static getCommunityFromDomain(domain: string): string{
if(properties.environment == "development") {
domain = "beta.elixir-gr.openaire.eu"; //for testing
domain = "beta.connect.openaire.eu"; //for testing
}
domain = domain.indexOf("//") != -1? domain.split("//")[1]:domain; //remove https:// prefix
if (domain.indexOf('openaire.eu') === -1) {

View File

@ -2,16 +2,22 @@
<errorMessages [status]="[status]" [type]="'results'"></errorMessages>
<li *ngFor="let result of results" class="uk-animation-fade uk-margin-auto">
<div class="uk-card portalSearchCard uk-position-relative uk-flex uk-flex-column uk-flex-center" [class.disabled]="!hasPermission(result)">
<pre>{{hasPermission(result)}}</pre>
<div class="badges">
<div *ngIf="type === 'community' && result.isSubscribed"
class="portal-card-badge uk-text-center">
<span>Subscribed</span>
</div>
<div *ngIf="type === 'community' && result.status == 'manager'"
<!-- <div *ngIf="type === 'community' && result.status == 'manager'"
class="private-card-badge uk-text-center ">
<span>Private</span>
</div>
</div> -->
</div>
<div *ngIf="type === 'community' && result.status == 'manager'"
class="uk-position-top-right uk-margin-small-top uk-margin-right uk-flex uk-flex-middle">
<icon [name]="visibilityIcon.get('PRIVATE')"></icon>
<span class="space uk-text-small uk-text-capitalize">private</span>
</div>
<div *ngIf="result.visibility && result.visibility !== 'PUBLIC'"
class="uk-position-top-right uk-margin-small-top uk-margin-right uk-flex uk-flex-middle">
<icon [name]="visibilityIcon.get(result.visibility)"></icon>

View File

@ -51,7 +51,10 @@ export class PortalSearchResultComponent implements OnInit{
}
hasPermission(result: CommunityInfo & StakeholderInfo) {
return this.type === "community" || result.visibility === "PUBLIC" || result.isManager || result.isMember;
if(result.status == "manager") {
return false;
}
return this.type === "community" || result.visibility === "PUBLIC" || result.isManager || result.isMember;
}
getProductionPrefix(id:string): string {