Project

General

Profile

« Previous | Next » 

Revision 60983

[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.

View differences:

modules/uoa-connect-portal/trunk/src/app/community/community.component.html
252 252
            <ng-template #summary_tab>
253 253
              <div *ngIf="community" class="uk-grid uk-margin-remove">
254 254
                <div class="uk-width-expand uk-padding uk-inline">
255
                  <div *ngIf="community.description"
256
                       class="uk-margin-bottom ">
257
                    <!--                        [class]="'uk-margin-bottom '+ ((subscribeComponent && subscribeComponent.subscribers > 0) || community.date ? 'uk-margin-top' : '')">-->
258
                    <div *ngIf="!showAllDescription" class="">
259
                      {{community.description.substring(0, thresholdDescription)}}{{community.description.length > thresholdDescription ? '...' : ''}}</div>
260
                    <div *ngIf="showAllDescription" class="uk-overflow-auto">
261
                      <div class="uk-height-max-medium">{{community.description}}</div>
255
                  <div *ngIf="community.description" class="uk-margin-bottom ">
256
<!--                    <div class="uk-overflow-auto">-->
257
<!--                      <div #toTarget id="toTarget" class="uk-height-max-medium" [class.cutDescr]="!showAllDescription"-->
258
                      <div [innerHTML]="community.description | safeHtml"></div>
259
<!--                    </div>-->
260
                    <div *ngIf="showMore && !showAllDescription" class="uk-animation-fade uk-margin-small-top uk-text-right">
261
                      <a (click)="showAllDescription = !showAllDescription;">Read more</a>
262 262
                    </div>
263
                    <!--                    uk-padding uk-padding-remove-top uk-position-bottom-right-->
264
                    <div *ngIf="!showAllDescription && community.description.length > thresholdDescription "
265
                         class="uk-animation-fade uk-margin-small-top uk-text-right">
266
                      <a (click)="showAllDescription = !showAllDescription;">Read more
267
                      </a>
268
                    </div>
269
                    <!--                    uk-padding uk-padding-remove-top uk-position-bottom-right-->
270 263
                    <div *ngIf="showAllDescription"
271 264
                         class="uk-animation-fade uk-margin-small-top uk-text-right">
272 265
                      <a (click)="showAllDescription = !showAllDescription;">
modules/uoa-connect-portal/trunk/src/app/community/community.module.ts
27 27
import {TabsModule} from "../openaireLibrary/utils/tabs/tabs.module";
28 28
import {SearchTabModule} from "../openaireLibrary/utils/tabs/contents/search-tab.module";
29 29
import {ErrorMessagesModule} from "../openaireLibrary/utils/errorMessages.module";
30
import {SafeHtmlPipeModule} from '../openaireLibrary/utils/pipes/safeHTMLPipe.module';
30 31

  
31 32
@NgModule({
32 33
  imports: [
......
36 37
    SearchResearchResultsServiceModule, SearchResultsModule, CuratorsModule, AffiliationsModule,
37 38
    SEOServiceModule, MatSelectModule, EntitiesSelectionModule,
38 39
    TabsModule, SearchTabModule, ErrorMessagesModule
40
    , SafeHtmlPipeModule
39 41
  ],
40 42
  declarations: [
41 43
    CommunityComponent

Also available in: Unified diff