Skip to content
Snippets Groups Projects
indexation.component.html 6.24 KiB
Newer Older
  • Learn to ignore specific revisions
  • <mat-sidenav-container class="maarch-container">
        <mat-sidenav #snavLeft class="panel-left" #snav [mode]="appService.getViewMode() ? 'over' : 'side'"
            [fixedInViewport]="appService.getViewMode()" [opened]="appService.getViewMode() ? false : true"
            autoFocus="false" style="overflow-x:hidden;" [ngStyle]="{'width': appService.getViewMode() ? '95%' : '600px'}">
            <header-panel [snavLeft]="snav"></header-panel>
    
            <ng-container *ngIf="indexingModels.length > 0">
    
                <div class="listModels">
    
                    <button mat-button class="button-form-primary" [matMenuTriggerFor]="IndexingModelsMenu"
                        style="flex:1;margin-right:20px;">
    
                        <span class="menu-label" [title]="currentIndexingModel.label">
    
                            {{currentIndexingModel.label}} {{currentIndexingModel.default ? '(' + lang.default + ')': ''}}
    
                        </span>
                        <i class="fa fa-chevron-down menu-icon"></i></button>
                    <mat-menu #IndexingModelsMenu="matMenu" [class]="'menuForm'">
                        <ng-container *ngFor="let indexingModel of indexingModels">
                            <button *ngIf="indexingModel.id !== currentIndexingModel.id" mat-menu-item
    
                                (click)="loadIndexingModel(indexingModel)" [title]="indexingModel.label">{{indexingModel.label}}
    
                                {{indexingModel.default ? '(' + lang.default + ')': ''}}</button>
    
                    <button mat-button *ngIf="!appService.getViewMode()" class="button-form-primary"
    
                        style="flex:1;align-items: center;justify-content: center;text-align: center;display: flex;">{{lang.saveAsModel}}</button>
    
                    <button mat-icon-button *ngIf="appService.getViewMode()" class="button-form-primary"
                        (click)="onSubmit()">
                        <mat-icon class="far fa-edit"></mat-icon>
                    </button>
    
                </div>
                <div class="indexing-form-container">
                    <app-indexing-form *ngIf="currentIndexingModel.id !== undefined" #indexingForm
                        [groupId]="currentGroupId" [indexingFormId]="currentIndexingModel.id"></app-indexing-form>
                </div>
                <div class="actions-indexing-form">
    
                    <ng-container *ngIf="actionsList.length > 0">
                        <button mat-button class="button-form-primary" [matMenuTriggerFor]="menu"
    
                            style="flex:1;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'">
                            <ng-container *ngFor="let action of actionsList">
    
                                <button mat-menu-item *ngIf="action.id !== selectedAction.id" (click)="selectAction(action)" [title]="action.label"
    
                                    [innerHTML]="action.label"></button>
                            </ng-container>
                        </mat-menu>
                        <button mat-button *ngIf="!appService.getViewMode()" class="button-form-primary"
                            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.noAvaiblableAction"></div>
    
            <div *ngIf="indexingModels.length === 0" class="emptyModel" [innerHTML]="lang.noAvailableIndexingModel"></div>
    
        </mat-sidenav>
        <mat-sidenav-content>
            <div class="bg-head">
                <div class="bg-head-title" [class.customContainerRight]="appService.getViewMode()">
                    <div class="bg-head-title-label">
                        <header-left [snavLeft]="snav"></header-left>
                    </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">
    
                    <!--<i class="fa fa-file-upload upload-icon"></i><br />
    
                    Glisser-déposer<br />ou
                    <div style="display: flex;">
                        <button mat-button class="button-form-primary" [matMenuTriggerFor]="menu"
                            style="margin-right:20px;align-items: center;justify-content: center;text-align: center;display: flex;">
                            <span class="menu-label">
                                Choisir un modèle
                            </span>
                            <i class="fa fa-chevron-down menu-icon"></i>
                        </button>
                        <mat-menu #menu="matMenu" [class]="'menuForm'">
    
                            <button mat-menu-item>Modèle 1</button>
                            <button mat-menu-item>Modèle 2</button>
    
                        <button mat-button class="button-form-primary"
                            style="align-items: center;justify-content: center;text-align: center;display: flex;">Choisissez
                            votre fichier</button>
    
                    <app-document-viewer #appDocumentViewer [tmpFilename]="tmpFilename" style="height:100%;width:100%;"></app-document-viewer>
    
                </div>
            </div>
        </mat-sidenav-content>
        <mat-sidenav #snav2 [fixedInViewport]="appService.getViewMode()" position='end'
            [opened]="appService.getViewMode() ? false : false" [mode]="appService.getViewMode() ? 'over' : 'side'"
            class="panel-right" style="overflow-x:hidden;" [class.docView]="!filtersListService.filterMode"
            [ngStyle]="{'width': appService.getViewMode() ? '80%' : '30%'}" autoFocus="false">
        </mat-sidenav>
    </mat-sidenav-container>