MOBILE-2201 wiki: Display tags in wiki pages
parent
4400d99638
commit
75929f6b4f
|
@ -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: [
|
||||
],
|
||||
|
|
|
@ -50,6 +50,11 @@
|
|||
<core-format-text *ngIf="pageContent" [component]="component" [componentId]="componentId" [text]="pageContent"></core-format-text>
|
||||
<core-empty-box *ngIf="!pageContent" icon="document" [message]="'addon.mod_wiki.nocontent' | translate" [inline]="true"></core-empty-box>
|
||||
</article>
|
||||
|
||||
<div margin-top *ngIf="tagsEnabled && currentPageObj && currentPageObj.tags && currentPageObj.tags.length > 0">
|
||||
<b>{{ 'core.tag.tags' | translate }}:</b>
|
||||
<core-tag-list [tags]="currentPageObj.tags"></core-tag-list>
|
||||
</div>
|
||||
</div>
|
||||
</ng-template>
|
||||
</core-tab>
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue