Newer
Older
<mat-sidenav-container autosize class="maarch-container">
<mat-sidenav-content>
<div class="bg-head">
<div class="bg-head-title" [class.customContainerRight]="appService.getViewMode()">
<div class="bg-head-title-label">

Alex ORLUC
committed
<header-left></header-left>
</div>
<div class="bg-head-title-tool">
<header-right></header-right>
</div>
<div class="bg-head-content" [class.fullContainer]="appService.getViewMode()">
</div>
</div>
<div class="container" [class.fullContainer]="appService.getViewMode()">
<div class="container-content">
<div *ngIf="loading" style="display:flex;height:100%;">
<mat-spinner style="margin:auto;"></mat-spinner>
</div>
<mat-card *ngIf="!loading" class="card-app-content">
<mat-tab-group [(selectedIndex)]="selectedTabIndex_1">
<mat-tab label="{{lang.informations}}">
<form class="form-horizontal" (ngSubmit)="onSubmit()" #groupForm="ngForm">
<mat-form-field>
<input matInput *ngIf="creationMode" name="identifier" placeholder="{{lang.id}}"
[(ngModel)]="group.group_id" pattern="^[\w.-]*$" maxlength="32" required>
<input matInput *ngIf="!creationMode" name="identifier" placeholder="{{lang.id}}"
title="{{lang.id}}" [(ngModel)]="group.group_id" disabled>
<mat-form-field>
<input matInput name="description" title="{{lang.label}}" placeholder="{{lang.label}}"
[(ngModel)]="group.group_desc" maxlength="255" required>
<input matInput name="comment" title="{{lang.description}}"
placeholder="{{lang.description}}" [(ngModel)]="group.security.maarch_comment">
</mat-form-field>
<mat-form-field>
<textarea matInput name="clause" title="{{lang.clauseGroup}}"
placeholder="{{lang.clauseGroup}}" [(ngModel)]="group.security.where_clause"
required matTextareaAutosize matAutosizeMinRows="1"
matAutosizeMaxRows="5"></textarea>
<mat-icon style="cursor:pointer;" color="primary" matSuffix class="fa fa-info-circle"
matTooltip="{{lang.keywordHelper}}"
(click)="panelMode='keywordInfos';snav2.toggle()"></mat-icon>
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<div class="col-md-12 text-center" style="padding:10px;">
<button mat-raised-button [disabled]="!groupForm.form.valid"
color="primary">{{lang.save}}</button>
</div>
</form>
</mat-tab>
<mat-tab label="{{lang.privileges}}" *ngIf="!creationMode">
<mat-tab-group [(selectedIndex)]="selectedTabIndex_2" *ngIf="!creationMode">
<mat-tab label="{{lang.menus}}">
<mat-list>
<mat-list-item *ngFor="let menu of privilegeService.getMenus() | sortBy: 'label'">
<mat-slide-toggle color="primary" name="{{menu.label}}"
[checked]="group.privileges.indexOf(menu.id) > -1"
(change)="toggleService($event,menu)" matTooltip="{{menu.comment}}">
{{menu.label}}</mat-slide-toggle>
</mat-list-item>
</mat-list>
</mat-tab>
<mat-tab label="{{lang.administrationServices}}">
<mat-form-field floatLabel="never" appearance="outline" class="basketsFilter"
style="padding-left:20px;padding-right:20px;font-size: 11px;">
<input matInput placeholder="{{lang.filterBy}}" #listFilterAdmin>
</mat-form-field>
<div class="col-md-3"
*ngFor="let administration of administrationPrivileges | sortBy: 'label' | filterList:listFilterAdmin.value:'label'"
style="padding:10px;">
<mat-slide-toggle color="primary" name="{{administration.label}}" [(ngModel)]="administration.checked"
[checked]="administration.checked"
(change)="toggleService($event,administration)"
matTooltip="{{administration.comment}}">{{administration.label}}
</mat-slide-toggle>
<button mat-icon-button [class.active]="panelMode === administration.id"
*ngIf="administration.hasParams"
(click)="$event.stopPropagation();openUserParams(administration.id)"
color="primary" [title]="lang.goToAdminParams"
[disabled]="group.privileges.indexOf(administration.id) === -1">
<mat-icon class="fa fa-cogs"></mat-icon>
</button>
</div>
</mat-tab>
<mat-tab label="{{lang.functionnalities}}">
<mat-form-field floatLabel="never" appearance="outline" class="basketsFilter"
style="padding-left:20px;padding-right:20px;font-size: 11px;">
<input matInput placeholder="{{lang.filterBy}}" #listFilter>
</mat-form-field>
<mat-expansion-panel *ngFor="let unit of unitPrivileges | sortBy: 'label'" expanded [class.emptyExpansionPanel]="(unit.services | filterList:listFilter.value:'label').length == 0">
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
<mat-expansion-panel-header>
<mat-panel-title>
{{unit.label}}
</mat-panel-title>
</mat-expansion-panel-header>
<ng-container
*ngIf="['diffusionList','confidentialityAndSecurity'].indexOf(unit.id) === -1">
<mat-list>
<mat-list-item
*ngFor="let privilege of unit.services | sortBy: 'label' | filterList:listFilter.value:'label'">
<mat-slide-toggle color="primary" name="{{privilege.label}}"
[checked]="group.privileges.indexOf(privilege.id) > -1"
(change)="toggleService($event,privilege)"
matTooltip="{{privilege.comment}}">{{privilege.label}}
</mat-slide-toggle>
</mat-list-item>
</mat-list>
</ng-container>
<ng-container *ngIf="unit.id === 'diffusionList'">
<mat-list-item *ngFor="let fakePrivilege of unit.services" color="primary"
style="font-size: 16px;">
<span [innerHTML]="fakePrivilege.label"></span>
<mat-form-field
style="width: 250px !important;padding-left: 10px;padding-right: 10px;">
<mat-select [(ngModel)]="fakePrivilege.current"
(selectionChange)="changeDifflistPrivilege($event, fakePrivilege.id)">
<mat-option value="">{{lang.noRole}}</mat-option>
<mat-option *ngFor="let subservice of fakePrivilege.services"
[value]="subservice.id">{{subservice.label}}</mat-option>
</mat-select>
</mat-form-field>.
</mat-list-item>
</ng-container>
<ng-container *ngIf="unit.id === 'confidentialityAndSecurity'">
<mat-list-item *ngFor="let fakePrivilege of unit.services" color="primary"
style="font-size: 16px;">
<span [innerHTML]="fakePrivilege.label"></span>
<mat-form-field
style="width: 300px !important;padding-left: 10px;padding-right: 10px;">
<mat-select [(ngModel)]="fakePrivilege.current"
(selectionChange)="changePersonalDataPrivilege($event)">
<mat-option value="">{{lang.notVisible}}</mat-option>
<mat-option *ngFor="let subservice of fakePrivilege.services"
[value]="subservice.id">{{subservice.label}}</mat-option>
</mat-select>
</mat-form-field>.
</mat-list-item>
</ng-container>
</mat-expansion-panel>
</mat-tab>
</mat-tab-group>
</mat-tab>
<mat-tab label="{{lang.indexation}}" *ngIf="!creationMode">
<ng-template matTabContent>
<app-indexing-administration [groupId]="group.id" (resfreshShortcut)="resfreshShortcut()">
</app-indexing-administration>
</ng-template>
</mat-tab>
<mat-tab label="{{lang.relatedUsers}}" *ngIf="!creationMode">
<div class="row" style="margin:0px;">
<div class="col-md-12" *ngIf="group.canAdminUsers" style="padding:5px;">
<plugin-autocomplete [labelPlaceholder]="lang.linkUser"
[labelList]="lang.availableUsers" [routeDatas]="['/rest/autocomplete/users']"
[targetSearchKey]="'idToDisplay'" [subInfoKey]="'id'"
(triggerEvent)="linkUser($event)"></plugin-autocomplete>
<hr />
</div>
<div class="col-md-6 col-xs-6">
<mat-form-field>
<input matInput (keyup)="applyFilter($event.target.value)"
placeholder="{{lang.filterBy}}">
</mat-form-field>
</div>
<div class="col-md-6 col-xs-6">
<mat-paginator #paginator [length]="100" [hidePageSize]="true" [pageSize]="10">
</mat-paginator>
</div>
<mat-table #sortUsers="matSort" [dataSource]="usersDataSource" matSort matSortActive="lastname"
matSortDirection="asc">
<ng-container matColumnDef="firstname">
<mat-header-cell *matHeaderCellDef mat-sort-header>{{lang.firstname}}</mat-header-cell>
<mat-cell *matCellDef="let element"> {{element.firstname}} </mat-cell>
</ng-container>
<ng-container matColumnDef="lastname">
<mat-header-cell *matHeaderCellDef mat-sort-header>{{lang.lastname}}</mat-header-cell>
<mat-cell *matCellDef="let element"> {{element.lastname}} </mat-cell>
</ng-container>
<mat-header-row *matHeaderRowDef="usersDisplayedColumns"></mat-header-row>
<mat-row *matRowDef="let row; columns: usersDisplayedColumns;" matTooltip="{{lang.view}}" [matTooltipDisabled]="!row.allowed"
[ngStyle]="{'cursor': row.allowed ? 'pointer' : '', 'opacity': row.allowed ? '1' : '0.6'}" (click)="goToUserAdmin(row)">
</mat-table>
</mat-tab>
<mat-tab label="{{lang.relatedBaskets}}" *ngIf="!creationMode">
<div class="row" style="margin:0px;">
<div class="col-md-6 col-xs-6">
<mat-form-field>
<input matInput (keyup)="applyBasketsFilter($event.target.value)"
placeholder="{{lang.filterBy}}">
</mat-form-field>
</div>
<div class="col-md-6 col-xs-6">
<mat-paginator #paginatorBaskets [length]="100" [hidePageSize]="true" [pageSize]="10">
</mat-paginator>
</div>
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
<mat-table #sortBaskets="matSort" [dataSource]="basketsDataSource" matSort
matSortActive="basket_name" matSortDirection="asc">
<ng-container matColumnDef="basket_name">
<mat-header-cell *matHeaderCellDef mat-sort-header>{{lang.label}}</mat-header-cell>
<mat-cell *matCellDef="let element"> {{element.basket_name}} </mat-cell>
</ng-container>
<ng-container matColumnDef="basket_desc">
<mat-header-cell *matHeaderCellDef mat-sort-header>{{lang.description}}
</mat-header-cell>
<mat-cell *matCellDef="let element"> {{element.basket_desc}} </mat-cell>
</ng-container>
<mat-header-row *matHeaderRowDef="basketsDisplayedColumns"></mat-header-row>
<mat-row *matRowDef="let row; columns: basketsDisplayedColumns;"
routerLink="/administration/baskets/{{row.basket_id}}" matTooltip="{{lang.view}}"
style="cursor:pointer;"></mat-row>
</mat-table>
</mat-tab>
</mat-tab-group>
</mat-card>
</div>
</div>
</mat-sidenav-content>
<mat-sidenav #snav2 [mode]="appService.getViewMode() ? 'over' : 'side'"
[fixedInViewport]="appService.getViewMode()" fixedTopGap="56" position='end'
[opened]="appService.getViewMode() ? false : false">
<ng-container *ngIf="panelMode === 'keywordInfos'">
<mat-nav-list>
<h3 mat-subheader>{{lang.keywordHelp}}</h3>
</mat-nav-list>
<mat-list role="list" style="width: 400px;padding: 5px;">
<p style="font-size:10px;">{{lang.keywordHelpDesc_11}}</p>
<div style="border:1px black solid; padding:3px;font-size:10px;">
<b>DESTINATION = @my_primary_entity or DESTINATION in (@subentities[@my_primary_entity])</b>
</div>
<h4 mat-line style="font-weight:bold;font-size:10px;">@user :</h4>
<p mat-line style="font-size:10px;">{{lang.keywordHelpDesc_1}}</p>
<h4 mat-line style="font-weight:bold;font-size:10px;">@user_id :</h4>
<p mat-line style="font-size:10px;">{{lang.keywordHelpDesc_12}}</p>
<h4 mat-line style="font-weight:bold;font-size:10px;">@email :</h4>
<p mat-line style="font-size:10px;">{{lang.keywordHelpDesc_2}}</p>
<h4 mat-line style="font-weight:bold;font-size:10px;">@my_entities :</h4>
<p mat-line style="font-size:10px;">{{lang.keywordHelpDesc_3}}</p>
<h4 mat-line style="font-weight:bold;font-size:10px;">@my_primary_entity :</h4>
<p mat-line style="font-size:10px;">{{lang.keywordHelpDesc_4}}</p>
<h4 mat-line style="font-weight:bold;font-size:10px;">@subentities[('entity_1',...,'entity_n')] :
</h4>
<p mat-line style="font-size:10px;">{{lang.keywordHelpDesc_5}}</p>
<h4 mat-line style="font-weight:bold;font-size:10px;">@parent_entity['entity_id'] :</h4>
<p mat-line style="font-size:10px;">{{lang.keywordHelpDesc_6}}</p>
<h4 mat-line style="font-weight:bold;font-size:10px;">@sisters_entities['entity_id'] :</h4>
<p mat-line style="font-size:10px;">{{lang.keywordHelpDesc_7}}</p>
<h4 mat-line style="font-weight:bold;font-size:10px;">@entity_type['type'] :</h4>
<p mat-line style="font-size:10px;">{{lang.keywordHelpDesc_8}}</p>
<h4 mat-line style="font-weight:bold;font-size:10px;">@all_entities :</h4>
<p mat-line style="font-size:10px;">{{lang.keywordHelpDesc_9}}</p>
<h4 mat-line style="font-weight:bold;font-size:10px;">@immediate_children['entity_1',...,
'entity_id'] :
</h4>
<p mat-line style="font-size:10px;">{{lang.keywordHelpDesc_10}}</p>
</mat-list>
</ng-container>
<ng-container *ngIf="panelMode === 'admin_users'">
<mat-nav-list>
<h3 mat-subheader>{{lang.adminParamsUsers}}</h3>
</mat-nav-list>
<mat-list role="list" style="width: 400px;padding: 5px;">
<p color="primary">
{{lang.chooseAllowedGroups}} :
</p>
<mat-selection-list #paramsList
(selectionChange)="updatePrivilegeParams(paramsList.selectedOptions.selected)">
<mat-list-option color="primary" style="font-size: 13px;" checkboxPosition="before"
*ngFor="let authorizedGroup of authorizedGroupsUserParams"
[selected]="authorizedGroup.checked" [value]="authorizedGroup.id">
{{authorizedGroup.label}}
</mat-list-option>
</mat-selection-list>
</mat-list>
</ng-container>
</mat-sidenav>
</mat-sidenav-container>