diff --git a/src/addon/mod/wiki/components/components.module.ts b/src/addon/mod/wiki/components/components.module.ts index 39372cfe2..638be75aa 100644 --- a/src/addon/mod/wiki/components/components.module.ts +++ b/src/addon/mod/wiki/components/components.module.ts @@ -19,6 +19,7 @@ import { TranslateModule } from '@ngx-translate/core'; import { CoreComponentsModule } from '@components/components.module'; import { CoreDirectivesModule } from '@directives/directives.module'; import { CoreCourseComponentsModule } from '@core/course/components/components.module'; +import { CoreTagComponentsModule } from '@core/tag/components/components.module'; import { AddonModWikiIndexComponent } from './index/index'; import { AddonModWikiSubwikiPickerComponent } from './subwiki-picker/subwiki-picker'; @@ -33,7 +34,8 @@ import { AddonModWikiSubwikiPickerComponent } from './subwiki-picker/subwiki-pic TranslateModule.forChild(), CoreComponentsModule, CoreDirectivesModule, - CoreCourseComponentsModule + CoreCourseComponentsModule, + CoreTagComponentsModule ], providers: [ ], diff --git a/src/addon/mod/wiki/components/index/addon-mod-wiki-index.html b/src/addon/mod/wiki/components/index/addon-mod-wiki-index.html index 3d8834595..2ee9b5e8d 100644 --- a/src/addon/mod/wiki/components/index/addon-mod-wiki-index.html +++ b/src/addon/mod/wiki/components/index/addon-mod-wiki-index.html @@ -50,6 +50,11 @@ + +
+ {{ 'core.tag.tags' | translate }}: + +
diff --git a/src/addon/mod/wiki/components/index/index.ts b/src/addon/mod/wiki/components/index/index.ts index 941417a68..7b4a69f16 100644 --- a/src/addon/mod/wiki/components/index/index.ts +++ b/src/addon/mod/wiki/components/index/index.ts @@ -23,6 +23,7 @@ import { AddonModWikiOfflineProvider } from '../../providers/wiki-offline'; import { AddonModWikiSyncProvider } from '../../providers/wiki-sync'; import { CoreTabsComponent } from '@components/tabs/tabs'; import { AddonModWikiSubwikiPickerComponent } from '../../components/subwiki-picker/subwiki-picker'; +import { CoreTagProvider } from '@core/tag/providers/tag'; /** * Component that displays a wiki entry page. @@ -64,6 +65,7 @@ export class AddonModWikiIndexComponent extends CoreCourseModuleMainActivityComp subwikis: [], count: 0 }; + tagsEnabled: boolean; protected syncEventName = AddonModWikiSyncProvider.AUTO_SYNCED; protected currentSubwiki: any; // Current selected subwiki. @@ -81,10 +83,12 @@ export class AddonModWikiIndexComponent extends CoreCourseModuleMainActivityComp constructor(injector: Injector, protected wikiProvider: AddonModWikiProvider, @Optional() protected content: Content, protected wikiOffline: AddonModWikiOfflineProvider, protected wikiSync: AddonModWikiSyncProvider, protected navCtrl: NavController, protected utils: CoreUtilsProvider, protected groupsProvider: CoreGroupsProvider, - protected userProvider: CoreUserProvider, private popoverCtrl: PopoverController) { + protected userProvider: CoreUserProvider, private popoverCtrl: PopoverController, + private tagProvider: CoreTagProvider) { super(injector, content); this.pageStr = this.translate.instant('addon.mod_wiki.wikipage'); + this.tagsEnabled = this.tagProvider.areTagsAvailableInSite(); } /**