Vmeda.Online/src/addons/mod/book/components/index/addon-mod-book-index.html
2022-03-01 10:03:40 +01:00

48 lines
2.1 KiB
HTML

<!-- Buttons to add to the header. -->
<core-navbar-buttons slot="end">
<ion-button fill="clear" (click)="openModuleSummary()" aria-haspopup="true" [attr.aria-label]="'core.info' | translate">
<ion-icon name="fas-info-circle" slot="icon-only" aria-hidden="true"></ion-icon>
</ion-button>
</core-navbar-buttons>
<!-- Content. -->
<core-loading [hideUntil]="!showLoading" class="list-item-limited-width">
<!-- Activity info. -->
<core-course-module-info [module]="module" [description]="description" [component]="component" [componentId]="componentId"
[courseId]="courseId">
</core-course-module-info>
<ion-list>
<ion-item>
<ion-label>
<h2>{{ 'addon.mod_book.toc' | translate }}</h2>
</ion-label>
</ion-item>
<ion-item class="ion-text-wrap" *ngFor="let chapter of chapters" [class.item-dimmed]="chapter.hidden" button detail="true"
(click)="openBook(chapter.id)">
<ion-label>
<p [class.ion-padding-start]="addPadding && chapter.level == 1 ? true : null">
<span *ngIf="showNumbers" class="addon-mod-book-number">{{chapter.indexNumber}}&nbsp;</span>
<span *ngIf="showBullets" class="addon-mod-book-bullet">&bull;&nbsp;</span>
<core-format-text [text]="chapter.title" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId">
</core-format-text>
</p>
</ion-label>
</ion-item>
</ion-list>
<div collapsible-footer *ngIf="!showLoading" slot="fixed">
<div class="list-item-limited-width">
<ion-button expand="block" (click)="openBook()" class="ion-margin ion-text-wrap">
<span *ngIf="!hasStartedBook">{{ 'core.start' | translate }}</span>
<span *ngIf="hasStartedBook">{{ 'core.resume' | translate }}</span>
</ion-button>
</div>
<core-course-module-navigation [courseId]="courseId" [currentModule]="module" (completionChanged)="onCompletionChange()">
</core-course-module-navigation>
</div>
</core-loading>