From 4400d99638449f0e5480f3740c45950d3ed3c35f Mon Sep 17 00:00:00 2001 From: Albert Gasset Date: Mon, 8 Jul 2019 11:28:04 +0200 Subject: [PATCH] MOBILE-2201 glossary: Display tags in glossary entries --- src/addon/mod/glossary/pages/entry/entry.html | 4 ++++ src/addon/mod/glossary/pages/entry/entry.module.ts | 4 +++- src/addon/mod/glossary/pages/entry/entry.ts | 6 +++++- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/addon/mod/glossary/pages/entry/entry.html b/src/addon/mod/glossary/pages/entry/entry.html index f34e46d27..5954398ff 100644 --- a/src/addon/mod/glossary/pages/entry/entry.html +++ b/src/addon/mod/glossary/pages/entry/entry.html @@ -28,6 +28,10 @@ + +
{{ 'core.tag.tags' | translate }}:
+ +

{{ 'addon.mod_glossary.entrypendingapproval' | translate }}

diff --git a/src/addon/mod/glossary/pages/entry/entry.module.ts b/src/addon/mod/glossary/pages/entry/entry.module.ts index cc69e9dc4..730943091 100644 --- a/src/addon/mod/glossary/pages/entry/entry.module.ts +++ b/src/addon/mod/glossary/pages/entry/entry.module.ts @@ -19,6 +19,7 @@ import { CoreComponentsModule } from '@components/components.module'; import { CoreDirectivesModule } from '@directives/directives.module'; import { CorePipesModule } from '@pipes/pipes.module'; import { CoreRatingComponentsModule } from '@core/rating/components/components.module'; +import { CoreTagComponentsModule } from '@core/tag/components/components.module'; import { AddonModGlossaryEntryPage } from './entry'; @NgModule({ @@ -31,7 +32,8 @@ import { AddonModGlossaryEntryPage } from './entry'; CorePipesModule, IonicPageModule.forChild(AddonModGlossaryEntryPage), TranslateModule.forChild(), - CoreRatingComponentsModule + CoreRatingComponentsModule, + CoreTagComponentsModule ], }) export class AddonModForumDiscussionPageModule {} diff --git a/src/addon/mod/glossary/pages/entry/entry.ts b/src/addon/mod/glossary/pages/entry/entry.ts index 7bbf4f0bf..a5b38641d 100644 --- a/src/addon/mod/glossary/pages/entry/entry.ts +++ b/src/addon/mod/glossary/pages/entry/entry.ts @@ -16,6 +16,7 @@ import { Component } from '@angular/core'; import { IonicPage, NavParams } from 'ionic-angular'; import { CoreDomUtilsProvider } from '@providers/utils/dom'; import { CoreRatingInfo } from '@core/rating/providers/rating'; +import { CoreTagProvider } from '@core/tag/providers/tag'; import { AddonModGlossaryProvider } from '../../providers/glossary'; /** @@ -35,15 +36,18 @@ export class AddonModGlossaryEntryPage { showAuthor = false; showDate = false; ratingInfo: CoreRatingInfo; + tagsEnabled: boolean; protected courseId: number; protected entryId: number; constructor(navParams: NavParams, private domUtils: CoreDomUtilsProvider, - private glossaryProvider: AddonModGlossaryProvider) { + private glossaryProvider: AddonModGlossaryProvider, + private tagProvider: CoreTagProvider) { this.courseId = navParams.get('courseId'); this.entryId = navParams.get('entryId'); + this.tagsEnabled = this.tagProvider.areTagsAvailableInSite(); } /**