Adds text and button to add dataset on empty tab list on dashboard

This commit is contained in:
apapachristou 2020-07-03 10:40:22 +03:00
parent 8551e9140c
commit ce24afd16f
5 changed files with 262 additions and 218 deletions

View File

@ -45,26 +45,35 @@
<b>{{'DASHBOARD.DATASET-DESCRIPTIONS' | translate}}</b> <b>{{'DASHBOARD.DATASET-DESCRIPTIONS' | translate}}</b>
{{'DASHBOARD.DMP-ABOUT-END' | translate}}</p> {{'DASHBOARD.DMP-ABOUT-END' | translate}}</p>
<div class="d-flex pt-4 pb-4 mt-3 mb-3"> <div class="d-flex pt-4 pb-4 mt-3 mb-3">
<button type="button" class="col-auto align-self-center yellow-btn">{{'DASHBOARD.ACTIONS.ADD-DATASET-DESCRIPTION' | translate}}</button> <button mat-raised-button type="button" class="col-auto align-self-center yellow-btn" [routerLink]="['/datasets/new']">{{'DASHBOARD.ACTIONS.ADD-DATASET-DESCRIPTION' | translate}}</button>
</div> </div>
</div> </div>
<div class="latest-activity-title">Latest activity</div> <div class="latest-activity-title">{{'DASHBOARD.LATEST-ACTIVITY' | translate}}</div>
<mat-tab-group mat-align-tabs="start" class="remove-border-bottom"> <mat-tab-group mat-align-tabs="start" class="remove-border-bottom">
<mat-tab label="All ({{this.totalRecents}})"> <mat-tab label="{{'DASHBOARD.ALL' | translate}} ({{totalRecents}})">
<div class="col-auto pt-3"><input type="text" class="d-flex ml-auto" placeholder="&nbsp;&nbsp;&#xf002;&nbsp;&nbsp;Search"></div> <div *ngIf="totalRecents === 0" class="col-auto pt-3"><input type="text" class="d-flex ml-auto" placeholder="&nbsp;&nbsp;&#xf002;&nbsp;&nbsp;Search"></div>
<app-recent-edited-activity (totalCountRecentEdited)="onCountAllRecent($event)"></app-recent-edited-activity> <app-recent-edited-activity (totalCountRecentEdited)="onCountAllRecent($event)"></app-recent-edited-activity>
<div *ngIf="totalRecents === 0" class="empty-list">{{'DASHBOARD.EMPTY-LIST' | translate}}</div>
</mat-tab> </mat-tab>
<mat-tab label="{{'DASHBOARD.DRAFTS' | translate}} ({{this.totalDraftDatasets}})"> <mat-tab label="{{'DASHBOARD.DRAFTS' | translate}} ({{totalDraftDatasets}})">
<div class="col-auto pt-3"><input type="text" class="d-flex ml-auto" placeholder="&nbsp;&nbsp;&#xf002;&nbsp;&nbsp;Search"></div> <div *ngIf="totalDraftDatasets === 0" class="col-auto pt-3"><input type="text" class="d-flex ml-auto" placeholder="&nbsp;&nbsp;&#xf002;&nbsp;&nbsp;Search"></div>
<app-drafts (totalCountDraftDatasets)="onCountDraftDatasets($event)"></app-drafts> <app-drafts (totalCountDraftDatasets)="onCountDraftDatasets($event)"></app-drafts>
<div *ngIf="totalDraftDatasets === 0" class="empty-list">{{'DASHBOARD.EMPTY-LIST' | translate}}</div>
</mat-tab> </mat-tab>
<mat-tab label="{{'DASHBOARD.DMPS' | translate}} ({{this.totalDmps}})"> <mat-tab label="{{'DASHBOARD.DMPS' | translate}} ({{totalDmps}})">
<div class="col-auto pt-3"><input type="text" class="d-flex ml-auto" placeholder="&nbsp;&nbsp;&#xf002;&nbsp;&nbsp;Search"></div> <div *ngIf="totalDmps === 0" class="col-auto pt-3"><input type="text" class="d-flex ml-auto" placeholder="&nbsp;&nbsp;&#xf002;&nbsp;&nbsp;Search"></div>
<app-recent-edited-dmp-activity (totalCountDmps)="onCountDmps($event)"></app-recent-edited-dmp-activity> <app-recent-edited-dmp-activity (totalCountDmps)="onCountDmps($event)"></app-recent-edited-dmp-activity>
<div *ngIf="totalDmps === 0" class="empty-list">{{'DASHBOARD.EMPTY-LIST' | translate}}</div>
</mat-tab> </mat-tab>
<mat-tab label="{{'DASHBOARD.DATASET-DESCRIPTIONS' | translate}} ({{this.totalDatasets}})"> <mat-tab label="{{'DASHBOARD.DATASET-DESCRIPTIONS' | translate}} ({{totalDatasets}})">
<div class="col-auto pt-3"><input type="text" class="d-flex ml-auto" placeholder="&nbsp;&nbsp;&#xf002;&nbsp;&nbsp;Search"></div> <div *ngIf="totalDatasets === 0" class="col-auto pt-3"><input type="text" class="d-flex ml-auto" placeholder="&nbsp;&nbsp;&#xf002;&nbsp;&nbsp;Search"></div>
<app-recent-edited-dataset-activity (totalCountDatasets)="onCountDatasets($event)"></app-recent-edited-dataset-activity> <app-recent-edited-dataset-activity (totalCountDatasets)="onCountDatasets($event)"></app-recent-edited-dataset-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" [routerLink]="['/datasets/new']">
<mat-icon>add</mat-icon> {{'DASHBOARD.ACTIONS.ADD-DATASET' | translate}}
</button>
</div>
</mat-tab> </mat-tab>
</mat-tab-group> </mat-tab-group>
</div> </div>

