Align portal search results to center vertically. Add Restricted label top right

This commit is contained in:
Konstantinos Triantafyllou 2021-10-19 15:20:30 +03:00
parent 64051887ce
commit ff98d8187b
3 changed files with 15 additions and 14 deletions

View File

@ -1,7 +1,7 @@
<ul [class]="'uk-list uk-margin ' + custom_class" uk-height-match="target: .portalSearchCard; row: false">
<errorMessages [status]="[status]" [type]="'results'"></errorMessages>
<li *ngFor="let result of results" class="uk-animation-fade uk-margin-auto">
<div class="portalSearchCard uk-position-relative">
<div class="portalSearchCard uk-position-relative uk-flex uk-flex-column uk-flex-center" [class.disabled]="!hasPermission(result)">
<div class="badges">
<div *ngIf="type === 'community' && result.isSubscribed"
class="portal-card-badge uk-text-center">
@ -12,11 +12,11 @@
<span>Private</span>
</div>
</div>
<!--<div *ngIf="type === 'stakeholder' && result.visibility !== 'PUBLIC'"
class="uk-position-top-right uk-margin-top uk-margin-right">
<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>
<span class="space uk-text-small uk-text-capitalize">{{result.visibility.toLowerCase()}}</span>
</div>-->
</div>
<div class="uk-grid uk-flex uk-flex-middle" uk-grid>
<a *ngIf="directLink && hasPermission(result)" [href]="(type === 'community')?getCommunityPageUrl(result):getStakeholderPageUrl(result)"
target="_blank"
@ -41,8 +41,6 @@
class="portal-link">
{{(result.title) ? result.title : result.shortTitle}}
</a>
<manage *ngIf="result.isManager" [communityId]="result.communityId"
class="uk-width-expand uk-margin-auto-right"></manage>
</div>
<div *ngIf="type === 'stakeholder'" [title]="result.index_shortName" class="uk-text-large uk-grid">
<a *ngIf="directLink && hasPermission(result)" [href]="getStakeholderPageUrl(result)" target="_blank"
@ -56,8 +54,6 @@
<div *ngIf="!hasPermission(result)" [class.uk-width-3-4@s]="result.isManager">
{{(result.name) ? result.name : result.index_shortName}}
</div>
<manage *ngIf="result.isManager" [alias]="result.alias"
class="uk-width-expand uk-margin-auto-right"></manage>
</div>
<div class="uk-margin-small-top uk-text-small">
<span class="uk-text-muted" *ngIf="result.date || result.creationDate">Creation Date:</span>
@ -81,6 +77,10 @@
</div>
</div>
</div>
<manage *ngIf="type === 'community' && result.isManager" [communityId]="result.communityId"
class="uk-margin-large-right"></manage>
<manage *ngIf="type === 'stakeholder' && result.isManager" [alias]="result.alias"
class="uk-margin-large-right"></manage>
</div>
</div>
</li>

View File

@ -5,7 +5,7 @@ import {EnvProperties} from '../../utils/properties/env-properties';
import {CommunityInfo} 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";
import {StringUtils} from "../../utils/string-utils.class";
@Component({
@ -23,11 +23,10 @@ export class PortalSearchResultComponent implements OnInit{
@Input() properties: EnvProperties;
@Input() maxCharacters: number = 150;
@ViewChild('AlertModal') modal;
/*visibilityIcon: Map<Visibility, string> = new Map<Visibility, string> ([
["PUBLIC", 'earth'],
visibilityIcon: Map<Visibility, string> = new Map<Visibility, string> ([
["PRIVATE", 'lock'],
["RESTRICTED", 'group']
]);*/
]);
public urlParam: string;
public errorCodes: ErrorCodes = new ErrorCodes();

View File

@ -8,6 +8,8 @@ import {AlertModalModule} from "../../utils/modal/alertModal.module";
import {ManageModule} from "../../utils/manage/manage.module";
import {IconsModule} from "../../utils/icons/icons.module";
import {UrlPrefixModule} from "../../utils/pipes/url-prefix.module";
import {IconsService} from "../../utils/icons/icons.service";
import {group, lock} from "../../utils/icons/icons";
// import {IconsService} from "../../utils/icons/icons.service";
// import {group, lock} from "../../utils/icons/icons";
@ -27,7 +29,7 @@ import {UrlPrefixModule} from "../../utils/pipes/url-prefix.module";
]
})
export class PortalSearchResultModule {
/*constructor(private iconsService: IconsService) {
constructor(private iconsService: IconsService) {
this.iconsService.registerIcons([group, lock])
}*/
}
}