show-text.page.html 2.21 KB
Newer Older
1
2
3
4
<ion-header>
    <ion-toolbar>
        <div class="toolbar-left">
            <ion-back-button icon="arrow-round-back" defaultHref="home"></ion-back-button>
5
            <ion-title>{{corpusService.currentCorpus.title}}
6
                {{corpusService.currentUrn.split(":")[corpusService.currentUrn.split(":").length - 1]}}
7
8
9
10
11
12
13
14
15
16
17
18
19
            </ion-title>
        </div>
        <div class="toolbar-right">
            <ion-spinner *ngIf="HelperService.isLoading"></ion-spinner>
            <button (click)="HelperService.goToHomePage(navCtrl)">
                <ion-icon name="home"></ion-icon>
            </button>
        </div>
    </ion-toolbar>
</ion-header>


<ion-content padding>
20
    <ion-grid *ngIf="corpusService.currentText.length > 0; else loading">
21
22
        <ion-row>
            <ion-col>
23
24
25
26
                <ion-button (click)="goToExerciseParametersPage()">{{ "EXERCISE_SET_PARAMETERS" | translate}}
                </ion-button>
            </ion-col>
            <ion-col>
27
28
                <ion-button
                        (click)="HelperService.goToVocabularyCheckPage(navCtrl)">{{ 'VOCABULARY_CHECK' | translate }}</ion-button>
29
30
31
32
            </ion-col>
        </ion-row>
        <ion-row *ngIf="HelperService.isVocabularyCheck">
            <ion-col>
33
                <label>
34
                    <input type="checkbox" [(ngModel)]="highlightOOV"/>
35
                    <span class="checkbox">{{ "TEXT_SHOW_OOV" | translate}}</span>
36
37
38
39
40
41
42
                </label>
                <br>
            </ion-col>
        </ion-row>
        <ion-row>
            <ion-col class="text">
                <div *ngIf="highlightOOV; else noOOV">
Konstantin Schulz's avatar
Konstantin Schulz committed
43
44
45
                    <!-- do not add whitespace/newline etc. between the span elements!                   -->
                    <span *ngFor="let node of corpusService.annisResponse.graph.nodes; index as i"><span
                            [class.oov]="node.is_oov">{{node.annis_tok}}</span>{{ getWhiteSpace(i) }}</span>
46
47
                </div>
                <ng-template #noOOV>
48
                    <span>{{corpusService.currentText}}</span>
49
50
51
52
53
54
55
                </ng-template>
            </ion-col>
        </ion-row>
    </ion-grid>
    <ng-template #loading>
        <ion-spinner></ion-spinner>
    </ng-template>
56
</ion-content>