Skip to content

Commit

Permalink
fix(ui): translation about permission and size changes (#4817)
Browse files Browse the repository at this point in the history
Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
  • Loading branch information
bnjjj authored and yesnault committed Dec 17, 2019
1 parent 211f685 commit a939b2a
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 71 deletions.
24 changes: 12 additions & 12 deletions ui/src/app/shared/permission/form/permission.form.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,25 @@
<div class="fields">
<div class="seven wide field">
<label>{{'group_name' | translate}}</label>
<sm-select class="fluid search"
[options]="{'fullTextSearch': true}"
[(model)]="newGroupPermission.group.name"
id="PermissionGroupName">
<sm-select class="fluid search" [options]="{'fullTextSearch': true}"
[(model)]="newGroupPermission.group.name" id="PermissionGroupName">
<option *ngFor="let g of groupList" [ngValue]="g">{{g.name}}</option>
</sm-select>
</div>
<div class="seven wide field">
<div class="five wide field">
<label>{{'group_permission' | translate}}</label>
<sm-select class="fluid search"
[options]="{'fullTextSearch': true}"
[(model)]="newGroupPermission.permission"
id="PermissionGroupLevel">
<sm-select class="fluid search" [options]="{'fullTextSearch': true}"
[(model)]="newGroupPermission.permission" id="PermissionGroupLevel">
<option *ngFor="let p of permissionList" [value]="p.value">{{p.name | translate}}</option>
</sm-select>
</div>
<div class="two wide center field">
<button *ngIf="buttonType === 'submit'" type="submit" class="ui green button" [class.loading]="loading" [class.disabled]="loading || !newGroupPermission.group.name || newGroupPermission.group.name === ''"><i class="save icon"></i>{{ 'btn_save' | translate }}</button>
<button *ngIf="buttonType === 'button'" type="submit" class="ui icon blue button" [class.loading]="loading" [class.disabled]="loading || !newGroupPermission.group.name || newGroupPermission.group.name === ''"><i class="plus icon"></i></button>
<button *ngIf="buttonType === 'submit'" type="submit" class="ui green button" [class.loading]="loading"
[class.disabled]="loading || !newGroupPermission.group.name || newGroupPermission.group.name === ''"><i
class="save icon"></i>{{ 'btn_save' | translate }}</button>
<button *ngIf="buttonType === 'button'" type="submit" class="ui icon blue button" [class.loading]="loading"
[class.disabled]="loading || !newGroupPermission.group.name || newGroupPermission.group.name === ''"><i
class="plus icon"></i></button>
</div>
</div>
</form>
</form>
113 changes: 56 additions & 57 deletions ui/src/app/shared/permission/list/permission.list.html
Original file line number Diff line number Diff line change
@@ -1,67 +1,66 @@
<div class="permission">
<table class="ui fixed single line celled table">
<thead>
<tr>
<th class="seven wide">{{ 'group_name' | translate }}</th>
<th class="seven wide">{{ 'group_permission' | translate }}</th>
<th class="two wide"></th>
</tr>
<tr>
<th class="four wide">{{ 'group_name' | translate }}</th>
<th class="four wide">{{ 'group_permission' | translate }}</th>
<th class="two wide"></th>
</tr>
</thead>
<tbody>
<tr *ngFor="let gp of getDataForCurrentPage()">
<td class="middle-aligned">
<a [routerLink]="['/settings/group', gp.group.name]">{{ gp.group.name }}</a>
</td>
<td>
<div *ngIf="edit;then wPermission;else rPermission"></div>
<ng-template #wPermission>
<div class="ui form">
<sui-select class="selection"
[isDisabled]="gp.updating"
[(ngModel)]="gp.permission"
(ngModelChange)="pushChange()"
(selectedOptionChange)="gp.hasChanged = true"
[optionFormatter]="formatPermission()"
[hasLabels]="true"
[options]="permissionsList"
labelField="name"
valueField="value">
<sui-select-option *ngFor="let p of permissionsList" [value]="p"></sui-select-option>
</sui-select>
</div>
</ng-template>
<ng-template #rPermission>
<div class="ui fluid input">
{{ getPermissionName(gp.permission) | translate }}
</div>
</ng-template>
</td>
<td class="center">
<ng-container *ngIf="edit">
<button *ngIf="mode === 'submit' && gp.hasChanged" class="ui green button" [class.loading]="gp.updating" [class.disabled]="gp.updating" name="btnupdateperm" (click)="sendEvent('update', gp)">
<i class="save icon"></i>
{{ 'btn_save' | translate}}
</button>
<app-delete-button *ngIf="mode === 'submit' && !gp.hasChanged" [loading]="gp.updating" (event)="sendEvent('delete', gp)"></app-delete-button>
<button *ngIf="mode === 'form'" class="ui icon blue button" (click)="sendEvent('delete', gp)"><i class="trash icon"></i></button>
</ng-container>
</td>
</tr>
<tr *ngFor="let gp of getDataForCurrentPage()">
<td class="middle-aligned">
<a [routerLink]="['/settings/group', gp.group.name]">{{ gp.group.name }}</a>
</td>
<td>
<div *ngIf="edit;then wPermission;else rPermission"></div>
<ng-template #wPermission>
<div class="ui form">
<sui-select class="selection" [isDisabled]="gp.updating" [(ngModel)]="gp.permission"
(ngModelChange)="pushChange()" (selectedOptionChange)="gp.hasChanged = true"
[optionFormatter]="formatPermission()" [hasLabels]="true" [options]="permissionsList"
labelField="name" valueField="value">
<sui-select-option *ngFor="let p of permissionsList" [value]="p"></sui-select-option>
</sui-select>
</div>
</ng-template>
<ng-template #rPermission>
<div class="ui fluid input">
{{ getPermissionName(gp.permission) | translate }}
</div>
</ng-template>
</td>
<td class="center">
<ng-container *ngIf="edit">
<button *ngIf="mode === 'submit' && gp.hasChanged" class="ui green button"
[class.loading]="gp.updating" [class.disabled]="gp.updating" name="btnupdateperm"
(click)="sendEvent('update', gp)">
<i class="save icon"></i>
{{ 'btn_save' | translate}}
</button>
<app-delete-button *ngIf="mode === 'submit' && !gp.hasChanged" [loading]="gp.updating"
(event)="sendEvent('delete', gp)"></app-delete-button>
<button *ngIf="mode === 'form'" class="ui icon blue button" (click)="sendEvent('delete', gp)"><i
class="trash icon"></i></button>
</ng-container>
</td>
</tr>
</tbody>
<tfoot *ngIf="getNbOfPages() > 1">
<tr>
<th colspan="4">
<div class="ui right floated pagination menu" >
<a class="icon item" (click)="downPage()">
<i class="left chevron icon"></i>
</a>
<a class="item" *ngFor="let page of getNbOfPages() | ngForNumber" (click)="goTopage(page)" [class.active]="currentPage === page">{{page}}</a>
<a class="icon item" (click)="upPage()">
<i class="right chevron icon"></i>
</a>
</div>
</th>
</tr>
<tr>
<th colspan="4">
<div class="ui right floated pagination menu">
<a class="icon item" (click)="downPage()">
<i class="left chevron icon"></i>
</a>
<a class="item" *ngFor="let page of getNbOfPages() | ngForNumber" (click)="goTopage(page)"
[class.active]="currentPage === page">{{page}}</a>
<a class="icon item" (click)="upPage()">
<i class="right chevron icon"></i>
</a>
</div>
</th>
</tr>
</tfoot>
</table>
</div>
4 changes: 2 additions & 2 deletions ui/src/assets/i18n/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -791,7 +791,7 @@
"workflow_node_trigger_condition_no": "Il n'y a aucune condition de déclenchement",
"workflow_node_trigger_title": "Trigger à partir de {{pip}}",
"workflow_node_type_outgoing_hook": "Hook Sortant",
"workflow_node_permissions_form_title": "Ajouter une permission sur le nœud {{node}} du workflow",
"workflow_node_permissions_form_title": "Ajouter une permission sur le nœud du workflow",
"workflow_permission_list_title": "Liste des permissions sur le workflow",
"workflow_permission_form_title": "Ajouter une permission sur le workflow",
"workflow_history_length_title": "Nombre de builds à conserver par tag",
Expand Down Expand Up @@ -896,4 +896,4 @@
"workflow_error_unknown_key_description": "Veuillez vérifier que la clé SSH avec laquelle vous avez lié votre application à votre dépôt git est bien active et indiqué sur votre dépôt git pour avoir les accès",
"workflow_error_bad_vcs_strategy_title": "Mauvaise configuration des paramètres VCS de votre application",
"workflow_error_bad_vcs_strategy_description": "Veuillez vérifier que la clé SSH avec laquelle vous avez lié votre application à votre dépôt git est bien active et indiqué sur votre dépôt git pour avoir les accès. Veuillez aussi vérifier que vous ayez bien une clé ssh de mentionnée dans votre fichier yaml d'application pointant sur votre dépôt git si vous avez mis le mode de clone SSH."
}
}

0 comments on commit a939b2a

Please sign in to comment.