1. dmp editor > new dmp > removed extra (*) from description field

2. dashboard styling changes
This commit is contained in:
Sofia Papacharalampous 2024-04-08 15:10:12 +03:00
parent d2816b9454
commit bf868d306a
3 changed files with 174 additions and 136 deletions

View File

@ -13,8 +13,8 @@ import { Subscription } from "rxjs";
(paste)="pasteWithoutFormatting($event)"></angular-editor>
<mat-icon *ngIf="form.value && editable" (click)="parentFormGroup.get(controlName).patchValue('')" class="clear">close</mat-icon> -->
<mat-form-field class="full-width editor">
<mat-label>{{(placeholder? (placeholder | translate) : '') + (required ? ' *': '')}}</mat-label>
<textarea matInput [formControl]="form" rows="5" placeholder="{{(placeholder? (placeholder | translate) : '') + (required ? ' *': '')}}"></textarea>
<mat-label>{{(placeholder? (placeholder | translate) : '')}}</mat-label>
<textarea matInput [formControl]="form" rows="5"></textarea>
</mat-form-field>
</div>
`,

View File

@ -1,116 +1,144 @@
<div class="main-content dashboard-main-container h-100" [class.non-auth-main-container]="!this.isAuthenticated()">
<div *ngIf="this.isAuthenticated()" class="container-fluid">
<div *ngIf="this.dashboardStatistics">
<div class="main-content">
<div class="col">
<div class="row">
<div *ngIf="newReleaseNotificationVisible" class="new-releases-card col-auto mt-0 mr-4">
<a class="col-auto d-flex" (click)="dismissNewReleaseNotification()"><span class="ml-auto mt-3 material-icons clear-icon">clear</span></a>
<div class="row new-releases-hint-container m-0">
<p class="new-releases-chip mb-0 col-auto">{{'NEW-RELEASE-NOTIFICATION.HINT' | translate}}</p>
</div>
<p class="new-releases-title mb-0 pt-4">{{'NEW-RELEASE-NOTIFICATION.TITLE' | translate}}</p>
<p class="new-releases-content mb-0">{{'NEW-RELEASE-NOTIFICATION.BODY' | translate}}</p>
<div *ngIf="this.dashboardStatistics" class="main-content">
<div class="container-fluid">
<div class="row flex-column-reverse flex-xl-row">
<div class="row d-flex align-items-center mt-4" *ngIf="this.configurationService.newReleaseNotificationLink">
<div class="col-auto d-flex">
<a class="notification-link" href="{{this.configurationService.newReleaseNotificationLink}}" target="_blank">
<button mat-raised-button type="button" class="col-auto align-self-center new-releases-btn">{{'NEW-RELEASE-NOTIFICATION.ACTIONS.LEARN-MORE' | translate}}</button>
</a>
<div class="col-12 col-xl-10">
<div class="row">
<div *ngIf="newReleaseNotificationVisible" class="new-releases-card col-auto mt-0 mr-4">
<a class="col-auto d-flex" (click)="dismissNewReleaseNotification()"><span class="ml-auto mt-3 material-icons clear-icon">clear</span></a>
<div class="row new-releases-hint-container m-0">
<p class="new-releases-chip mb-0 col-auto">{{'NEW-RELEASE-NOTIFICATION.HINT' | translate}}</p>
</div>
<p class="new-releases-title mb-0 pt-4">{{'NEW-RELEASE-NOTIFICATION.TITLE' | translate}}</p>
<p class="new-releases-content mb-0">{{'NEW-RELEASE-NOTIFICATION.BODY' | translate}}</p>
<div class="row d-flex align-items-center mt-4" *ngIf="this.configurationService.newReleaseNotificationLink">
<div class="col-auto d-flex">
<a class="notification-link" href="{{this.configurationService.newReleaseNotificationLink}}" target="_blank">
<button mat-raised-button type="button" class="col-auto align-self-center new-releases-btn">{{'NEW-RELEASE-NOTIFICATION.ACTIONS.LEARN-MORE' | translate}}</button>
</a>
</div>
<span class="new-releases-logo">
<img src="../../../assets/images/new-releases-logo.png">
</span>
</div>
</div>
<div class="card col-auto mt-0" [style.display]="isIntroCardVisible ? 'block' : 'none'">
<a *ngIf="this.hasDmps()" class="col-auto d-flex" (click)="dismissIntroCard()"><span class="ml-auto mt-3 material-icons clear-icon">clear</span></a>
<p *ngIf="!this.hasDmps()" class="card-title mb-0 pt-4">{{'DASHBOARD.DMP-QUESTION' | translate}}</p>
<p *ngIf="!this.hasDmps()" class="card-content mb-0">{{'DASHBOARD.INFO-DMP-TEXT' | translate}}</p>
<p *ngIf="!this.hasDmps()" class="card-content pt-3 mb-0">
{{'DASHBOARD.NEW-QUESTION' | translate}} <a href="https://www.openaire.eu/how-to-create-a-data-management-plan" target="_blank"><u>{{'DASHBOARD.OPEN-AIR-GUIDE' | translate}}</u></a> {{'DASHBOARD.LEARN-MORE' | translate}}
</p>
<p *ngIf="this.hasDmps()" class="card-content mb-0 pt-0">{{'DASHBOARD.DMP-ABOUT-BEG' | translate}}
<b>{{'DASHBOARD.DATASET-DESCRIPTIONS-DASHBOARD-TEXT' | translate}}</b>
{{'DASHBOARD.DMP-ABOUT-END' | translate}}
</p>
<div class="row d-flex align-items-center">
<div *ngIf="!this.hasDmps()" class="col-auto add-dataset-btn d-flex">
<button type="button" class="col-auto align-self-center normal-btn" (click)="openNewDmpDialog()">{{'DASHBOARD.START-YOUR-FIRST-DMP' | translate}}</button>
</div>
<div *ngIf="this.hasDmps()" class="new-dataset-tour add-dataset-btn col-auto d-flex">
<button mat-raised-button type="button" class="col-auto align-self-center yellow-btn" (click)="addNewDescription()">{{'DASHBOARD.ACTIONS.ADD-DESCRIPTION' | translate}}</button>
</div>
<span class="col-auto ml-auto">
<img class="laptop-img\6" src="../../../assets/images/dashboard-popup.png">
</span>
</div>
</div>
<span class="new-releases-logo">
<img src="../../../assets/images/new-releases-logo.png">
</span>
</div>
</div>
<div class="card col-auto mt-0" [style.display]="isIntroCardVisible ? 'block' : 'none'">
<a *ngIf="this.hasDmps()" class="col-auto d-flex" (click)="dismissIntroCard()"><span class="ml-auto mt-3 material-icons clear-icon">clear</span></a>
<div *ngIf="this.hasDmps()" class="col">
<div class="latest-activity-title">{{'DASHBOARD.LATEST-ACTIVITY' | translate}}</div>
<mat-tab-group color="#00000" mat-stretch-tabs="false" mat-align-tabs="start" class="my-mat-tab remove-border-bottom" [selectedIndex]="indexFromCurrentType" (selectedTabChange)="currentType = $event.tab.ariaLabel">
<mat-tab aria-label="recent" label="{{'DASHBOARD.ALL' | translate}}">
<app-recent-edited-activity (totalCountRecentEdited)="onCountAllRecent($event)" [isActive]="currentType == 'recent'"></app-recent-edited-activity>
<div *ngIf="totalRecents === 0" class="empty-list">{{'DASHBOARD.EMPTY-LIST' | translate}}</div>
</mat-tab>
<mat-tab aria-label="drafts" label="{{'DASHBOARD.DRAFTS' | translate}}">
<app-drafts (totalCountDraftDatasets)="onCountDraftDatasets($event)" [isActive]="currentType == 'drafts'"></app-drafts>
<div *ngIf="totalDraftDatasets === 0" class="empty-list">{{'DASHBOARD.EMPTY-LIST' | translate}}</div>
</mat-tab>>
<mat-tab aria-label="dmps" label="{{'DASHBOARD.DMPS' | translate}}">
<app-recent-edited-dmp-activity (totalCountDmps)="onCountDmps($event)" [isActive]="currentType == 'dmps'"></app-recent-edited-dmp-activity>
<div *ngIf="totalDmps === 0" class="empty-list">{{'DASHBOARD.EMPTY-LIST' | translate}}</div>
</mat-tab>
<mat-tab aria-label="descriptions" label="{{'DASHBOARD.DESCRIPTIONS' | translate}}">
<app-recent-edited-description-activity (totalCountDatasets)="onCountDatasets($event)" [isActive]="currentType == 'descriptions'"></app-recent-edited-description-activity>
<div *ngIf="totalDatasets === 0" class="empty-list">{{'DASHBOARD.EMPTY-LIST' | translate}}</div>
<div *ngIf="totalDatasets === 0" class="col-auto d-flex justify-content-center">
<button mat-raised-button class="add-dataset" (click)="addNewDescription()">
<mat-icon>add</mat-icon> {{'DASHBOARD.ACTIONS.ADD-DESCRIPTION' | translate}}
</button>
</div>
</mat-tab>
</mat-tab-group>
</div>
</div>
<p *ngIf="!this.hasDmps()" class="card-title mb-0 pt-4">{{'DASHBOARD.DMP-QUESTION' | translate}}</p>
<p *ngIf="!this.hasDmps()" class="card-content mb-0">{{'DASHBOARD.INFO-DMP-TEXT' | translate}}</p>
<p *ngIf="!this.hasDmps()" class="card-content pt-3 mb-0">
{{'DASHBOARD.NEW-QUESTION' | translate}} <a href="https://www.openaire.eu/how-to-create-a-data-management-plan" target="_blank"><u>{{'DASHBOARD.OPEN-AIR-GUIDE' | translate}}</u></a> {{'DASHBOARD.LEARN-MORE' | translate}}
</p>
<p *ngIf="this.hasDmps()" class="card-content mb-0 pt-0">{{'DASHBOARD.DMP-ABOUT-BEG' | translate}}
<b>{{'DASHBOARD.DATASET-DESCRIPTIONS-DASHBOARD-TEXT' | translate}}</b>
{{'DASHBOARD.DMP-ABOUT-END' | translate}}
</p>
<div class="row d-flex align-items-center">
<div *ngIf="!this.hasDmps()" class="col-auto add-dataset-btn d-flex">
<button type="button" class="col-auto align-self-center normal-btn" (click)="openNewDmpDialog()">{{'DASHBOARD.START-YOUR-FIRST-DMP' | translate}}</button>
<!-- Right Sidebar -->
<div *ngIf="!this.hasDmps()" class="col-12 col-xl-2 mb-4 stats">
<div class="row">
<div class="col-12">
<div class="personal-usage" style="width: fit-content;">
<span>
{{'DASHBOARD.PERSONAL-USAGE' | translate}}
</span>
</div>
<div *ngIf="this.hasDmps()" class="new-dataset-tour add-dataset-btn col-auto d-flex">
<button mat-raised-button type="button" class="col-auto align-self-center yellow-btn" (click)="addNewDescription()">{{'DASHBOARD.ACTIONS.ADD-DESCRIPTION' | translate}}</button>
</div>
<span class="col-auto ml-auto">
<img class="laptop-img\6" src="../../../assets/images/dashboard-popup.png">
</span>
</div>
<div class="col-auto col-xl-12">
<div class="counter-zero" style="width: fit-content;"><span>0</span></div>
<a [routerLink]="['/plans']" class="link">{{'DASHBOARD.DMPS' | translate}}</a>
</div>
<div class="col-auto col-xl-12">
<div class="counter-zero" style="width: fit-content;"><span>0</span></div>
<a [routerLink]="['/descriptions']" class="link">{{'DASHBOARD.DESCRIPTIONS' | translate}}</a>
</div>
<div class="col-auto col-xl-12">
<div class="counter-zero" style="width: fit-content;"><span>0</span></div>
<a class="link-disabled">{{'DASHBOARD.GRANTS' | translate}}</a>
</div>
<div class="col-auto col-xl-12">
<div class="counter-zero" style="width: fit-content;"><span>0</span></div>
<a class="link-disabled">{{'DASHBOARD.RELATED-ORGANISATIONS' | translate}}</a>
</div>
</div>
</div>
<div *ngIf="this.hasDmps()" class="col">
<div class="latest-activity-title">{{'DASHBOARD.LATEST-ACTIVITY' | translate}}</div>
<mat-tab-group color="#00000" mat-stretch-tabs="false" mat-align-tabs="start" class="my-mat-tab remove-border-bottom" [selectedIndex]="indexFromCurrentType" (selectedTabChange)="currentType = $event.tab.ariaLabel">
<mat-tab aria-label="recent" label="{{'DASHBOARD.ALL' | translate}}">
<app-recent-edited-activity (totalCountRecentEdited)="onCountAllRecent($event)" [isActive]="currentType == 'recent'"></app-recent-edited-activity>
<div *ngIf="totalRecents === 0" class="empty-list">{{'DASHBOARD.EMPTY-LIST' | translate}}</div>
</mat-tab>
<mat-tab aria-label="drafts" label="{{'DASHBOARD.DRAFTS' | translate}}">
<app-drafts (totalCountDraftDatasets)="onCountDraftDatasets($event)" [isActive]="currentType == 'drafts'"></app-drafts>
<div *ngIf="totalDraftDatasets === 0" class="empty-list">{{'DASHBOARD.EMPTY-LIST' | translate}}</div>
</mat-tab>>
<mat-tab aria-label="dmps" label="{{'DASHBOARD.DMPS' | translate}}">
<app-recent-edited-dmp-activity (totalCountDmps)="onCountDmps($event)" [isActive]="currentType == 'dmps'"></app-recent-edited-dmp-activity>
<div *ngIf="totalDmps === 0" class="empty-list">{{'DASHBOARD.EMPTY-LIST' | translate}}</div>
</mat-tab>
<mat-tab aria-label="descriptions" label="{{'DASHBOARD.DESCRIPTIONS' | translate}}">
<app-recent-edited-description-activity (totalCountDatasets)="onCountDatasets($event)" [isActive]="currentType == 'descriptions'"></app-recent-edited-description-activity>
<div *ngIf="totalDatasets === 0" class="empty-list">{{'DASHBOARD.EMPTY-LIST' | translate}}</div>
<div *ngIf="totalDatasets === 0" class="col-auto d-flex justify-content-center">
<button mat-raised-button class="add-dataset" (click)="addNewDescription()">
<mat-icon>add</mat-icon> {{'DASHBOARD.ACTIONS.ADD-DESCRIPTION' | translate}}
</button>
</div>
</mat-tab>
</mat-tab-group>
<div *ngIf="this.hasDmps()" class="col-12 col-xl-2 mb-4 stats">
<div class="row">
<div class="col-12">
<div class="personal-usage" style="width: fit-content;"><span>{{'DASHBOARD.PERSONAL-USAGE' | translate}}</span></div>
</div>
<div class="col-auto col-xl-12">
<div [ngClass]="{'counter': dashboardStatistics?.dmpCount != 0, 'counter-zero': dashboardStatistics?.dmpCount == 0}" style="width: fit-content;">
<span>{{dashboardStatistics?.dmpCount}}</span></div>
<a [routerLink]="['/plans']" class="link">{{'DASHBOARD.DMPS' | translate}}</a>
</div>
<div class="col-auto col-xl-12">
<div [ngClass]="{'counter': dashboardStatistics?.descriptionCount != 0, 'counter-zero': dashboardStatistics?.descriptionCount == 0}" style="width: fit-content;">
<span>{{dashboardStatistics?.descriptionCount}}</span></div>
<a [routerLink]="['/descriptions']" class="link">{{'DASHBOARD.DESCRIPTIONS' | translate}}</a>
</div>
<div class="col-auto col-xl-12">
<div [ngClass]="{'counter': grantCount != 0, 'counter-zero': grantCount == 0}" style="width: fit-content;">
<span>{{grantCount}}</span></div>
<a href="#" class="link-disabled">{{'DASHBOARD.GRANTS' | translate}}</a>
</div>
<div class="col-auto col-xl-12">
<div [ngClass]="{'counter': organizationCount != 0, 'counter-zero': organizationCount == 0}" style="width: fit-content;">
<span>{{organizationCount}}</span></div>
<a href="#" class="link-disabled">{{'DASHBOARD.RELATED-ORGANISATIONS' | translate}}</a>
</div>
</div>
</div>
</div>
<!-- Right Sidebar -->
<div *ngIf="!this.hasDmps()" class="col-auto ml-auto stats">
<div class="personal-usage">{{'DASHBOARD.PERSONAL-USAGE' | translate}}</div>
<div class="counter-zero">0</div>
<a [routerLink]="['/plans']" class="link">{{'DASHBOARD.DMPS' | translate}}</a>
<div class="counter-zero">0</div>
<a [routerLink]="['/descriptions']" class="link">{{'DASHBOARD.DESCRIPTIONS' | translate}}</a>
<div class="counter-zero">0</div>
<a class="link-disabled">{{'DASHBOARD.GRANTS' | translate}}</a>
<div class="counter-zero">0</div>
<a class="link-disabled">{{'DASHBOARD.RELATED-ORGANISATIONS' | translate}}</a>
</div>
<div *ngIf="this.hasDmps()" class="col-auto stats">
<div class="personal-usage">{{'DASHBOARD.PERSONAL-USAGE' | translate}}</div>
<div [ngClass]="{'counter': dashboardStatistics?.dmpCount != 0, 'counter-zero': dashboardStatistics?.dmpCount == 0}">
{{dashboardStatistics?.dmpCount}}</div>
<a [routerLink]="['/plans']" class="link">{{'DASHBOARD.DMPS' | translate}}</a>
<div [ngClass]="{'counter': dashboardStatistics?.descriptionCount != 0, 'counter-zero': dashboardStatistics?.descriptionCount == 0}">
{{dashboardStatistics?.descriptionCount}}</div>
<a [routerLink]="['/descriptions']" class="link">{{'DASHBOARD.DESCRIPTIONS' | translate}}</a>
<div [ngClass]="{'counter': grantCount != 0, 'counter-zero': grantCount == 0}">
{{grantCount}}</div>
<a href="#" class="link-disabled">{{'DASHBOARD.GRANTS' | translate}}</a>
<div [ngClass]="{'counter': organizationCount != 0, 'counter-zero': organizationCount == 0}">
{{organizationCount}}</div>
<a href="#" class="link-disabled">{{'DASHBOARD.RELATED-ORGANISATIONS' | translate}}</a>
</div>
</div>
</div>
<div>
<div class="main-content">

View File

@ -1,38 +1,48 @@
<div class="col-md-12 d-flex justify-content-center" *ngIf="listingItems == null">
<span class="empty-list">{{'DMP-LISTING.EMPTY-LIST' | translate}}</span>
</div>
<div *ngIf="listingItems != null" id="results" #results>
<div class="d-flex flex-direction-row pt-4">
<!-- Sort by -->
<span class="d-flex align-items-center">{{'DMP-LISTING.SORT-BY' | translate}}:</span>
<mat-form-field appearance="outline" class="sort-form col-auto">
<mat-select placeholder="{{'GENERAL.CRITERIA.LIKE'| translate}}" [formControl]="formGroup.get('order')">
<mat-option *ngIf="!publicMode" [value]="order.UpdatedAt">{{enumUtils.toRecentActivityOrderString(order.UpdatedAt)}}</mat-option>
<!-- <mat-option *ngIf="publicMode" [value]="order.PUBLISHED">{{enumUtils.toRecentActivityOrderString(order.PUBLISHED)}}</mat-option> -->
<mat-option [value]="order.Label">{{enumUtils.toRecentActivityOrderString(order.Label)}}</mat-option>
<mat-option *ngIf="!publicMode" [value]="order.Status">{{enumUtils.toRecentActivityOrderString(order.Status)}}</mat-option>
</mat-select>
</mat-form-field>
<!-- End of Sort by -->
<!-- Search Filter-->
<mat-form-field appearance="outline" class="search-form ml-auto col-auto pr-0" floatLabel="never">
<mat-icon matSuffix>search</mat-icon>
<input matInput placeholder="{{'GENERAL.CRITERIA.LIKE'| translate}}" name="likeCriteria" [formControl]="formGroup.get('like')">
<mat-error *ngIf="formGroup.get('like').hasError('backendError')">{{formGroup.get('like').getError('backendError').message}}</mat-error>
</mat-form-field>
<!-- End of Search Filter -->
</div>
<div *ngIf="listingItems && listingItems.length > 0 && pageSize > pageLessSize" class="d-flex justify-content-center">
<button type="button" class="btn-load-more" (click)="loadLess()">{{'GENERAL.ACTIONS.LOAD-LESS' | translate}}</button>
</div>
<div *ngFor="let item of listingItems; let i = index">
<app-dmp-listing-item-component *ngIf="item.dmp" [showDivider]="i != (listingItems.length - 1)" [dmp]="item.dmp" [isPublic]="false"></app-dmp-listing-item-component>
<app-description-listing-item-component *ngIf="item.description" [showDivider]="i != (listingItems.length - 1)" [description]="item.description" [isPublic]="false" ></app-description-listing-item-component>
</div>
<div class="text-muted d-flex justify-content-center mt-5" *ngIf="listingItems && listingItems.length > 0 && listingItems.length < pageSize">
{{'GENERAL.ACTIONS.NO-MORE-AVAILABLE' | translate}}
</div>
<div *ngIf="listingItems && listingItems.length > 0 && listingItems.length >= startIndex + pageSize" class="d-flex justify-content-center">
<button type="button" class="btn-load-more" (click)="loadMore()">{{'GENERAL.ACTIONS.LOAD-MORE' | translate}}</button>
<div class="container-fluid">
<div class="row">
<div class="col-md-12 d-flex justify-content-center" *ngIf="listingItems == null">
<span class="empty-list">{{'DMP-LISTING.EMPTY-LIST' | translate}}</span>
</div>
<div *ngIf="listingItems != null" id="results" class="col-12" #results>
<div class="row pt-4">
<!-- Sort by -->
<div class="col-12 col-xl-auto">
<span class="mb-1">{{'DMP-LISTING.SORT-BY' | translate}}:</span>
</div>
<div class="col-12 col-xl">
<mat-form-field appearance="outline" class="w-100 sort-form">
<mat-select placeholder="{{'GENERAL.CRITERIA.LIKE'| translate}}" [formControl]="formGroup.get('order')">
<mat-option *ngIf="!publicMode" [value]="order.UpdatedAt">{{enumUtils.toRecentActivityOrderString(order.UpdatedAt)}}</mat-option>
<!-- <mat-option *ngIf="publicMode" [value]="order.PUBLISHED">{{enumUtils.toRecentActivityOrderString(order.PUBLISHED)}}</mat-option> -->
<mat-option [value]="order.Label">{{enumUtils.toRecentActivityOrderString(order.Label)}}</mat-option>
<mat-option *ngIf="!publicMode" [value]="order.Status">{{enumUtils.toRecentActivityOrderString(order.Status)}}</mat-option>
</mat-select>
</mat-form-field>
</div>
<!-- End of Sort by -->
<!-- Search Filter-->
<div class="col-12 col-xl">
<mat-form-field appearance="outline" class="w-100 search-form ml-auto pr-0" floatLabel="never">
<mat-icon matSuffix>search</mat-icon>
<input matInput placeholder="{{'GENERAL.CRITERIA.LIKE'| translate}}" name="likeCriteria" [formControl]="formGroup.get('like')">
<mat-error *ngIf="formGroup.get('like').hasError('backendError')">{{formGroup.get('like').getError('backendError').message}}</mat-error>
</mat-form-field>
</div>
<!-- End of Search Filter -->
</div>
<div *ngIf="listingItems && listingItems.length > 0 && pageSize > pageLessSize" class="d-flex justify-content-center">
<button type="button" class="btn-load-more" (click)="loadLess()">{{'GENERAL.ACTIONS.LOAD-LESS' | translate}}</button>
</div>
<div *ngFor="let item of listingItems; let i = index">
<app-dmp-listing-item-component *ngIf="item.dmp" [showDivider]="i != (listingItems.length - 1)" [dmp]="item.dmp" [isPublic]="false"></app-dmp-listing-item-component>
<app-description-listing-item-component *ngIf="item.description" [showDivider]="i != (listingItems.length - 1)" [description]="item.description" [isPublic]="false" ></app-description-listing-item-component>
</div>
<div class="text-muted d-flex justify-content-center mt-5" *ngIf="listingItems && listingItems.length > 0 && listingItems.length < pageSize">
{{'GENERAL.ACTIONS.NO-MORE-AVAILABLE' | translate}}
</div>
<div *ngIf="listingItems && listingItems.length > 0 && listingItems.length >= startIndex + pageSize" class="d-flex justify-content-center">
<button type="button" class="btn-load-more" (click)="loadMore()">{{'GENERAL.ACTIONS.LOAD-MORE' | translate}}</button>
</div>
</div>
</div>
</div>