MOBILE-2201 forum: Display tags in forum posts
parent
c00cbb9b8d
commit
1226a17d81
|
@ -21,6 +21,7 @@ import { CoreDirectivesModule } from '@directives/directives.module';
|
|||
import { CorePipesModule } from '@pipes/pipes.module';
|
||||
import { CoreCourseComponentsModule } from '@core/course/components/components.module';
|
||||
import { CoreRatingComponentsModule } from '@core/rating/components/components.module';
|
||||
import { CoreTagComponentsModule } from '@core/tag/components/components.module';
|
||||
import { AddonModForumIndexComponent } from './index/index';
|
||||
import { AddonModForumPostComponent } from './post/post';
|
||||
|
||||
|
@ -37,7 +38,8 @@ import { AddonModForumPostComponent } from './post/post';
|
|||
CoreDirectivesModule,
|
||||
CorePipesModule,
|
||||
CoreCourseComponentsModule,
|
||||
CoreRatingComponentsModule
|
||||
CoreRatingComponentsModule,
|
||||
CoreTagComponentsModule
|
||||
],
|
||||
providers: [
|
||||
],
|
||||
|
|
|
@ -30,6 +30,10 @@
|
|||
</ng-container>
|
||||
</div>
|
||||
</ion-card-content>
|
||||
<ion-item text-wrap *ngIf="tagsEnabled && post.tags && post.tags.length > 0">
|
||||
<div item-start>{{ 'core.tag.tags' | translate }}:</div>
|
||||
<core-tag-list [tags]="post.tags"></core-tag-list>
|
||||
</ion-item>
|
||||
<core-rating-rate *ngIf="forum && ratingInfo" [ratingInfo]="ratingInfo" contextLevel="module" [instanceId]="componentId" [itemId]="post.id" [itemSetId]="discussionId" [courseId]="courseId" [aggregateMethod]="forum.assessed" [scaleId]="forum.scale" [userId]="post.userid" (onUpdate)="ratingUpdated()"></core-rating-rate>
|
||||
<core-rating-aggregate *ngIf="forum && ratingInfo" [ratingInfo]="ratingInfo" contextLevel="module" [instanceId]="componentId" [itemId]="post.id" [courseId]="courseId" [aggregateMethod]="forum.assessed" [scaleId]="forum.scale"></core-rating-aggregate>
|
||||
<ion-item no-padding text-end *ngIf="post.id && post.canreply && !post.isprivatereply" class="addon-forum-reply-button">
|
||||
|
|
|
@ -25,6 +25,7 @@ import { AddonModForumHelperProvider } from '../../providers/helper';
|
|||
import { AddonModForumOfflineProvider } from '../../providers/offline';
|
||||
import { AddonModForumSyncProvider } from '../../providers/sync';
|
||||
import { CoreRatingInfo } from '@core/rating/providers/rating';
|
||||
import { CoreTagProvider } from '@core/tag/providers/tag';
|
||||
|
||||
/**
|
||||
* Components that shows a discussion post, its attachments and the action buttons allowed (reply, etc.).
|
||||
|
@ -52,6 +53,7 @@ export class AddonModForumPostComponent implements OnInit, OnDestroy {
|
|||
|
||||
uniqueId: string;
|
||||
advanced = false; // Display all form fields.
|
||||
tagsEnabled: boolean;
|
||||
|
||||
protected syncId: string;
|
||||
|
||||
|
@ -65,8 +67,10 @@ export class AddonModForumPostComponent implements OnInit, OnDestroy {
|
|||
private forumHelper: AddonModForumHelperProvider,
|
||||
private forumOffline: AddonModForumOfflineProvider,
|
||||
private forumSync: AddonModForumSyncProvider,
|
||||
private tagProvider: CoreTagProvider,
|
||||
@Optional() private content: Content) {
|
||||
this.onPostChange = new EventEmitter<void>();
|
||||
this.tagsEnabled = this.tagProvider.areTagsAvailableInSite();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue