[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:
parent
c0a20f5908
commit
43f54e8c5d
|
@ -252,21 +252,14 @@
|
|||
<ng-template #summary_tab>
|
||||
<div *ngIf="community" class="uk-grid uk-margin-remove">
|
||||
<div class="uk-width-expand uk-padding uk-inline">
|
||||
<div *ngIf="community.description"
|
||||
class="uk-margin-bottom ">
|
||||
<!-- [class]="'uk-margin-bottom '+ ((subscribeComponent && subscribeComponent.subscribers > 0) || community.date ? 'uk-margin-top' : '')">-->
|
||||
<div *ngIf="!showAllDescription" class="">
|
||||
{{community.description.substring(0, thresholdDescription)}}{{community.description.length > thresholdDescription ? '...' : ''}}</div>
|
||||
<div *ngIf="showAllDescription" class="uk-overflow-auto">
|
||||
<div class="uk-height-max-medium">{{community.description}}</div>
|
||||
<div *ngIf="community.description" class="uk-margin-bottom ">
|
||||
<!-- <div class="uk-overflow-auto">-->
|
||||
<!-- <div #toTarget id="toTarget" class="uk-height-max-medium" [class.cutDescr]="!showAllDescription"-->
|
||||
<div [innerHTML]="community.description | safeHtml"></div>
|
||||
<!-- </div>-->
|
||||
<div *ngIf="showMore && !showAllDescription" 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 && 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"
|
||||
class="uk-animation-fade uk-margin-small-top uk-text-right">
|
||||
<a (click)="showAllDescription = !showAllDescription;">
|
||||
|
|
|
@ -27,6 +27,7 @@ import {EntitiesSelectionModule} from "../openaireLibrary/searchPages/searchUtil
|
|||
import {TabsModule} from "../openaireLibrary/utils/tabs/tabs.module";
|
||||
import {SearchTabModule} from "../openaireLibrary/utils/tabs/contents/search-tab.module";
|
||||
import {ErrorMessagesModule} from "../openaireLibrary/utils/errorMessages.module";
|
||||
import {SafeHtmlPipeModule} from '../openaireLibrary/utils/pipes/safeHTMLPipe.module';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
|
@ -36,6 +37,7 @@ import {ErrorMessagesModule} from "../openaireLibrary/utils/errorMessages.module
|
|||
SearchResearchResultsServiceModule, SearchResultsModule, CuratorsModule, AffiliationsModule,
|
||||
SEOServiceModule, MatSelectModule, EntitiesSelectionModule,
|
||||
TabsModule, SearchTabModule, ErrorMessagesModule
|
||||
, SafeHtmlPipeModule
|
||||
],
|
||||
declarations: [
|
||||
CommunityComponent
|
||||
|
|
Loading…
Reference in New Issue