Move Sample edit-button to the left hand side

This commit is contained in:
Hartenstein Ruben (PEA4-Fe) 2020-12-03 11:41:24 +01:00
parent ff9d56c005
commit 3526dcb049

View File

@ -161,6 +161,10 @@
<rb-table class="samples-table" scrollTop ellipsis> <rb-table class="samples-table" scrollTop ellipsis>
<tr> <tr>
<th *ngIf="login.isLevel.write">
<span class="rb-ic rb-ic-edit clickable" *ngIf="login.isLevel.dev" (click)="batchEdit()"></span>
<span class="rb-ic rb-ic-close clickable" *ngIf="sampleSelect === 1" (click)="sampleSelect = 0"></span>
</th>
<th *ngIf="sampleSelect"> <th *ngIf="sampleSelect">
<rb-form-checkbox name="select-all" (change)="selectAll($event)">all</rb-form-checkbox> <rb-form-checkbox name="select-all" (change)="selectAll($event)">all</rb-form-checkbox>
</th> </th>
@ -177,13 +181,18 @@
</div> </div>
</div> </div>
</th> </th>
<th *ngIf="login.isLevel.write">
<span class="rb-ic rb-ic-edit clickable" *ngIf="login.isLevel.dev" (click)="batchEdit()"></span>
<span class="rb-ic rb-ic-close clickable" *ngIf="sampleSelect === 1" (click)="sampleSelect = 0"></span>
</th>
</tr> </tr>
<tr *ngFor="let sample of samples; index as i" class="clickable" (click)="sampleDetails(sample._id, sampleModal)"> <tr *ngFor="let sample of samples; index as i" class="clickable" (click)="sampleDetails(sample._id, sampleModal)">
<td *ngIf="login.isLevel.write">
<a [routerLink]="'/samples/edit/' + sample._id"
*ngIf="sample.status !== 'deleted' &&
(login.isLevel.dev || (login.isLevel.write && sample.user_id === login.userId))">
<span class="rb-ic rb-ic-edit clickable"></span>
</a>
<span class="rb-ic rb-ic-undo clickable" *ngIf="sample.status === 'deleted' && login.isLevel.dev"
(click)="restoreSample(sample._id, restoreConfirm, $event)"></span>
</td>
<td *ngIf="sampleSelect"> <td *ngIf="sampleSelect">
<rb-form-checkbox *ngIf="sample.status !== 'deleted'" [name]="'validate-' + i" (click)="stopPropagation($event)" <rb-form-checkbox *ngIf="sample.status !== 'deleted'" [name]="'validate-' + i" (click)="stopPropagation($event)"
[(ngModel)]="sample.selected"> [(ngModel)]="sample.selected">
@ -208,15 +217,6 @@
<td *ngFor="let key of activeTemplateKeys.measurements">{{sample[key[1]] | exists: key[2]}}</td> <td *ngFor="let key of activeTemplateKeys.measurements">{{sample[key[1]] | exists: key[2]}}</td>
<td *ngIf="isActiveKey['status']">{{sample.status}}</td> <td *ngIf="isActiveKey['status']">{{sample.status}}</td>
<td *ngIf="isActiveKey['added']">{{sample.added | date:'dd/MM/yy'}}</td> <td *ngIf="isActiveKey['added']">{{sample.added | date:'dd/MM/yy'}}</td>
<td *ngIf="login.isLevel.write">
<a [routerLink]="'/samples/edit/' + sample._id"
*ngIf="sample.status !== 'deleted' &&
(login.isLevel.dev || (login.isLevel.write && sample.user_id === login.userId))">
<span class="rb-ic rb-ic-edit clickable"></span>
</a>
<span class="rb-ic rb-ic-undo clickable" *ngIf="sample.status === 'deleted' && login.isLevel.dev"
(click)="restoreSample(sample._id, restoreConfirm, $event)"></span>
</td>
</tr> </tr>
</rb-table> </rb-table>