[Library | Trunk]: Fix visibility for stakeholders search page

git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@59739 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
k.triantafyllou 2020-11-02 16:55:05 +00:00
parent cf01c65fcc
commit a0f14dbb10
4 changed files with 22 additions and 9 deletions

View File

@ -55,6 +55,7 @@ export class Stakeholder {
export class StakeholderInfo extends Stakeholder {
isManager: boolean = false;
isMember: boolean = false;
}
export class Topic {

View File

@ -3,7 +3,7 @@
<li *ngFor="let result of results" class="uk-animation-fade uk-margin-auto">
<div class="portalSearchCard uk-position-relative">
<div class="badges">
<div *ngIf="result.isSubscribed"
<div *ngIf="type === 'community' && result.isSubscribed"
class="portal-card-badge uk-text-center">
<span>Subscribed</span>
</div>
@ -11,11 +11,12 @@
class="private-card-badge uk-text-center ">
<span>Private</span>
</div>
<div *ngIf="type === 'stakeholder' && !result.isPublic"
class="private-card-badge uk-text-center ">
<span>Private</span>
</div>
</div>
<!--<div *ngIf="type === 'stakeholder' && result.visibility !== 'PUBLIC'"
class="uk-position-top-right uk-margin-top uk-margin-right">
<icon [name]="visibilityIcon.get(result.visibility)"></icon>
<span class="space uk-text-small uk-text-capitalize">{{result.visibility.toLowerCase()}}</span>
</div>-->
<div class="uk-grid uk-flex uk-flex-middle" uk-grid>
<a *ngIf="directLink" [href]="(type === 'community')?getCommunityPageUrl(result):getStakeholderPageUrl(result)"
target="_blank"

View File

@ -5,7 +5,7 @@ import {EnvProperties} from '../../utils/properties/env-properties';
import {CommunityInfo, prodReadyCommunities} from "../../connect/community/communityInfo";
import {Router} from "@angular/router";
import {LocalStorageService} from "../../services/localStorage.service";
import {Stakeholder, StakeholderInfo} from "../../monitor/entities/stakeholder";
import {Stakeholder, StakeholderInfo, Visibility} from "../../monitor/entities/stakeholder";
@Component({
selector: 'portal-search-result',
@ -22,7 +22,11 @@ export class PortalSearchResultComponent implements OnInit, OnChanges{
@Input() properties: EnvProperties;
@Input() maxCharacters: number = 150;
@ViewChild('AlertModal') modal;
/*visibilityIcon: Map<Visibility, string> = new Map<Visibility, string> ([
["PUBLIC", 'earth'],
["PRIVATE", 'lock'],
["RESTRICTED", 'group']
]);*/
public urlParam: string;
public errorCodes: ErrorCodes = new ErrorCodes();

View File

@ -6,12 +6,15 @@ import {ErrorMessagesModule} from '../../utils/errorMessages.module';
import {PortalSearchResultComponent} from "./portal-search-result.component";
import {AlertModalModule} from "../../utils/modal/alertModal.module";
import {ManageModule} from "../../utils/manage/manage.module";
import {IconsModule} from "../../utils/icons/icons.module";
import {IconsService} from "../../utils/icons/icons.service";
import {group, lock} from "../../utils/icons/icons";
@NgModule({
imports: [
CommonModule, FormsModule,
RouterModule, ErrorMessagesModule,
AlertModalModule, ManageModule
AlertModalModule, ManageModule, IconsModule
],
declarations: [
PortalSearchResultComponent
@ -22,4 +25,8 @@ import {ManageModule} from "../../utils/manage/manage.module";
PortalSearchResultComponent
]
})
export class PortalSearchResultModule { }
export class PortalSearchResultModule {
/*constructor(private iconsService: IconsService) {
this.iconsService.registerIcons([group, lock])
}*/
}