Commit bf188cdd authored by Florian Azizian's avatar Florian Azizian

Merge branch 'develop' into 'master'

Develop

See merge request maarch/MaarchCourrier!65
parents d50a0656 c2e51f06
......@@ -12,6 +12,7 @@ stages:
before_script:
- apt-get update > /dev/null
- apt-get install apt-utils -yqq > /dev/null
- apt-get install cron -yqq > /dev/null
- apt-get install tar -yqq > /dev/null
- apt-get install wkhtmltopdf -yqq > /dev/null
- apt-get install wget -yqq > /dev/null
......@@ -35,6 +36,33 @@ before_script:
- mv composer.phar /usr/local/bin/composer
- chmod +x /usr/local/bin/composer
job_php-7.1:
image: php:7.1-apache
stage: test
script:
- mkdir -p /opt/maarch/docservers/indexes/{letterbox_coll,attachments_coll,version_attachments_coll}
- mkdir -p /opt/maarch/docservers/{ai,manual,manual_attachments,templates}
- mkdir -p /opt/maarch/docservers/{convert_attachments,convert_attachments_version,convert_mlb}
- mkdir -p /opt/maarch/docservers/{fulltext_attachments,fulltext_attachments_version,fulltext_mlb}
- mkdir -p /opt/maarch/docservers/{thumbnails_attachments,thumbnails_attachments_version,thumbnails_mlb}
- mkdir -p /var/www/html/
- cp -R /builds/maarch/MaarchCourrier/ /var/www/html/
- cd /var/www/html/MaarchCourrier
- mkdir -p /var/www/html/MaarchCourrier
- composer -n install
- curl -sL https://deb.nodesource.com/setup_7.x | bash -
- apt-get install -yqq nodejs
- npm install npm@latest -g
- npm set registry https://registry.npmjs.org/
- npm install
- sed 's/<databaseserver>.*<\/databaseserver>/<databaseserver>postgres<\/databaseserver>/;s/<databasepassword>.*<\/databasepassword>/<databasepassword><\/databasepassword>/;s/<databasename>.*<\/databasename>/<databasename>MaarchCourrier<\/databasename>/;s/<databaseuser>.*<\/databaseuser>/<databaseuser>maarch<\/databaseuser>/' apps/maarch_entreprise/xml/config.xml.default > apps/maarch_entreprise/xml/config.xml
- curl --location -s --output /usr/local/bin/phpunit https://phar.phpunit.de/phpunit-7.phar
- chmod +x /usr/local/bin/phpunit
#- cd App/MaarchRM
- phpunit --coverage-text --colors=never -c phpunit.xml
only:
- develop
job_php-7.0:
image: php:7.0-apache
stage: test
......@@ -55,9 +83,11 @@ job_php-7.0:
- npm set registry https://registry.npmjs.org/
- npm install
- sed 's/<databaseserver>.*<\/databaseserver>/<databaseserver>postgres<\/databaseserver>/;s/<databasepassword>.*<\/databasepassword>/<databasepassword><\/databasepassword>/;s/<databasename>.*<\/databasename>/<databasename>MaarchCourrier<\/databasename>/;s/<databaseuser>.*<\/databaseuser>/<databaseuser>maarch<\/databaseuser>/' apps/maarch_entreprise/xml/config.xml.default > apps/maarch_entreprise/xml/config.xml
- curl --location -s --output /usr/local/bin/phpunit https://phar.phpunit.de/phpunit.phar
- curl --location -s --output /usr/local/bin/phpunit https://phar.phpunit.de/phpunit-6.phar
- chmod +x /usr/local/bin/phpunit
#- cd App/MaarchRM
- phpunit --coverage-text --colors=never -c phpunit.xml
only:
- develop
\ No newline at end of file
- develop
<div class="page-header">
<h1>{{lang.administration}} {{lang.actions}} <small>{{data.length}} {{lang.actions}}</small></h1>
<h1>{{lang.administration}} {{lang.actions}}
<small>{{actions.length}} {{lang.actions}}</small>
</h1>
</div>
<div *ngIf="loading">
<mat-spinner style="margin:auto;"></mat-spinner>
</div>
<div *ngIf="!loading" class="container-fluid">
<div class="col-md-12">
<table id ="actionsTable" class="table table-hover table-condensed" [md2Data]="data | dataPipe : 'label_action' : search" #md2="md2DataTable" [sortBy]='id' [rowsPerPage]="10">
<thead>
<tr>
<td colspan="4">
<md2-pagination></md2-pagination>
</td>
<td style="text-align:right;">
<div class="example-container">
<mat-grid-list cols="3" rowHeight="100px">
<mat-grid-tile>
<mat-paginator #paginator [length]="100" [pageSize]="10" [pageSizeOptions]="[10, 25, 50, 100]">
</mat-paginator>
</mat-grid-tile>
<mat-grid-tile></mat-grid-tile>
<mat-grid-tile>
<mat-form-field>
<input matInput placeholder="{{lang.filterBy}} : {{lang.desc}}" class="md2-input" [(ngModel)]="search" />
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="{{lang.filterBy}}">
</mat-form-field>
&nbsp;
<a class="text-primary" style="cursor: pointer" routerLink="/administration/actions/new" title="{{lang.new_action}}"><i class="fa fa-exchange fa-2x"></i><sup><i class="fa fa-plus"></i></sup></a>
</td>
</tr>
<tr>
<th style="width:5%;" md2SortBy="id"><span>{{lang.id}}</span></th>
<th style="width:45%;" md2SortBy="label_action"><span>{{lang.desc}}</span></th>
<th style="width:15%;" md2SortBy="history"><span>{{lang.actionHistory}}</span></th>
<th style="width:15%;" md2SortBy="is_folder_action"><span>{{lang.isFolderAction}}</span></th>
<th style="width:30%;"><span>&nbsp;</span></th>
</tr>
</thead>
<tbody>
<tr *ngFor="let action of md2.data">
<td style="width:5%;vertical-align:middle;"> {{action.id}} </td>
<td style="width:45%;vertical-align:middle;"> {{action.label_action}} </td>
<td style="width:15%;vertical-align:middle;" *ngIf="action.history == 'N'"> {{lang.no}} </td>
<td style="width:15%;vertical-align:middle;" *ngIf="action.history == 'Y'"> {{lang.yes}} </td>
<td style="width:15%;vertical-align:middle;" *ngIf="action.is_folder_action == 'Y'"> {{lang.yes}} </td>
<td style="width:15%;vertical-align:middle;" *ngIf="action.is_folder_action == 'N'"> {{lang.no}} </td>
<td style="width:30%;vertical-align:middle;" style="text-align:right;">
<div class="btn-group" role="group" aria-label="...">
<button routerLink="/administration/actions/{{action.id}}" type="button" class="btn btn-default" title="{{lang.update}}">
<a><i style="cursor:pointer" class="fa fa-edit"></i></a>
<button mat-mini-fab color="accent" matTooltip="{{lang.add}}" routerLink="/administration/actions/new">
<mat-icon class="fa fa-plus" aria-hidden="true"></mat-icon>
</button>
</mat-grid-tile>
</mat-grid-list>
<mat-table #table [dataSource]="dataSource" matSort matSortActive="id" matSortDirection="asc">
<ng-container matColumnDef="id">
<mat-header-cell *matHeaderCellDef mat-sort-header>{{lang.id}}</mat-header-cell>
<mat-cell *matCellDef="let element"> {{element.id}} </mat-cell>
</ng-container>
<ng-container matColumnDef="label_action">
<mat-header-cell *matHeaderCellDef mat-sort-header>{{lang.actionName}}</mat-header-cell>
<mat-cell *matCellDef="let element"> {{element.label_action}} </mat-cell>
</ng-container>
<ng-container matColumnDef="history">
<mat-header-cell *matHeaderCellDef mat-sort-header>{{lang.actionHistory}}</mat-header-cell>
<mat-cell *matCellDef="let element">
<span *ngIf="element.history == 'N'"> {{lang.no}} </span>
<span *ngIf="element.history == 'Y'"> {{lang.yes}} </span>
</mat-cell>
</ng-container>
<ng-container matColumnDef="is_folder_action">
<mat-header-cell *matHeaderCellDef mat-sort-header>{{lang.isFolderAction}}</mat-header-cell>
<mat-cell *matCellDef="let element">
<span *ngIf="element.is_folder_action == 'N'"> {{lang.no}} </span>
<span *ngIf="element.is_folder_action == 'Y'"> {{lang.yes}} </span>
</mat-cell>
</ng-container>
<ng-container matColumnDef="actions">
<mat-header-cell *matHeaderCellDef mat-sort-header></mat-header-cell>
<mat-cell *matCellDef="let element" style="text-align:right">
<button mat-icon-button color="primary" matTooltip="{{lang.update}}" routerLink="/administration/actions/{{element.id}}">
<mat-icon class="fa fa-edit fa-2x" aria-hidden="true"></mat-icon>
</button>
<button [disabled]="action.is_system == 'Y'" type="button" class="btn btn-default" title="{{lang.delete}}" (click)="deleteAction(action)">
<a><i style="cursor:pointer;color: #D9534F" class="fa fa-trash"></i></a>
<button mat-icon-button color="warn" [disabled]="element.is_system == 'Y'" matTooltip="{{lang.delete}}" (click)="deleteAction(element)">
<mat-icon class="fa fa-trash fa-2x" aria-hidden="true"></mat-icon>
</button>
</div>
</td>
</tr>
</tbody>
</table>
</mat-cell>
</ng-container>
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
<mat-row *matRowDef="let row; columns: displayedColumns;"></mat-row>
</mat-table>
</div>
</div>
</div>
</div>
\ No newline at end of file
......@@ -10,14 +10,14 @@
<mat-tab label="{{lang.application}}">
<mat-grid-list cols="6" rowHeight="2:1">
<mat-grid-tile *ngFor="let appService of applicationServices">
<button mat-button tooltip="{{appService.comment}}" tooltip-delay="1000" (click)="goToSpecifiedAdministration(appService)"><i class="{{appService.style}} fa-4x"></i><br/>{{appService.name}}</button>
<button mat-button matTooltip="{{appService.comment}}" (click)="goToSpecifiedAdministration(appService)"><i class="{{appService.style}} fa-4x"></i><br/>{{appService.name}}</button>
</mat-grid-tile>
</mat-grid-list>
</mat-tab>
<mat-tab label="{{lang.modules}}">
<mat-grid-list cols="6" rowHeight="2:1">
<mat-grid-tile *ngFor="let modService of modulesServices">
<button mat-button tooltip="{{modService.comment}}" tooltip-delay="1000" (click)="goToSpecifiedAdministration(modService)"><i class="{{modService.style}} fa-4x"></i><br/>{{modService.name}}</button>
<button mat-button matTooltip="{{modService.comment}}" (click)="goToSpecifiedAdministration(modService)"><i class="{{modService.style}} fa-4x"></i><br/>{{modService.name}}</button>
</mat-grid-tile>
</mat-grid-list>
</mat-tab>
......
......@@ -11,7 +11,8 @@
<div class="form-group">
<div class="col-sm-12">
<div class="input-group">
<input *ngIf="creationMode" type="text" class="form-control" name="identifier" placeholder="{{lang.id}}" [(ngModel)]="basket.id" required>
<input *ngIf="creationMode" type="text" class="form-control" name="identifier" placeholder="{{lang.id}}" [(ngModel)]="basket.id" (blur)="isAvailable()" pattern="^[\w-]*$" maxlength="30" required>
<i *ngIf="creationMode" class="fa fa-bullseye" aria-hidden="true" [ngStyle]="{'color': basketIdAvailable ? 'green' : 'red'}"></i>
<input *ngIf="!creationMode" type="text" class="form-control" name="identifier" title="{{lang.id}}" [(ngModel)]="basket.id" disabled>
</div>
</div>
......@@ -53,7 +54,7 @@
</div>
<div class="form-group">
<div style="text-align:center;">
<button type="submit" class="btn btn-default" [disabled]="!basketForm.form.valid">{{lang.save}}</button>
<button type="submit" class="btn btn-default" [disabled]="!basketForm.form.valid || !basketIdAvailable">{{lang.save}}</button>
</div>
</div>
</form>
......
<h2 mat-dialog-title>{{lang.groupRedirect}}</h2>
<mat-dialog-content style="overflow:inherit;">
<form #changeGroupUsersForm="ngForm">
<div class="alert alert-warning" role="alert">
Le groupe
<b>{{this.data.group_desc}}</b> {{lang.isAssociatedTo}} <b>{{this.data.users.length}}</b> {{lang.users}}:
<mat-list>
<mat-list-item *ngFor="let user of this.data.users" style="height:25px;">
<mat-icon mat-list-icon class="fa fa-user" color="primary"></mat-icon>
<h4 mat-line></h4>
<p mat-line> {{user.user_id}} </p>
</mat-list-item>
</mat-list>
</div>
<mat-form-field>
<mat-select id="groups_redirect" name="groups_redirect" title="{{lang.chooseRedirectGroup}}" placeholder="{{lang.chooseRedirectGroup}}" [(ngModel)]="this.data.group_redirect"
required>
<mat-option value="_NO_REPLACEMENT">-- {{lang.noReplacement}} --</mat-option>
<mat-optgroup label="{{lang.groups}}">
<mat-option *ngFor="let group of this.data.groupsForAssign" [value]="group.id">
{{group.group_desc}}
</mat-option>
</mat-optgroup>
</mat-select>
</mat-form-field>
<mat-dialog-actions>
<button mat-raised-button color="primary" type="submit" [disabled]="!changeGroupUsersForm.form.valid" (click)="dialogRef.close(this.data.group_redirect)">{{lang.validate}}</button>
</mat-dialog-actions>
</form>
</mat-dialog-content>
\ No newline at end of file
<div class="page-header">
<h1>{{lang.administration}} {{lang.groups}}
<small>{{groups.length}} {{lang.groups}}</small>
</h1>
</div>
<div *ngIf="loading">
<i class="fa fa-spinner fa-spin fa-5x" style="margin-left: 50%;margin-top: 16%;font-size: 8em"></i>
<mat-spinner style="margin:auto;"></mat-spinner>
</div>
<div *ngIf="!loading" class="container-fluid">
<h1 style="margin-top: 0"><i class="fa fa-user fa-2x"></i> {{lang.admin}}</h1>
<nav class="navbar navbar-default" style="font-size:17px !important;" id="toolBox">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" routerLink="/administration" style="cursor: pointer">
<i class="fa fa-arrow-circle-left" title="{{lang.back}}"></i>
</a>
</div>
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav navbar-right">
<li style="cursor: pointer" routerLink="/administration/groups/new">
<a title="{{lang.addUser}}"><i class="fa fa-user-plus"></i></a>
</li>
</ul>
</div>
<div class="col-md-12">
<div class="example-container">
<mat-grid-list cols="3" rowHeight="100px">
<mat-grid-tile>
<mat-paginator #paginator [length]="100" [pageSize]="10" [pageSizeOptions]="[10, 25, 50, 100]">
</mat-paginator>
</mat-grid-tile>
<mat-grid-tile></mat-grid-tile>
<mat-grid-tile>
<mat-form-field>
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="{{lang.filterBy}}">
</mat-form-field>
<button mat-mini-fab color="accent" matTooltip="{{lang.add}}" routerLink="/administration/groups/new">
<mat-icon class="fa fa-plus" aria-hidden="true"></mat-icon>
</button>
</mat-grid-tile>
</mat-grid-list>
<mat-table #table [dataSource]="dataSource" matSort matSortActive="group_id" matSortDirection="asc">
<ng-container matColumnDef="group_id">
<mat-header-cell *matHeaderCellDef mat-sort-header>{{lang.id}}</mat-header-cell>
<mat-cell *matCellDef="let element"> {{element.group_id}} </mat-cell>
</ng-container>
<ng-container matColumnDef="group_desc">
<mat-header-cell *matHeaderCellDef mat-sort-header>{{lang.description}}</mat-header-cell>
<mat-cell *matCellDef="let element"> {{element.group_desc}} </mat-cell>
</ng-container>
<ng-container matColumnDef="actions">
<mat-header-cell *matHeaderCellDef mat-sort-header></mat-header-cell>
<mat-cell *matCellDef="let element" style="text-align:right">
<button mat-icon-button color="primary" matTooltip="{{lang.update}}" routerLink="/administration/groups/{{element.id}}">
<mat-icon class="fa fa-edit fa-2x" aria-hidden="true"></mat-icon>
</button>
<button mat-icon-button color="warn" matTooltip="{{lang.delete}}" (click)="preDelete(element)">
<mat-icon class="fa fa-trash fa-2x" aria-hidden="true"></mat-icon>
</button>
</mat-cell>
</ng-container>
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
<mat-row *matRowDef="let row; columns: displayedColumns;"></mat-row>
</mat-table>
</div>
</nav>
<div class="col-md-12" style="margin-top: 1%">
<table id="usersTable" class="display" style="width: 100%" cellspacing="0" border="0">
<thead>
<tr>
<th style="width:15%;" valign="bottom" align="left"><span>{{lang.id}}</span></th>
<th style="width:20%;" valign="bottom" align="left"><span>{{lang.description}}</span></th>
<th style="width:5%;" valign="bottom" align="left"><span>{{lang.status}}</span></th>
<th style="width:20%;"><span>&nbsp;</span></th>
</tr>
</thead>
<tbody>
<tr *ngFor="let group of groups" id="{{group.id}}">
<td>{{group.group_id}}</td>
<td>{{group.group_desc}}</td>
<td>
<span *ngIf="group.enabled == 'Y'" class="label label-primary">{{lang.active}}</span>
<span *ngIf="group.enabled == 'N'" class="label label-danger">{{lang.inactive}}</span>
</td>
<td style="text-align:right;">
<div class="btn-group" role="group" aria-label="...">
<button routerLink="/administration/groups/{{group.id}}" type="button" class="btn btn-default" title="{{lang.edit}}">
<a><i style="cursor:pointer" class="fa fa-edit"></i></a>
</button>
<button (click)="preDelete(group)" type="button" class="btn btn-danger" title="{{lang.delete}}">
<a><i style="cursor:pointer" class="fa fa-times"></i></a>
</button>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
\ No newline at end of file
<div class="page-header">
<h1>{{lang.administration}} {{lang.history}} <small>{{data.length}} {{lang.entries}}</small></h1>
<h1>{{lang.administration}} {{lang.history}}
<small>{{data.length}} {{lang.entries}}</small>
</h1>
</div>
<div *ngIf="loading">
<mat-spinner style="margin:auto;"></mat-spinner>
</div>
<div *ngIf="!loading" class="container-fluid">
<div class="col-md-12">
<table id="usersTable" class="table table-hover table-condensed" [md2Data]="data | dataPipe : 'info' : search | dataPipe : 'user_id' : filterUser | dataPipe : 'event_type' : filterEventType"
#md2="md2DataTable" [sortBy]='event_date' [rowsPerPage]="10">
<thead>
<tr>
<td colspan="5">
<md2-pagination></md2-pagination>
</td>
<td style="text-align:right;">
<md2-datepicker name="mindate" placeholder="{{lang.dataOfMonth}} :" type="month" [(ngModel)]="minDate" #minDateControl="ngModel"
(change)="refreshHistory()">
</md2-datepicker>
<div class="example-container">
<mat-grid-list cols="3" rowHeight="100px">
<mat-grid-tile>
<mat-paginator #paginator [length]="100" [pageSize]="10" [pageSizeOptions]="[10, 25, 50, 100]">
</mat-paginator>
</mat-grid-tile>
<mat-grid-tile>
</mat-grid-tile>
<mat-grid-tile>
<mat-form-field>
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="{{lang.filterBy}}">
</mat-form-field>
</mat-grid-tile>
</mat-grid-list>
<mat-table #table [dataSource]="dataSource" matSort matSortActive="event_date" matSortDirection="desc">
<ng-container matColumnDef="event_date">
<mat-header-cell *matHeaderCellDef mat-sort-header>{{lang.date}}</mat-header-cell>
<mat-cell *matCellDef="let element">{{element.event_date | date : "dd/MM/y HH:mm"}}</mat-cell>
</ng-container>
<ng-container matColumnDef="event_type">
<mat-header-cell *matHeaderCellDef mat-sort-header>{{lang.event}}</mat-header-cell>
<mat-cell *matCellDef="let element"> {{element.event_type}} </mat-cell>
</ng-container>
<ng-container matColumnDef="user_id">
<mat-header-cell *matHeaderCellDef mat-sort-header>{{lang.user}}</mat-header-cell>
<mat-cell *matCellDef="let element"> {{element.user_id}} </mat-cell>
</ng-container>
<ng-container matColumnDef="info">
<mat-header-cell *matHeaderCellDef mat-sort-header>{{lang.description}}</mat-header-cell>
<mat-cell *matCellDef="let element"> {{element.info}} </mat-cell>
</ng-container>
<ng-container matColumnDef="remote_ip">
<mat-header-cell *matHeaderCellDef mat-sort-header>{{lang.ip}}</mat-header-cell>
<mat-cell *matCellDef="let element"> {{element.remote_ip}} </mat-cell>
</ng-container>
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
<mat-row *matRowDef="let row; columns: displayedColumns;"></mat-row>
</mat-table>
</td>
</tr>
<tr class="filters">
<td colspan="6">
<md2-accordion>
<md2-accordion-tab>
<md2-accordion-header class="text-primary">{{lang.filterBy}} : </md2-accordion-header>
<div class="panel panel-default">
<div class="panel-body">
<div class="col-sm-4">
<mat-form-field>
<input matInput placeholder="{{lang.desc}}" [(ngModel)]="search" />
</mat-form-field>
</div>
<div class="col-sm-4">
<md2-select placeholder="Utilisateur cible" [(ngModel)]="filterUser" #filterUsersSelect="ngModel" style="padding:0px;padding-top: 15px;">
<md2-select-header>
<mat-form-field>
<input matInput name="search" type="text" placeholder="Filtre" [(ngModel)]="_search" autocomplete="off" />
</mat-form-field>
</md2-select-header>
<md2-option style="font-style:italic;color:grey;">{{lang.noSelection}}</md2-option>
<md2-option *ngFor="let filter of filterUsers | dataPipe : 'user_id' : _search" [value]="filter.user_id">{{filter.user_id}}</md2-option>
</md2-select>
</div>
<div class="col-sm-4">
<md2-select placeholder="Evenement cible" [(ngModel)]="filterEventType" #filterUsersSelect="ngModel" style="padding:0px;padding-top: 15px;">
<md2-select-header>
<mat-form-field>
<input matInput name="search" type="text" placeholder="Filtre" [(ngModel)]="_search" autocomplete="off" />
</mat-form-field>
</md2-select-header>
<md2-option style="font-style:italic;color:grey;">{{lang.noSelection}}</md2-option>
<md2-option *ngFor="let filter of filterEventTypes | dataPipe : 'event_type' : _search" [value]="filter.event_type">{{filter.event_type}}</md2-option>
</md2-select>
</div>
</div>
</div>
</md2-accordion-tab>
</md2-accordion>
</td>
</tr>
<tr>
<th md2SortBy="event_date" style="width:10%;">{{lang.date}}</th>
<th md2SortBy="event_type" style="width:10%;">{{lang.event}}</th>
<th md2SortBy="user_id" style="width:15%;">{{lang.user}}</th>
<th md2SortBy="table_name" style="width:15%;">{{lang.table}}</th>
<th md2SortBy="info" style="width:40%;">{{lang.desc}}</th>
<th md2SortBy="info" style="width:10%;">{{lang.ip}}</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let history of md2.data">
<td style="vertical-align:middle;">{{history.event_date | date : "dd/MM/y HH:mm"}}</td>
<td style="vertical-align:middle;">{{history.event_type}}</td>
<td style="vertical-align:middle;">{{history.user_id}}</td>
<td style="vertical-align:middle;">{{history.table_name}}</td>
<td style="vertical-align:middle;">{{history.info}}</td>
<td style="vertical-align:middle;">{{history.remote_ip}}</td>
</tr>
</tbody>
</table>
<mat-grid-list cols="3" rowHeight="100px">
<mat-grid-tile>
</mat-grid-tile>
<mat-grid-tile>
</mat-grid-tile>
<mat-grid-tile>
<mat-form-field>
<input matInput [(ngModel)]="minDate" [matDatepicker]="picker" placeholder="Depuis" (dateChange)="refreshHistory($event)">
<mat-datepicker-toggle matSuffix [for]="picker"></mat-datepicker-toggle>
<mat-datepicker #picker startView="month" [startAt]="minDate"></mat-datepicker>
</mat-form-field>
</mat-grid-tile>
</mat-grid-list>
</div>
</div>
</div>
</div>
\ No newline at end of file
<div class="page-header">
<h1>{{lang.administration}} {{lang.historyBatch}} <small>{{data.length}} {{lang.entries}}</small></h1>
<h1>{{lang.administration}} {{lang.historyBatch}}
<small>{{data.length}} {{lang.entries}}</small>
</h1>
</div>
<div *ngIf="loading">
<mat-spinner style="margin:auto;"></mat-spinner>
</div>
<div *ngIf="!loading" class="container-fluid">
<div class="col-md-12">
<table id="usersTable" class="table table-hover table-condensed" [md2Data]="data | dataPipe : 'info' : search | dataPipe : 'user_id' : filterUser | dataPipe : 'event_type' : filterEventType"
#md2="md2DataTable" [sortBy]='event_date' [rowsPerPage]="10">
<thead>
<tr>
<td colspan="5">
<md2-pagination></md2-pagination>
</td>
<td style="text-align:right;">
<md2-datepicker name="mindate" placeholder="{{lang.dataOfMonth}} :" type="month" [(ngModel)]="minDate" #minDateControl="ngModel"
(change)="refreshHistory()">
</md2-datepicker>
<div class="example-container">
<mat-grid-list cols="3" rowHeight="100px">
<mat-grid-tile>
<mat-paginator #paginator [length]="100" [pageSize]="10" [pageSizeOptions]="[10, 25, 50, 100]">
</mat-paginator>
</mat-grid-tile>
<mat-grid-tile>
</mat-grid-tile>
<mat-grid-tile>
<mat-form-field>
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="{{lang.filterBy}}">
</mat-form-field>
</mat-grid-tile>
</mat-grid-list>
<mat-table #table [dataSource]="dataSource" matSort matSortActive="event_date" matSortDirection="desc">
<ng-container matColumnDef="batch_id">
<mat-header-cell *matHeaderCellDef mat-sort-header>{{lang.id}}</mat-header-cell>
<mat-cell *matCellDef="let element">{{element.batch_id}}</mat-cell>
</ng-container>
<ng-container matColumnDef="event_date">
<mat-header-cell *matHeaderCellDef mat-sort-header>{{lang.date}}</mat-header-cell>
<mat-cell *matCellDef="let element">{{element.event_date | date : "dd/MM/y HH:mm"}}</mat-cell>
</ng-container>
<ng-container matColumnDef="total_processed">
<mat-header-cell *matHeaderCellDef mat-sort-header>{{lang.totalProcessed}}</mat-header-cell>
<mat-cell *matCellDef="let element"> {{element.total_processed}} </mat-cell>
</ng-container>
<ng-container matColumnDef="total_errors">
<mat-header-cell *matHeaderCellDef mat-sort-header>{{lang.totalErrors}}</mat-header-cell>
<mat-cell *matCellDef="let element"> {{element.total_errors}} </mat-cell>
</ng-container>
<ng-container matColumnDef="info">
<mat-header-cell *matHeaderCellDef mat-sort-header>{{lang.description}}</mat-header-cell>
<mat-cell *matCellDef="let element"> {{element.info}} </mat-cell>
</ng-container>
<ng-container matColumnDef="module_name">
<mat-header-cell *matHeaderCellDef mat-sort-header>{{lang.module}}</mat-header-cell>
<mat-cell *matCellDef="let element"> {{element.module_name}} </mat-cell>
</ng-container>
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
<mat-row *matRowDef="let row; columns: displayedColumns;"></mat-row>
</mat-table>
</td>
</tr>
<tr class="filters">
<td colspan="6">
<md2-accordion>
<md2-accordion-tab>
<md2-accordion-header class="text-primary">{{lang.filterBy}} : </md2-accordion-header>
<div class="panel panel-default">
<div class="panel-body">
<div class="col-sm-4">
<mat-form-field>
<input matInput placeholder="{{lang.desc}}" [(ngModel)]="search" />
</mat-form-field>
</div>
<div class="col-sm-4">
<md2-select placeholder="Module cible" [(ngModel)]="filterModule" #filterUsersSelect="ngModel" style="padding:0px;padding-top: 15px;">
<md2-select-header>
<mat-form-field>
<input matInput name="search" type="text" placeholder="Filtre" [(ngModel)]="_search" autocomplete="off" />
</mat-form-field>
</md2-select-header>
<md2-option style="font-style:italic;color:grey;">{{lang.noSelection}}</md2-option>
<md2-option *ngFor="let filter of filterModules | dataPipe : 'module_name' : _search" [value]="filter.module_name">{{filter.module_name}}</md2-option>
</md2-select>
</div>
<div class="col-sm-4">