[Trunk | Connect]:

1. community.module.ts: Imported "SafeHtmlPipeModule".
2. community.component.html: Show description of community as html using safeHtml pipe and without read more/less button.


git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-connect-portal/trunk@60983 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
konstantina.galouni 2021-05-10 18:10:08 +00:00
parent c0a20f5908
commit 43f54e8c5d
2 changed files with 9 additions and 14 deletions

View File

@ -252,21 +252,14 @@
<ng-template #summary_tab> <ng-template #summary_tab>
<div *ngIf="community" class="uk-grid uk-margin-remove"> <div *ngIf="community" class="uk-grid uk-margin-remove">
<div class="uk-width-expand uk-padding uk-inline"> <div class="uk-width-expand uk-padding uk-inline">
<div *ngIf="community.description" <div *ngIf="community.description" class="uk-margin-bottom ">
class="uk-margin-bottom "> <!-- <div class="uk-overflow-auto">-->
<!-- [class]="'uk-margin-bottom '+ ((subscribeComponent && subscribeComponent.subscribers > 0) || community.date ? 'uk-margin-top' : '')">--> <!-- <div #toTarget id="toTarget" class="uk-height-max-medium" [class.cutDescr]="!showAllDescription"-->
<div *ngIf="!showAllDescription" class=""> <div [innerHTML]="community.description | safeHtml"></div>
{{community.description.substring(0, thresholdDescription)}}{{community.description.length > thresholdDescription ? '...' : ''}}</div> <!-- </div>-->
<div *ngIf="showAllDescription" class="uk-overflow-auto"> <div *ngIf="showMore && !showAllDescription" class="uk-animation-fade uk-margin-small-top uk-text-right">
<div class="uk-height-max-medium">{{community.description}}</div> <a (click)="showAllDescription = !showAllDescription;">Read more</a>
</div> </div>
<!-- uk-padding uk-padding-remove-top uk-position-bottom-right-->
<div *ngIf="!showAllDescription && community.description.length > thresholdDescription "
class="uk-animation-fade uk-margin-small-top uk-text-right">
<a (click)="showAllDescription = !showAllDescription;">Read more
</a>
</div>
<!-- uk-padding uk-padding-remove-top uk-position-bottom-right-->
<div *ngIf="showAllDescription" <div *ngIf="showAllDescription"
class="uk-animation-fade uk-margin-small-top uk-text-right"> class="uk-animation-fade uk-margin-small-top uk-text-right">
<a (click)="showAllDescription = !showAllDescription;"> <a (click)="showAllDescription = !showAllDescription;">

View File

@ -27,6 +27,7 @@ import {EntitiesSelectionModule} from "../openaireLibrary/searchPages/searchUtil
import {TabsModule} from "../openaireLibrary/utils/tabs/tabs.module"; import {TabsModule} from "../openaireLibrary/utils/tabs/tabs.module";
import {SearchTabModule} from "../openaireLibrary/utils/tabs/contents/search-tab.module"; import {SearchTabModule} from "../openaireLibrary/utils/tabs/contents/search-tab.module";
import {ErrorMessagesModule} from "../openaireLibrary/utils/errorMessages.module"; import {ErrorMessagesModule} from "../openaireLibrary/utils/errorMessages.module";
import {SafeHtmlPipeModule} from '../openaireLibrary/utils/pipes/safeHTMLPipe.module';
@NgModule({ @NgModule({
imports: [ imports: [
@ -36,6 +37,7 @@ import {ErrorMessagesModule} from "../openaireLibrary/utils/errorMessages.module
SearchResearchResultsServiceModule, SearchResultsModule, CuratorsModule, AffiliationsModule, SearchResearchResultsServiceModule, SearchResultsModule, CuratorsModule, AffiliationsModule,
SEOServiceModule, MatSelectModule, EntitiesSelectionModule, SEOServiceModule, MatSelectModule, EntitiesSelectionModule,
TabsModule, SearchTabModule, ErrorMessagesModule TabsModule, SearchTabModule, ErrorMessagesModule
, SafeHtmlPipeModule
], ],
declarations: [ declarations: [
CommunityComponent CommunityComponent