Skip to content
Snippets Groups Projects
indexation.component.html 4.84 KiB
Newer Older
  • Learn to ignore specific revisions
  • <mat-sidenav-container class="maarch-container">
    
            <app-select-indexing-model #appSelectIndexingModel [adminMode]="true" [indexingForm]="indexingForm" (afterListModelsLoaded)="loadIndexingModel($event)" (afterSelectedListModel)="this.currentIndexingModel = $event;indexingForm.loadForm($event.id)"></app-select-indexing-model>
    
            <ng-container *ngIf="!isEmptyIndexingModels()">
    
                <div class="indexing-form-container">
                    <app-indexing-form *ngIf="currentIndexingModel.id !== undefined" #indexingForm
    
                        [groupId]="currentGroupId" [indexingFormId]="currentIndexingModel.id"
                        (retrieveDocumentEvent)="appDocumentViewer.saveDocService()"></app-indexing-form>
    
                </div>
                <div class="actions-indexing-form">
    
                    <ng-container
                        *ngIf="actionsList.length > 0 && indexingForm !== undefined && selectedAction !== undefined">
                        <button mat-button class="button-form-primary" [disabled]="selectedAction.id === 0"
                            [matMenuTriggerFor]="menu" style="width:350px;margin-right:20px;"
                            [title]="selectedAction.label">
    
                            <span class="menu-label" [innerHTML]="selectedAction.label">
                            </span>
                            <i class="fa fa-chevron-down menu-icon"></i></button>
    
                        <mat-menu #menu="matMenu" [class]="'menuForm menuAction'">
    
                            <div class="menuTitle">
                                <span>
                                    {{lang.actions}}
                                </span>
                                <mat-form-field floatLabel="never" appearance="outline" class="smallInput"
                                    (click)="$event.stopPropagation();">
                                    <input matInput id="searchTerm" placeholder="{{lang.filterBy}}" #listFilter
                                        autocomplete="off" (click)="$event.stopPropagation();"
                                        (keydown)="$event.stopPropagation()">
                                </mat-form-field>
                            </div>
                            <ng-container *ngFor="let action of actionsList | filterList:listFilter.value:'label'">
                                <button *ngIf="showActionInCurrentCategory(action)" mat-menu-item
                                    (click)="selectAction(action)" [title]="action.label"
                                    [class.listModels-menu-selected]="action.id === selectedAction.id"
                                    [disabled]="!action.enabled">
                                    <span style="flex:1;">{{action.label}}</span><small
                                        style="position: absolute;top: 15px;left: 140px;" color="warn"
                                        *ngIf="!action.enabled">{{lang.badActionParam}}</small>
    
                            </ng-container>
                        </mat-menu>
    
                        <button mat-button *ngIf="!appService.getViewMode()"
    
                            [disabled]="actionService.loading || selectedAction.id === 0 || (appDocumentViewer !== undefined && !appDocumentViewer.isEditorLoaded())"
    
                            class="button-form-primary-filled"
    
                            style="width: 150px;align-items: center;justify-content: center;text-align: center;display: flex;"
                            (click)="onSubmit()">{{lang.validate}}</button>
                        <button mat-icon-button *ngIf="appService.getViewMode()" class="button-form-primary"
                            (click)="onSubmit()">
                            <mat-icon class="fa fa-check"></mat-icon>
                        </button>
                    </ng-container>
    
                    <div class="emptyAction" *ngIf="actionsList.length === 0" [innerHTML]="lang.noAvailableAction"></div>
    
            <div *ngIf="isEmptyIndexingModels()" class="emptyModel" [innerHTML]="lang.noAvailableIndexingModel"></div>
    
        <mat-sidenav-content>
            <div class="bg-head">
                <div class="bg-head-title" [class.customContainerRight]="appService.getViewMode()">
                    <div class="bg-head-title-label">
    
                    </div>
                    <div class="bg-head-title-tool">
                        <header-right></header-right>
                    </div>
                </div>
            </div>
            <div class="document-container" [class.fullContainer]="appService.getViewMode()">
                <div class="content">
    
                    <app-document-viewer #appDocumentViewer [editMode]="true" [tmpFilename]="tmpFilename"
                        (triggerEvent)="refreshDatas()" style="height:100%;width:100%;">
    
                    </app-document-viewer>
    
                </div>
            </div>
        </mat-sidenav-content>
    </mat-sidenav-container>