View File

@ -307,6 +307,29 @@ input[type="text"] {
padding: 0rem 7em 4rem 3rem; padding: 0rem 7em 4rem 3rem;
} }
.empty-list {
color: #212121;
font-size: 1.25rem;
font-weight: 300;
letter-spacing: 0px;
color: #212121;
opacity: 0.6;
display: flex;
padding-top: 4.68rem;
justify-content: center;
}
.add-dataset {
width: 142px;
height: 40px;
background: #f7dd72 0% 0% no-repeat padding-box;
box-shadow: 0px 3px 6px #1e202029;
border-radius: 30px;
opacity: 1;
margin-top: 2.5rem;
margin-bottom: 1.5rem;
}
::ng-deep .mat-tab-group.mat-primary .mat-ink-bar, ::ng-deep .mat-tab-group.mat-primary .mat-ink-bar,
.mat-tab-nav-bar.mat-primary .mat-ink-bar { .mat-tab-nav-bar.mat-primary .mat-ink-bar {
background: #129d99; background: #129d99;

View File

@ -1141,10 +1141,14 @@
"GRANTS": "Grants", "GRANTS": "Grants",
"RELATED-ORGANISATIONS": "Related Organisations", "RELATED-ORGANISATIONS": "Related Organisations",
"DRAFTS": "Drafts", "DRAFTS": "Drafts",
"ALL": "All",
"EMPTY-LIST": "Nothing here yet.",
"LATEST-ACTIVITY": "Latest Activity",
"DMP-ABOUT-BEG": "A DMP in Argos consists of key information about research, such as purpose, objectives and researchers involved, but also about documentation of research datasets, namely", "DMP-ABOUT-BEG": "A DMP in Argos consists of key information about research, such as purpose, objectives and researchers involved, but also about documentation of research datasets, namely",
"DMP-ABOUT-END": ", that highlight the steps followed and the means used across data management activities.", "DMP-ABOUT-END": ", that highlight the steps followed and the means used across data management activities.",
"ACTIONS": { "ACTIONS": {
"ADD-DATASET-DESCRIPTION": "Add Dataset Description", "ADD-DATASET-DESCRIPTION": "Add Dataset Description",
"ADD-DATASET": "Add Dataset",
"ADD-DMP-DESCRIPTION": "Add DMP Description" "ADD-DMP-DESCRIPTION": "Add DMP Description"
} }
}, },

View File

@ -1128,8 +1128,12 @@
"GRANTS": "Subvenciones", "GRANTS": "Subvenciones",
"RELATED-ORGANISATIONS": "Organizaciones Relacionadas", "RELATED-ORGANISATIONS": "Organizaciones Relacionadas",
"DRAFTS": "Borradores", "DRAFTS": "Borradores",
"ALL": "All",
"LATEST-ACTIVITY": "Latest Activity",
"EMPTY-LIST": "Nothing here yet.",
"ACTIONS": { "ACTIONS": {
"ADD-DATASET-DESCRIPTION": "Agregar Dataset Descripción", "ADD-DATASET-DESCRIPTION": "Agregar Dataset Descripción",
"ADD-DATASET": "Add Dataset",
"ADD-DMP-DESCRIPTION": "Agregar DMP Descripción" "ADD-DMP-DESCRIPTION": "Agregar DMP Descripción"
} }
}, },

View File

@ -1116,8 +1116,12 @@
"GRANTS": "Grants", "GRANTS": "Grants",
"RELATED-ORGANISATIONS": "Σχετικοί Οργανισμοί", "RELATED-ORGANISATIONS": "Σχετικοί Οργανισμοί",
"DRAFTS": "Προσχέδια", "DRAFTS": "Προσχέδια",
"ALL": "Όλα",
"LATEST-ACTIVITY": "Latest Activity",
"EMPTY-LIST": "Nothing here yet.",
"ACTIONS": { "ACTIONS": {
"ADD-DATASET-DESCRIPTION": "Προσθήκη Περιγραφή Dataset", "ADD-DATASET-DESCRIPTION": "Προσθήκη Περιγραφή Dataset",
"ADD-DATASET": "Add Dataset",
"ADD-DMP-DESCRIPTION": "Προσθήκη Περιγραφή DMP" "ADD-DMP-DESCRIPTION": "Προσθήκη Περιγραφή DMP"
} }
}, },