Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
dmp
OpenAIRE-EUDAT-DMP-service-pilot
Commits
501a7175
Commit
501a7175
authored
Jul 23, 2021
by
Kristian Ntavidi
Browse files
Users on template editor
parent
d8a2ad28
Changes
13
Hide whitespace changes
Inline
Side-by-side
dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/section-fieldset/dataset-profile-editor-section-fieldset.component.ts
View file @
501a7175
...
...
@@ -76,7 +76,7 @@ export class DatasetProfileEditorSectionFieldSetComponent implements OnInit, OnC
}));
const
initializerSub
=
this
.
initializer
.
pipe
(
debounceTime
(
2
00
)
debounceTime
(
1
00
)
)
.
subscribe
(()
=>
{
this
.
initialize
();
...
...
dmp-frontend/src/app/ui/admin/dataset-profile/editor/dataset-profile-editor.component.html
View file @
501a7175
...
...
@@ -181,58 +181,61 @@
</mat-error>
</mat-form-field>
</div>
</div>
<!-- <div
class="col-12">
<div class="heading">1.4 {{'DATASET-PROFILE-EDITOR.STEPS.GENERAL-INFO.DATASET-TEMPLATE-USERS'| translate}}</div
>
<div class="full-width basic-info-input"
>
<table class="col-12 user-table"
>
<tr class="row user-table-header"
>
<th>
{{'USERS.LISTING.NAME' | translate}}
</th>
<th>{{'USERS.LISTING.EMAIL' | translate}}
</t
h
>
<
th><
/th>
</tr
>
<tbody
class="user-table-
body
">
<tr *ngFor="let user of userChipList" class="user-table-row"
>
<td>{{user.
name
}}</td>
<
td >{{user.email}}</
td>
<td
>
<
button mat-button class="delete-btn" (click)="verifyAndRemoveUser(user)" [matTooltip]="'DATASET-PROFILE-EDITOR.STEPS.GENERAL-INFO.DATASET-TEMPLATE-REMOVE-USER'| translate"><mat-icon>person_remove</mat-icon></button
>
</t
d
>
</tr
>
<tr *ngIf="!userChipList || !userChipList.length"
>
<td style="text-align: end; line-height: 3em;" colspan="2" >
{{'DATASET-PROFILE-EDITOR.STEPS.GENERAL-INFO.DATASET-TEMPLATE-NO-USERS-YET' | translate}}
</t
d
>
</t
r
>
</t
body
>
</
table
>
<div
class=
"col-12"
>
<div
class=
"heading"
>
1.4 {{'DATASET-PROFILE-EDITOR.STEPS.GENERAL-INFO.DATASET-TEMPLATE-USERS'| translate}}
</div>
<div
class=
"full-width basic-info-input"
>
<table
class=
"col-12
user-table
"
>
<thead
class=
"user-table-header"
>
<tr
>
<th>
{{'USERS.LISTING.NAME' | translate}}
</th
>
<th>
{{'USERS.LISTING.EMAIL' | translate}}
</th
>
<th></th>
</t
r
>
</th
ead
>
<tbody
class=
"user-table-body"
>
<tr
*ngFor=
"let user of userChipList"
class=
"user-table-
row
"
>
<td>
{{user.name}}
</td
>
<td
>
{{user.
email
}}
</td>
<td>
<button
mat-button
class=
"delete-btn"
(click)=
"verifyAndRemoveUser(user)"
[matTooltip]=
"'DATASET-PROFILE-EDITOR.STEPS.GENERAL-INFO.DATASET-TEMPLATE-REMOVE-USER'| translate"
><mat-icon>
person_remove
</mat-icon></button
>
<
/td
>
</t
r
>
<tr
*ngIf=
"!userChipList || !userChipList.length"
>
<td
style=
"text-align: end; line-height: 3em;"
colspan=
"2"
>
{{'DATASET-PROFILE-EDITOR.STEPS.GENERAL-INFO.DATASET-TEMPLATE-NO-USERS-YET' | translate}}
</td>
</t
r
>
</t
body
>
</t
able
>
</
div
>
</div>
</div>
<div class="col-12">
<div class="row justify-content-end">
<div class="col d-flex justify-content-end" style="overflow: hidden;">
<div style="min-width: 20em;max-width: 25em;" [@add-new-user-field]="inputUserState">
<mat-form-field appearance="legacy">
<input matInput #email placeholder="{{'DATASET-PROFILE-EDITOR.STEPS.GENERAL-INFO.DATASET-TEMPLATE-USERS'| translate}}" (focus)="onUserFieldFocus()" (blur)="onUserFieldBlur()" (keyup.enter)="addUser(email)">
</mat-form-field>
<div
class=
"col-12"
>
<div
class=
"row justify-content-end"
>
<div
class=
"col d-flex justify-content-end"
style=
"overflow: hidden;"
>
<div
style=
"min-width: 20em;max-width: 25em;"
[@
add-new-user-field]=
"inputUserState"
>
<mat-form-field
appearance=
"legacy"
>
<input
matInput
#email
placeholder=
"{{'DATASET-PROFILE-EDITOR.STEPS.GENERAL-INFO.DATASET-TEMPLATE-USERS'| translate}}"
(focus)=
"onUserFieldFocus()"
(blur)=
"onUserFieldBlur()"
(keyup.enter)=
"addUser(email)"
>
</mat-form-field>
</div>
</div>
<div
class=
"col-auto"
>
<button
mat-mini-fab
color=
"primary"
(click)=
"addUser(email)"
(focus)=
"onUserButtonFocus()"
(blur)=
"onUserButtonBlur()"
[matTooltip]=
"'DATASET-PROFILE-EDITOR.STEPS.GENERAL-INFO.DATASET-TEMPLATE-VALIDATE-AND-ADD-USER'| translate"
[disabled]=
"userFormDisabled"
>
<ng-container
*ngIf=
"inputUserState === 'untriggered' else triggericon"
>
<mat-icon>
add
</mat-icon>
</ng-container>
<ng-template
#triggericon
>
<mat-icon>
person_add
</mat-icon>
</ng-template>
</button>
</div>
</div>
<div class="col-auto">
<button mat-mini-fab color="primary" (click)="addUser(email)" (focus)="onUserButtonFocus()" (blur)="onUserButtonBlur()" [matTooltip]="'DATASET-PROFILE-EDITOR.STEPS.GENERAL-INFO.DATASET-TEMPLATE-VALIDATE-AND-ADD-USER'| translate" [disabled]="userFormDisabled">
<ng-container *ngIf="inputUserState === 'untriggered' else triggericon">
<mat-icon>add</mat-icon>
</ng-container>
<ng-template #triggericon>
<mat-icon>person_add</mat-icon>
</ng-template>
</button>
</div>
</div>
</div> -->
</div>
<!-- <div class="col-12">
<button mat-button class="full-width" (click)="addPage()"
[disabled]="viewOnly">{{'DATASET-PROFILE-EDITOR.ACTIONS.NEXT' | translate}}</button>
...
...
dmp-frontend/src/app/ui/admin/dataset-profile/editor/dataset-profile-editor.component.scss
View file @
501a7175
...
...
@@ -277,16 +277,18 @@ $blue-color-light: #5cf7f2;
.user-table
{
// border: thin solid rgb(179, 173, 173);
border
:
1px
solid
rgba
(
0
,
0
,
0
,
0
.12
);
//
border: 1px solid rgba(0, 0, 0, 0.12);
background-color
:
white
;
border-radius
:
4px
;
padding-bottom
:
1em
;
box-shadow
:
-1px
1px
11px
-3px
#000000
17
;
}
.user-table-header
{
text-align
:
center
;
display
:
revert
;
background-color
:
rgb
(
243
245
248
);
// background-color: #129d9811;
}
.user-table-header
th
{
...
...
dmp-frontend/src/app/ui/admin/dataset-profile/editor/dataset-profile-editor.component.ts
View file @
501a7175
...
...
@@ -1951,7 +1951,7 @@ export class DatasetProfileEditorComponent extends BaseComponent implements OnIn
},
error
=>
{
// console.log(error.message);
this
.
uiNotificationService
.
snackBarNotification
(
error
.
message
,
SnackBarNotificationLevel
.
Error
);
this
.
uiNotificationService
.
snackBarNotification
(
this
.
language
.
instant
(
'
DATASET-PROFILE-EDITOR.STEPS.GENERAL-INFO.ERRORS.USER-NOT-FOUND
'
)
,
SnackBarNotificationLevel
.
Error
);
this
.
userFormDisabled
=
false
;
// this.inputUserState = 'triggered';//when it loses focus(when disabled) it becomes untriggered
// email.focus();
...
...
dmp-frontend/src/app/ui/admin/user/listing/role-editor/user-role-editor.component.html
View file @
501a7175
<form
class=
"row user-role-editor"
[formGroup]=
"formGroup"
(ngSubmit)=
"formSubmit()"
>
<div
*ngIf=
"!this.nowEditing"
class=
"roles col"
>
<ng-container
*ngFor=
"let role of this.formGroup.get('appRoles').value"
>
<div
*ngIf=
"role!=3"
>
<div>
<span
class=
"user-role"
[ngClass]=
"{'user': role == 0, 'manager': role == 1, 'admin': role == 2, 'dataset-template-editor': role == 3}"
>
{{getPrincipalAppRoleWithLanguage(role)}}
</span>
...
...
@@ -11,7 +11,7 @@
<mat-form-field
*ngIf=
"this.nowEditing"
class=
"select-role roles-width-180 col-auto"
>
<mat-select
formControlName=
"appRoles"
multiple
required
>
<ng-container
*ngFor=
"let role of getPrincipalAppRoleValues()"
>
<mat-option
[value]=
"role"
*ngIf=
"role!=3"
>
{{getPrincipalAppRoleWithLanguage(role)}}
</mat-option>
<mat-option
[value]=
"role"
>
{{getPrincipalAppRoleWithLanguage(role)}}
</mat-option>
</ng-container>
</mat-select>
<mat-error
*ngIf=
"getFormControl('appRoles').hasError('required')"
>
{{'GENERAL.VALIDATION.REQUIRED' | translate}}
</mat-error>
...
...
dmp-frontend/src/assets/i18n/de.json
View file @
501a7175
...
...
@@ -296,7 +296,10 @@
"DATASET-TEMPLATE-DESCRIPTION-PLACEHOLDER"
:
"Dataset template description"
,
"UNTITLED"
:
"Untitled"
,
"QUESTION"
:
"Question"
,
"TEMPLATE-OUTLINE"
:
"Template outline"
"TEMPLATE-OUTLINE"
:
"Template outline"
,
"ERRORS"
:{
"USER-NOT-FOUND"
:
"User not found."
}
},
"PAGE-INFO"
:
{
"PAGE-NAME"
:
"Chapter Name"
,
...
...
dmp-frontend/src/assets/i18n/en.json
View file @
501a7175
...
...
@@ -296,7 +296,10 @@
"DATASET-TEMPLATE-DESCRIPTION-PLACEHOLDER"
:
"Dataset template description"
,
"UNTITLED"
:
"Untitled"
,
"QUESTION"
:
"Question"
,
"TEMPLATE-OUTLINE"
:
"Template outline"
"TEMPLATE-OUTLINE"
:
"Template outline"
,
"ERRORS"
:{
"USER-NOT-FOUND"
:
"User not found."
}
},
"PAGE-INFO"
:
{
"PAGE-NAME"
:
"Chapter Name"
,
...
...
dmp-frontend/src/assets/i18n/es.json
View file @
501a7175
...
...
@@ -296,7 +296,10 @@
"DATASET-TEMPLATE-DESCRIPTION-PLACEHOLDER"
:
"Dataset template description"
,
"UNTITLED"
:
"Untitled"
,
"QUESTION"
:
"Question"
,
"TEMPLATE-OUTLINE"
:
"Template outline"
"TEMPLATE-OUTLINE"
:
"Template outline"
,
"ERRORS"
:{
"USER-NOT-FOUND"
:
"User not found."
}
},
"PAGE-INFO"
:
{
"PAGE-NAME"
:
"Chapter Name"
,
...
...
dmp-frontend/src/assets/i18n/gr.json
View file @
501a7175
...
...
@@ -296,7 +296,10 @@
"DATASET-TEMPLATE-DESCRIPTION-PLACEHOLDER"
:
"Dataset template description"
,
"UNTITLED"
:
"Untitled"
,
"QUESTION"
:
"Question"
,
"TEMPLATE-OUTLINE"
:
"Template outline"
"TEMPLATE-OUTLINE"
:
"Template outline"
,
"ERRORS"
:{
"USER-NOT-FOUND"
:
"Ο χρήστης δεν βρέθηκε."
}
},
"PAGE-INFO"
:
{
"PAGE-NAME"
:
"Chapter Name"
,
...
...
dmp-frontend/src/assets/i18n/pt.json
View file @
501a7175
...
...
@@ -296,7 +296,10 @@
"DATASET-TEMPLATE-DESCRIPTION-PLACEHOLDER"
:
"Descrição do modelo de dados"
,
"UNTITLED"
:
"Sem título"
,
"QUESTION"
:
"Questão"
,
"TEMPLATE-OUTLINE"
:
"Esquema do modelo"
"TEMPLATE-OUTLINE"
:
"Esquema do modelo"
,
"ERRORS"
:{
"USER-NOT-FOUND"
:
"Usuário não encontrado."
}
},
"PAGE-INFO"
:
{
"PAGE-NAME"
:
"Nome do capítulo"
,
...
...
dmp-frontend/src/assets/i18n/sk.json
View file @
501a7175
...
...
@@ -296,7 +296,10 @@
"DATASET-TEMPLATE-DESCRIPTION-PLACEHOLDER"
:
"Dataset template description"
,
"UNTITLED"
:
"Untitled"
,
"QUESTION"
:
"Question"
,
"TEMPLATE-OUTLINE"
:
"Template outline"
"TEMPLATE-OUTLINE"
:
"Template outline"
,
"ERRORS"
:{
"USER-NOT-FOUND"
:
"User not found."
}
},
"PAGE-INFO"
:
{
"PAGE-NAME"
:
"Chapter Name"
,
...
...
dmp-frontend/src/assets/i18n/sr.json
View file @
501a7175
...
...
@@ -296,7 +296,10 @@
"DATASET-TEMPLATE-DESCRIPTION-PLACEHOLDER"
:
"Dataset template description"
,
"UNTITLED"
:
"Untitled"
,
"QUESTION"
:
"Question"
,
"TEMPLATE-OUTLINE"
:
"Template outline"
"TEMPLATE-OUTLINE"
:
"Template outline"
,
"ERRORS"
:{
"USER-NOT-FOUND"
:
"User not found."
}
},
"PAGE-INFO"
:
{
"PAGE-NAME"
:
"Chapter Name"
,
...
...
dmp-frontend/src/assets/i18n/tr.json
View file @
501a7175
...
...
@@ -296,7 +296,10 @@
"DATASET-TEMPLATE-DESCRIPTION-PLACEHOLDER"
:
"Dataset template description"
,
"UNTITLED"
:
"Untitled"
,
"QUESTION"
:
"Question"
,
"TEMPLATE-OUTLINE"
:
"Template outline"
"TEMPLATE-OUTLINE"
:
"Template outline"
,
"ERRORS"
:{
"USER-NOT-FOUND"
:
"User not found."
}
},
"PAGE-INFO"
:
{
"PAGE-NAME"
:
"Chapter Name"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment