Revert "view inactive users on deleted plan/description, fix wording, small ui fixes"
This reverts commit 52ab438905
.
This commit is contained in:
parent
52ab438905
commit
b602fa997a
|
@ -7,15 +7,14 @@
|
|||
<div class="col-12">
|
||||
<div class="row">
|
||||
<div class="col info">
|
||||
@if(!viewOnly){
|
||||
<ng-container *ngIf="!viewOnly else viewOnlyTemplate">
|
||||
<div *ngIf="isNew" class="description-title">{{'DESCRIPTION-EDITOR.TITLE-ADD-DESCRIPTION' | translate}}</div>
|
||||
<div *ngIf="!isNew" class="description-title">{{'DESCRIPTION-EDITOR.TITLE-EDIT-DESCRIPTION' | translate}}</div>
|
||||
<div class="description-subtitle">
|
||||
{{ formGroup.get('label').value }} <span *ngIf="isDirty()" class="description-changes">{{'DESCRIPTION-EDITOR.UNSAVED-CHANGES' | translate}}</span>
|
||||
</div>
|
||||
}@else {
|
||||
<div class="description-title">{{'DESCRIPTION-EDITOR.TITLE-PREVIEW-DESCRIPTION' | translate}}</div>
|
||||
}
|
||||
<div class="description-subtitle">{{ formGroup.get('label').value }} <span *ngIf="isDirty()" class="description-changes">{{'DESCRIPTION-EDITOR.UNSAVED-CHANGES' | translate}}</span></div>
|
||||
</ng-container>
|
||||
<ng-template #viewOnlyTemplate>
|
||||
<div class="description-title">{{'DESCRIPTION-EDITOR.TITLE-PREVIEW-DESCRIPTION' | translate}}</div>
|
||||
</ng-template>
|
||||
<div *ngIf="item?.plan?.id" class="d-flex flex-direction-row plan-info">
|
||||
<div class="col-auto description-to-plan">{{'DESCRIPTION-EDITOR.TO-PLAN' | translate}}</div>
|
||||
<div class="plan-title p-0">: {{ item?.plan?.label }}</div>
|
||||
|
|
|
@ -148,7 +148,7 @@ export class DescriptionEditorComponent extends BaseEditor<DescriptionEditorMode
|
|||
|
||||
if (copyPlanId && !planId && planSectionId) this.isCopy = true;
|
||||
|
||||
this.viewOnly = this.viewOnly || isPublicDescription;
|
||||
this.viewOnly = isPublicDescription;
|
||||
|
||||
//Regular Editor case
|
||||
if (itemId != null && newPlanId == null) {
|
||||
|
|
|
@ -45,19 +45,18 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="row mb-4 pb-3">
|
||||
<div class="col-auto pr-0">
|
||||
@if(isActive && (canEdit || canAnnotate) && isDraftDescription(description) && !isLocked){
|
||||
<button (click)="editClicked(description)" mat-mini-fab class="mr-3 actions-btn" matTooltip="{{'DESCRIPTION-OVERVIEW.ACTIONS.EDIT' | translate}}" matTooltipPosition="above">
|
||||
<mat-icon class="mat-mini-fab-icon">create</mat-icon>
|
||||
</button>
|
||||
}@else {
|
||||
@if(!isPublicView){
|
||||
<button (click)="editClicked(description)" mat-mini-fab class="mr-3 actions-btn" matTooltip="{{'DESCRIPTION-OVERVIEW.ACTIONS.PREVIEW' | translate}}" matTooltipPosition="above">
|
||||
<mat-icon class="mat-mini-fab-icon">visibility</mat-icon>
|
||||
</button>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
<div *ngIf="(canEdit || canAnnotate) && isDraftDescription(description) && !isLocked; else previewButton" class="col-auto pr-0">
|
||||
<button (click)="editClicked(description)" mat-mini-fab class="mr-3 actions-btn" matTooltip="{{'DESCRIPTION-OVERVIEW.ACTIONS.EDIT' | translate}}" matTooltipPosition="above">
|
||||
<mat-icon class="mat-mini-fab-icon">create</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
<ng-template #previewButton>
|
||||
<div *ngIf="!isPublicView" class="col-auto pr-0">
|
||||
<button (click)="editClicked(description)" mat-mini-fab class="mr-3 actions-btn" matTooltip="{{'DESCRIPTION-OVERVIEW.ACTIONS.PREVIEW' | translate}}" matTooltipPosition="above">
|
||||
<mat-icon class="mat-mini-fab-icon">visibility</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
</ng-template>
|
||||
<div *ngIf="canCopy" class="col-auto pr-0">
|
||||
<button (click)="openCopyToPlanDialog()" mat-mini-fab class="mr-3 actions-btn" matTooltip="{{'DESCRIPTION-OVERVIEW.ACTIONS.CLONE' | translate}}" matTooltipPosition="above">
|
||||
<mat-icon class="mat-mini-fab-icon">content_copy</mat-icon>
|
||||
|
|
|
@ -130,7 +130,7 @@ export class DescriptionOverviewComponent extends BaseComponent implements OnIni
|
|||
this.breadcrumbService.addIdResolvedValue(data.id.toString(), data.label);
|
||||
|
||||
this.description = data;
|
||||
this.description.plan.planUsers = this.isActive ? data.plan.planUsers.filter(x => x.isActive === IsActive.Active) : data.plan.planUsers;
|
||||
this.description.plan.planUsers = data.plan.planUsers.filter(x => x.isActive === IsActive.Active);
|
||||
this.researchers = this.referenceService.getReferencesForTypes(this.description?.plan?.planReferences, [this.referenceTypeService.getResearcherReferenceType()]);
|
||||
this.checkLockStatus(this.description.id);
|
||||
this.canDelete = this.isActive && (this.authService.hasPermission(AppPermission.DeleteDescription) ||
|
||||
|
|
|
@ -58,19 +58,18 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="row" *ngIf="!lockStatus || canClonePlan() || (canDeletePlan() && !isLocked)">
|
||||
<div class="col-auto pr-0">
|
||||
@if(isActive && canEditPlan(plan) && !lockStatus){
|
||||
<button (click)="editClicked()" mat-mini-fab class="d-flex justify-content-center align-items-center" matTooltip="{{'PLAN-OVERVIEW.ACTIONS.EDIT' | translate}}" matTooltipPosition="above">
|
||||
<mat-icon class="mat-mini-fab-icon">create</mat-icon>
|
||||
</button>
|
||||
} @else {
|
||||
@if(!isPublicView){
|
||||
<button (click)="editClicked()" mat-mini-fab class="d-flex justify-content-center align-items-center" matTooltip="{{'PLAN-OVERVIEW.ACTIONS.PREVIEW' | translate}}" matTooltipPosition="above">
|
||||
<mat-icon class="mat-mini-fab-icon">visibility</mat-icon>
|
||||
</button>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
<div *ngIf="canEditPlan(plan) && !lockStatus; else previewButton" class="col-auto pr-0">
|
||||
<button (click)="editClicked()" mat-mini-fab class="d-flex justify-content-center align-items-center" matTooltip="{{'PLAN-OVERVIEW.ACTIONS.EDIT' | translate}}" matTooltipPosition="above">
|
||||
<mat-icon class="mat-mini-fab-icon">create</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
<ng-template #previewButton>
|
||||
<div *ngIf="!isPublicView" class="col-auto pr-0">
|
||||
<button (click)="editClicked()" mat-mini-fab class="d-flex justify-content-center align-items-center" matTooltip="{{'PLAN-OVERVIEW.ACTIONS.PREVIEW' | translate}}" matTooltipPosition="above">
|
||||
<mat-icon class="mat-mini-fab-icon">visibility</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
</ng-template>
|
||||
<div *ngIf="canClonePlan()" class="col-auto pr-0">
|
||||
<button (click)="cloneClicked()" mat-mini-fab class="d-flex justify-content-center align-items-center" matTooltip="{{'PLAN-OVERVIEW.ACTIONS.CLONE' | translate}}" matTooltipPosition="above">
|
||||
<mat-icon class="mat-mini-fab-icon">content_copy</mat-icon>
|
||||
|
|
|
@ -129,7 +129,7 @@ export class PlanOverviewComponent extends BaseComponent implements OnInit {
|
|||
this.breadcrumbService.addIdResolvedValue(data.id?.toString(), data.label);
|
||||
|
||||
this.plan = data;
|
||||
this.plan.planUsers = this.isActive ? data?.planUsers?.filter((x) => x.isActive === IsActive.Active) : data?.planUsers;
|
||||
this.plan.planUsers = data.planUsers.filter(x => x.isActive === IsActive.Active);
|
||||
this.plan.otherPlanVersions = data.otherPlanVersions?.filter(x => x.isActive === IsActive.Active) || null;
|
||||
if (this.plan.descriptions) {
|
||||
if (this.plan.status == PlanStatus.Finalized) {
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<div class="col">
|
||||
<div class="row">
|
||||
<div class="col-auto info">
|
||||
<div class="title">{{(canEdit ? 'PLAN-EDITOR.TITLE-EDIT' : 'PLAN-EDITOR.TITLE-PREVIEW') | translate}}</div>
|
||||
<div class="title">{{'PLAN-EDITOR.TITLE-EDIT' | translate}}</div>
|
||||
<div class="subtitle">{{ formGroup.get('label').value }} <span *ngIf="isDirty()" class="changes">({{'PLAN-EDITOR.UNSAVED-CHANGES' | translate}})</span></div>
|
||||
</div>
|
||||
<div *ngIf="step > 0" class="ml-auto d-flex flex-row">
|
||||
|
|
|
@ -139,7 +139,7 @@ export class PlanEditorComponent extends BaseEditor<PlanEditorModel, Plan> imple
|
|||
}
|
||||
|
||||
protected canEditSection(id: Guid): boolean {
|
||||
return this.canEdit && (this.hasPermission(this.authService.permissionEnum.EditDescription) || this.item?.authorizationFlags?.some(x => x === AppPermission.EditDescription) || (
|
||||
return !this.isDeleted && (this.hasPermission(this.authService.permissionEnum.EditDescription) || this.item?.authorizationFlags?.some(x => x === AppPermission.EditDescription) || (
|
||||
this.permissionPerSection && this.permissionPerSection[id.toString()] && this.permissionPerSection[id.toString()].some(x => x === AppPermission.EditDescription)
|
||||
));
|
||||
}
|
||||
|
@ -151,7 +151,7 @@ export class PlanEditorComponent extends BaseEditor<PlanEditorModel, Plan> imple
|
|||
}
|
||||
|
||||
get canEdit(): boolean {
|
||||
return !this.isDeleted && (this.isNew ? this.authService.hasPermission(AppPermission.NewPlan) : this.item.authorizationFlags?.some(x => x === AppPermission.EditPlan) || this.authService.hasPermission(AppPermission.EditPlan));
|
||||
return this.isNew ? this.authService.hasPermission(AppPermission.NewPlan) : this.item.authorizationFlags?.some(x => x === AppPermission.EditPlan) || this.authService.hasPermission(AppPermission.EditPlan);
|
||||
}
|
||||
|
||||
protected canAnnotate(id: Guid): boolean {
|
||||
|
|
|
@ -0,0 +1,151 @@
|
|||
{
|
||||
"production": false,
|
||||
"Server": "http://localhost:8081/api/",
|
||||
"App": "http://localhost:4200/",
|
||||
"HelpService": {
|
||||
"Enabled": false,
|
||||
"Url": "localhost:5000/"
|
||||
},
|
||||
"defaultCulture": "en",
|
||||
"defaultBlueprintId": "86635178-36a6-484f-9057-a934e4eeecd5",
|
||||
"keycloak": {
|
||||
"enabled": true,
|
||||
"address": null,
|
||||
"realm": null,
|
||||
"flow": "standard",
|
||||
"clientId": null,
|
||||
"silentCheckSsoRedirectUri": "http://localhost:4200/assets/silent-check-sso.html",
|
||||
"scope": "openid profile email address phone dmp_web dmp_notification identity_provider",
|
||||
"clientSecret": null,
|
||||
"grantType": "code"
|
||||
},
|
||||
"inAppNotificationsCountInterval": "30",
|
||||
"notification_service": {
|
||||
"enabled": true,
|
||||
"address": "http://localhost:8086/api/"
|
||||
},
|
||||
"annotation_service": {
|
||||
"enabled": true,
|
||||
"address": "http://localhost:8087/api/",
|
||||
"statusIcons": [
|
||||
{
|
||||
"internalStatus": "0",
|
||||
"icon": "check"
|
||||
},
|
||||
{
|
||||
"id": "948fdf9c-6b84-467c-884b-5323c5ea15d7",
|
||||
"icon": "done_all"
|
||||
}
|
||||
],
|
||||
"defaultStatusIcon": "animation"
|
||||
},
|
||||
"logging": {
|
||||
"enabled": true,
|
||||
"logLevels": ["debug", "info", "warning", "error"]
|
||||
},
|
||||
"matomo": {
|
||||
"enabled": true,
|
||||
"url": "https://beta.analytics.openaire.eu/",
|
||||
"siteId": 361
|
||||
},
|
||||
"analytics": {
|
||||
"providers": [
|
||||
{
|
||||
"enabled": true,
|
||||
"type": "matomo",
|
||||
"options": {
|
||||
"url": "https://beta.analytics.openaire.eu/",
|
||||
"siteId": 361
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"lockInterval": 60000,
|
||||
"guideAssets": "assets/images/guide",
|
||||
"allowOrganizationCreator": true,
|
||||
"orcidPath": "https://orcid.org/",
|
||||
"maxFileSizeInMB": 10,
|
||||
"authProviders": {
|
||||
"defaultAuthProvider": {
|
||||
"name": "Default",
|
||||
"providerClass": "defaultIcon"
|
||||
},
|
||||
"authProviders": [
|
||||
{
|
||||
"name": "google",
|
||||
"providerClass": "googleIcon",
|
||||
"cultures": ["en"]
|
||||
},
|
||||
{
|
||||
"name": "facebook",
|
||||
"providerClass": "facebookIcon",
|
||||
"cultures": ["en"]
|
||||
}
|
||||
]
|
||||
},
|
||||
"referenceTypes": {
|
||||
"researcherId": "5a2112e7-ea99-4cfe-98a1-68665e26726e",
|
||||
"grantId": "5b9c284f-f041-4995-96cc-fad7ad13289c",
|
||||
"organizationId": "7eeffb98-58fb-4921-82ec-e27f32f8e738"
|
||||
},
|
||||
"deposit":{
|
||||
"recordUrlIdPlaceholder": "{doi_id}"
|
||||
},
|
||||
"sidebar": {
|
||||
"infoItems": [
|
||||
{
|
||||
"title": "SIDE-BAR.CO-BRANDING",
|
||||
"icon": "toll",
|
||||
"externalUrl": "/splash/resources/co-branding.html",
|
||||
"accessLevel": "public"
|
||||
},
|
||||
{
|
||||
"title": "SIDE-BAR.SUPPORT",
|
||||
"icon": "help",
|
||||
"routerPath": "/contact-support",
|
||||
"accessLevel": "authenticated"
|
||||
},
|
||||
{
|
||||
"title": "SIDE-BAR.SUPPORT",
|
||||
"icon": "help",
|
||||
"externalUrl": "/splash/contact.html",
|
||||
"accessLevel": "unauthenticated"
|
||||
},
|
||||
{
|
||||
"title": "SIDE-BAR.FEEDBACK",
|
||||
"icon": "feedback",
|
||||
"externalUrl": "https://docs.google.com/forms/d/12RSCrUjdSDp2LZLpjDKOi44cN1fLDD2q1-F66SqZIis/viewform?edit_requested=true",
|
||||
"accessLevel": "public"
|
||||
}
|
||||
],
|
||||
"footerItems": [
|
||||
{
|
||||
"routerPath": "/about",
|
||||
"title": "FOOTER.ABOUT",
|
||||
"icon": "feedback",
|
||||
"accessLevel": "public"
|
||||
},
|
||||
{
|
||||
"routerPath": "/terms-and-conditions",
|
||||
"title": "FOOTER.TERMS-OF-SERVICE",
|
||||
"accessLevel": "public"
|
||||
},
|
||||
{
|
||||
"routerPath": "/glossary",
|
||||
"title": "FOOTER.GLOSSARY",
|
||||
"accessLevel": "public"
|
||||
},
|
||||
{
|
||||
"routerPath": "/user-guide",
|
||||
"title": "FOOTER.GUIDE",
|
||||
"accessLevel": "public"
|
||||
},
|
||||
{
|
||||
"routerPath": "/contact-support",
|
||||
"title": "FOOTER.CONTACT-SUPPORT",
|
||||
"accessLevel": "authenticated"
|
||||
}
|
||||
]
|
||||
},
|
||||
"mergeAccountDelayInSeconds": 30
|
||||
}
|
|
@ -1713,7 +1713,6 @@
|
|||
"PLAN-EDITOR": {
|
||||
"TITLE-NEW": "New Plan",
|
||||
"TITLE-EDIT": "Editing Plan",
|
||||
"TITLE-PREVIEW": "Previewing Plan",
|
||||
"TITLE": "Plan Template",
|
||||
"UNSAVED-CHANGES": "unsaved changes",
|
||||
"LOCKED": "Locked",
|
||||
|
|
Loading…
Reference in New Issue