Skip to content

Commit

Permalink
[front: editLog] nicer action select
Browse files Browse the repository at this point in the history
  • Loading branch information
t8g committed Aug 31, 2017
1 parent 2b3620f commit f610b81
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
5 changes: 3 additions & 2 deletions client/src/app/log-table/log-table.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
<thead>
<tr>
<th>{{ 'editLogs.date' | translate }}</th>
<th>{{ 'editLogs.object' | translate }}</th>
<th>{{ 'editLogs.object.' + feature | translate }}</th>
<th>
<md-select [placeholder]="'editLogs.action' | translate" [formControl]="filterForm.controls['action']" *ngIf="filterForm.controls['action']">
<md-option *ngFor="let action of actions" [value]="action.value">{{ 'editLogs.actions.' + action.label | translate }}</md-option>
<md-option>{{ 'editLogs.actions.all' | translate }}</md-option>
<md-option *ngFor="let action of actions" [value]="action">{{ 'editLogs.actions.' + action | translate }}</md-option>
</md-select>
</th>

Expand Down
12 changes: 6 additions & 6 deletions client/src/app/log-table/log-table.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ import { Component, Input, OnInit, Output, EventEmitter, OnChanges } from '@angu
})
export class LogTableComponent implements OnInit {

actions = [
{ value: '', label: 'all' },
{ value: 'create', label: 'create' },
{ value: 'update', label: 'update' },
{ value: 'delete', label: 'delete' }
];
actions = ['create', 'update', 'delete'];
// { value: '', label: 'all' },
// { value: 'create', label: 'create' },
// { value: 'update', label: 'update' },
// { value: 'delete', label: 'delete' }
// ];
field: { api: any, src: any, stringValue: any } = { api: null, src: null, stringValue: null };

filterForm: FormGroup;
Expand Down
6 changes: 5 additions & 1 deletion client/src/assets/i18n/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,16 @@
"user_guide": "Guide utilisateur",
"fields_list": "Liste des champs",
"editLogs": {
"who": "Qui",
"who": "Modifié par",
"date": "Date",
"action": "Action",
"role": "Rôle",
"lab": "Organisation",
"fields": "Champs modifiés",
"object": {
"people": "Membre",
"organization": "Organisation"
},
"actions": {
"create": "Création",
"update": "Édition",
Expand Down

0 comments on commit f610b81

Please sign in to comment.