Fixed Bootstrap Grid System

This commit is contained in:
apapachristou 2019-05-27 12:16:52 +03:00
parent 9d40ffde63
commit 23d85d0275
3 changed files with 183 additions and 182 deletions

View File

@ -1,101 +1,100 @@
<div class="main-content">
<div class="container-fluid">
<div *ngIf="dmp" class="card col-12">
<div class="card-header card-header-plain d-flex">
<div class="card-desc d-flex flex-column justify-content-center">
<h4 class="card-title">{{ dmp.label }}</h4>
</div>
<div class="d-flex ml-auto p-2">
<button mat-icon-button [matMenuTriggerFor]="actionsMenu" class="ml-auto more-icon"
(click)="$event.stopImmediatePropagation();">
<mat-icon class="more-horiz">more_horiz</mat-icon>
</button>
<mat-menu #actionsMenu="matMenu">
<button mat-menu-item *ngIf="!isPublic" (click)="newVersion(dmp.id, dmp.label)">
<mat-icon>queue</mat-icon>{{'DMP-LISTING.ACTIONS.NEW-VERSION' | translate}}
<div *ngIf="dmp" class="card">
<form *ngIf="formGroup" (ngSubmit)="formSubmit()">
<div class="card-header card-header-plain d-flex">
<div class="card-desc d-flex flex-column justify-content-center">
<h4 class="card-title">{{ dmp.label }}</h4>
</div>
<div class="d-flex ml-auto p-2">
<button mat-icon-button [matMenuTriggerFor]="actionsMenu" class="ml-auto more-icon"
(click)="$event.stopImmediatePropagation();">
<mat-icon class="more-horiz">more_horiz</mat-icon>
</button>
<button mat-menu-item *ngIf="!isPublic" (click)="viewVersions(dmp.groupId, dmp.label)">
<mat-icon>library_books</mat-icon>{{'DMP-LISTING.ACTIONS.VIEW-VERSION' | translate}}
</button>
<button mat-menu-item (click)="clone(dmp.id)" class="menu-item">
<mat-icon>add</mat-icon>{{ 'DMP-LISTING.ACTIONS.CLONE' | translate }}
</button>
<button mat-menu-item (click)="delete()" class="menu-item">
<mat-icon>delete</mat-icon>{{ 'DMP-LISTING.ACTIONS.DELETE' | translate }}
</button>
<button mat-menu-item (click)="advancedClicked()" class="menu-item">
<mat-icon>save_alt</mat-icon>{{ 'DMP-LISTING.ACTIONS.ADV-EXP' | translate }}
</button>
</mat-menu>
<button mat-raised-button color="primary" (click)="downloadPDF(dmp.id)"
class="lightblue-btn ml-2 text-uppercase">
<mat-icon>save_alt</mat-icon> {{ 'DMP-LISTING.ACTIONS.EXPORT' | translate }}
</button>
</div>
</div>
<div class="row d-flex flex-column">
<mat-tab-group class="col-12 mt-3">
<mat-tab>
<ng-template mat-tab-label class="tab-label">
<i class="material-icons-outlined mr-2">view_agenda</i>
{{ 'SIDE-BAR.GENERAL' | translate }}
</ng-template>
<!-- <div class="row"> -->
<app-general-tab [formGroup]="formGroup"></app-general-tab>
<!-- </div> -->
<!-- <form *ngIf="formGroup" (ngSubmit)="formSubmit()" [formGroup]="formGroup"></form> -->
</mat-tab>
<mat-tab>
<ng-template mat-tab-label>
<mat-icon class="mr-2">work_outline</mat-icon>
{{ 'DMP-LISTING.COLUMNS.PROJECT' | translate }}
</ng-template>
</mat-tab>
<mat-tab>
<ng-template mat-tab-label>
<mat-icon class="mr-2">library_books</mat-icon>
{{ 'DMP-LISTING.COLUMNS.DATASETS' | translate }}
</ng-template>
</mat-tab>
<mat-tab>
<ng-template mat-tab-label>
<mat-icon class="mr-2">person</mat-icon>
{{ 'DMP-LISTING.COLUMNS.PEOPLE' | translate }}
</ng-template>
</mat-tab>
<mat-tab>
<ng-template mat-tab-label>
<mat-icon class="mr-2">settings</mat-icon>
{{ 'DMP-LISTING.ACTIONS.SETTINGS' | translate }}
</ng-template>
</mat-tab>
</mat-tab-group>
<div class="col-12 d-flex justify-content-end pt-2 pb-4">
<div>
<button mat-raised-button color="primary" (click)="cancel(dmp.id)" type="button"
class="lightblue-btn text-uppercase mr-2">
{{'DMP-EDITOR.ACTIONS.CANCEL' | translate}}
<mat-menu #actionsMenu="matMenu">
<button mat-menu-item *ngIf="!isPublic" (click)="newVersion(dmp.id, dmp.label)">
<mat-icon>queue</mat-icon>{{'DMP-LISTING.ACTIONS.NEW-VERSION' | translate}}
</button>
<button mat-menu-item *ngIf="!isPublic" (click)="viewVersions(dmp.groupId, dmp.label)">
<mat-icon>library_books</mat-icon>{{'DMP-LISTING.ACTIONS.VIEW-VERSION' | translate}}
</button>
<button mat-menu-item (click)="clone(dmp.id)" class="menu-item">
<mat-icon>add</mat-icon>{{ 'DMP-LISTING.ACTIONS.CLONE' | translate }}
</button>
<button mat-menu-item (click)="delete()" class="menu-item">
<mat-icon>delete</mat-icon>{{ 'DMP-LISTING.ACTIONS.DELETE' | translate }}
</button>
<button mat-menu-item (click)="advancedClicked()" class="menu-item">
<mat-icon>save_alt</mat-icon>{{ 'DMP-LISTING.ACTIONS.ADV-EXP' | translate }}
</button>
</mat-menu>
<button mat-raised-button color="primary" (click)="downloadPDF(dmp.id)"
class="lightblue-btn ml-2 text-uppercase">
<mat-icon>save_alt</mat-icon> {{ 'DMP-LISTING.ACTIONS.EXPORT' | translate }}
</button>
</div>
<!-- <div class="col"></div> -->
<!-- <div class="col-auto" *ngIf="!isNew && this.formGroup.enabled">
</div>
<div class="d-flex flex-column">
<mat-tab-group class="mt-3">
<mat-tab>
<ng-template mat-tab-label class="tab-label">
<i class="material-icons-outlined mr-2">view_agenda</i>
{{ 'SIDE-BAR.GENERAL' | translate }}
</ng-template>
<app-general-tab [formGroup]="formGroup"></app-general-tab>
</mat-tab>
<mat-tab>
<ng-template mat-tab-label>
<mat-icon class="mr-2">work_outline</mat-icon>
{{ 'DMP-LISTING.COLUMNS.PROJECT' | translate }}
</ng-template>
</mat-tab>
<mat-tab>
<ng-template mat-tab-label>
<mat-icon class="mr-2">library_books</mat-icon>
{{ 'DMP-LISTING.COLUMNS.DATASETS' | translate }}
</ng-template>
</mat-tab>
<mat-tab>
<ng-template mat-tab-label>
<mat-icon class="mr-2">person</mat-icon>
{{ 'DMP-LISTING.COLUMNS.PEOPLE' | translate }}
</ng-template>
</mat-tab>
<mat-tab>
<ng-template mat-tab-label>
<mat-icon class="mr-2">settings</mat-icon>
{{ 'DMP-LISTING.ACTIONS.SETTINGS' | translate }}
</ng-template>
</mat-tab>
</mat-tab-group>
<div class="d-flex justify-content-end pt-2 pb-4 pl-2 pr-2">
<div>
<button mat-raised-button color="primary" (click)="cancel(dmp.id)" type="button"
class="lightblue-btn text-uppercase mr-2">
{{'DMP-EDITOR.ACTIONS.CANCEL' | translate}}
</button>
</div>
<!-- <div class="col"></div> -->
<!-- <div class="col-auto" *ngIf="!isNew && this.formGroup.enabled">
<button mat-raised-button color="primary" type="button" (click)="delete()">
{{'DMP-EDITOR.ACTIONS.DELETE' | translate}}
</button>
</div> -->
<div *ngIf="this.formGroup.enabled">
<button mat-raised-button color="primary" type="submit"
class="lightblue-btn text-uppercase mr-2">{{'DMP-EDITOR.ACTIONS.SAVE' | translate}}
</button>
</div>
<div *ngIf="dmp.lockable && this.formGroup.enabled">
<button type="button" mat-raised-button color="primary" class="lightblue-btn text-uppercase"
(click)="saveAndFinalize()">{{'DMP-EDITOR.ACTIONS.FINALISE' | translate}}
</button>
<div *ngIf="this.formGroup.enabled">
<button mat-raised-button color="primary" type="submit"
class="lightblue-btn text-uppercase mr-2">{{'DMP-EDITOR.ACTIONS.SAVE' | translate}}
</button>
</div>
<div *ngIf="dmp.lockable && this.formGroup.enabled">
<button type="button" mat-raised-button color="primary" class="lightblue-btn text-uppercase"
(click)="saveAndFinalize()">{{'DMP-EDITOR.ACTIONS.FINALISE' | translate}}
</button>
</div>
</div>
</div>
</div>
</form>
</div>
</div>
</div>

View File

@ -1,28 +1,29 @@
<div class="row" [formGroup]="formGroup">
<div class="col-9 pt-4 pb-4">
<div class="row">
<mat-form-field class="col-8">
<input matInput placeholder="{{'DMP-EDITOR.FIELDS.NAME' | translate}}" type="text" name="label"
formControlName="label" required>
<mat-error *ngIf="formGroup.get('label').hasError('backendError')">
{{formGroup.get('label').getError('backendError').message}}</mat-error>
<mat-error *ngIf="formGroup.get('label').hasError('required')">
{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
</mat-form-field>
</div>
<div class="row">
<mat-form-field class="col-8">
<textarea matInput class="description-area"
placeholder="{{'DMP-EDITOR.FIELDS.DESCRIPTION' | translate}}" formControlName="description">
<div class="container-fluid">
<div class="row" [formGroup]="formGroup">
<div class="col-9 pt-4 pb-4 pl-4">
<div class="row">
<mat-form-field class="col-8">
<input matInput placeholder="{{'DMP-EDITOR.FIELDS.NAME' | translate}}" type="text" name="label"
formControlName="label" required>
<mat-error *ngIf="formGroup.get('label').hasError('backendError')">
{{formGroup.get('label').getError('backendError').message}}</mat-error>
<mat-error *ngIf="formGroup.get('label').hasError('required')">
{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
</mat-form-field>
</div>
<div class="row">
<mat-form-field class="col-8">
<textarea matInput class="description-area"
placeholder="{{'DMP-EDITOR.FIELDS.DESCRIPTION' | translate}}" formControlName="description">
</textarea>
<!-- <mat-error *ngIf="formGroup.get('description').hasError('backendError')">
<!-- <mat-error *ngIf="formGroup.get('description').hasError('backendError')">
{{formGroup.get('description').getError('backendError').message}}</mat-error>
<mat-error *ngIf="formGroup.get('description').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' |
translate}}</mat-error> -->
</mat-form-field>
</div>
<div class="row">
<!-- <mat-form-field class="col-8">
</mat-form-field>
</div>
<div class="row">
<!-- <mat-form-field class="col-8">
<app-single-auto-complete required='true' [formControl]="formGroup.get('project')"
placeholder="{{this.languageResolverService.getBy('dmpEditor') | translate}}"
[configuration]="projectAutoCompleteConfiguration">
@ -32,69 +33,69 @@
<mat-error *ngIf="formGroup.get('project').hasError('required')">
{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
</mat-form-field> -->
<!-- <app-dynamic-fields-project [formGroup]="formGroup"></app-dynamic-fields-project> -->
</div>
<div class="row">
<mat-form-field class="col-8">
<app-multiple-auto-complete required='true' [formControl]="formGroup.get('profiles')"
placeholder="{{'DMP-EDITOR.FIELDS.DATASET-TEMPLATES' | translate}}"
[configuration]="profilesAutoCompleteConfiguration">
</app-multiple-auto-complete>
<mat-error *ngIf="formGroup.get('profiles').hasError('backendError')">
{{formGroup.get('profiles').getError('backendError').message}}</mat-error>
<mat-error *ngIf="formGroup.get('profiles').hasError('required')">
{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
<button matSuffix mat-icon-button type="button" [disabled]="formGroup.get('profiles').disabled"
(click)="availableProfiles()">
<mat-icon class="icon-btn">view_list</mat-icon>
</button>
</mat-form-field>
<!-- <button mat-button (click)="availableProfiles()">View All</button> -->
</div>
<div class="row">
<mat-form-field class="col-8">
<app-multiple-auto-complete [formControl]="formGroup.get('organisations')"
placeholder="{{'DMP-EDITOR.FIELDS.ORGANISATIONS' | translate}}"
[configuration]="organisationsAutoCompleteConfiguration">
</app-multiple-auto-complete>
<mat-error *ngIf="formGroup.get('organisations').hasError('backendError')">
{{formGroup.get('organisations').getError('backendError').message}}</mat-error>
<mat-error *ngIf="formGroup.get('organisations').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' |
<!-- <app-dynamic-fields-project [formGroup]="formGroup"></app-dynamic-fields-project> -->
</div>
<div class="row">
<mat-form-field class="col-8">
<app-multiple-auto-complete required='true' [formControl]="formGroup.get('profiles')"
placeholder="{{'DMP-EDITOR.FIELDS.DATASET-TEMPLATES' | translate}}"
[configuration]="profilesAutoCompleteConfiguration">
</app-multiple-auto-complete>
<mat-error *ngIf="formGroup.get('profiles').hasError('backendError')">
{{formGroup.get('profiles').getError('backendError').message}}</mat-error>
<mat-error *ngIf="formGroup.get('profiles').hasError('required')">
{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
<button matSuffix mat-icon-button type="button" [disabled]="formGroup.get('profiles').disabled"
(click)="availableProfiles()">
<mat-icon class="icon-btn">view_list</mat-icon>
</button>
</mat-form-field>
<!-- <button mat-button (click)="availableProfiles()">View All</button> -->
</div>
<div class="row">
<mat-form-field class="col-8">
<app-multiple-auto-complete [formControl]="formGroup.get('organisations')"
placeholder="{{'DMP-EDITOR.FIELDS.ORGANISATIONS' | translate}}"
[configuration]="organisationsAutoCompleteConfiguration">
</app-multiple-auto-complete>
<mat-error *ngIf="formGroup.get('organisations').hasError('backendError')">
{{formGroup.get('organisations').getError('backendError').message}}</mat-error>
<mat-error *ngIf="formGroup.get('organisations').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' |
translate}}</mat-error>
</mat-form-field>
</div>
<div class="row">
<mat-form-field class="col-8">
<app-multiple-auto-complete [formControl]="formGroup.get('researchers')"
placeholder="{{'DMP-EDITOR.FIELDS.RESEARCHERS' | translate}}"
[configuration]="researchersAutoCompleteConfiguration">
</app-multiple-auto-complete>
<mat-error *ngIf="formGroup.get('researchers').hasError('backendError')">
{{formGroup.get('researchers').getError('backendError').message}}</mat-error>
<mat-error *ngIf="formGroup.get('researchers').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' |
</mat-form-field>
</div>
<div class="row">
<mat-form-field class="col-8">
<app-multiple-auto-complete [formControl]="formGroup.get('researchers')"
placeholder="{{'DMP-EDITOR.FIELDS.RESEARCHERS' | translate}}"
[configuration]="researchersAutoCompleteConfiguration">
</app-multiple-auto-complete>
<mat-error *ngIf="formGroup.get('researchers').hasError('backendError')">
{{formGroup.get('researchers').getError('backendError').message}}</mat-error>
<mat-error *ngIf="formGroup.get('researchers').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' |
translate}}</mat-error>
<button matSuffix mat-icon-button [disabled]="formGroup.get('researchers').disabled" type="button"
(click)="addResearcher()">
<mat-icon class="icon-btn">add_circle</mat-icon>
</button>
</mat-form-field>
<!-- <h4 mat-subheader class="col-12">{{'DMP-EDITOR.FIELDS.PROFILE' | translate}}</h4> -->
</div>
<div class="row">
<mat-form-field class="col-8">
<app-single-auto-complete [required]='false' [formControl]="formGroup.get('profile')"
placeholder="{{'DMP-EDITOR.FIELDS.TEMPLATE' | translate}}"
[configuration]="dmpProfileAutoCompleteConfiguration">
</app-single-auto-complete>
</mat-form-field>
</div>
<button matSuffix mat-icon-button [disabled]="formGroup.get('researchers').disabled" type="button"
(click)="addResearcher()">
<mat-icon class="icon-btn">add_circle</mat-icon>
</button>
</mat-form-field>
<!-- <h4 mat-subheader class="col-12">{{'DMP-EDITOR.FIELDS.PROFILE' | translate}}</h4> -->
</div>
<div class="row">
<mat-form-field class="col-8">
<app-single-auto-complete [required]='false' [formControl]="formGroup.get('profile')"
placeholder="{{'DMP-EDITOR.FIELDS.TEMPLATE' | translate}}"
[configuration]="dmpProfileAutoCompleteConfiguration">
</app-single-auto-complete>
</mat-form-field>
</div>
<app-dynamic-dmp-field-resolver *ngIf="selectedDmpProfileDefinition" [formGroup]="formGroup"
[dmpProfileDefinition]="selectedDmpProfileDefinition">
</app-dynamic-dmp-field-resolver>
<app-dynamic-dmp-field-resolver *ngIf="selectedDmpProfileDefinition" [formGroup]="formGroup"
[dmpProfileDefinition]="selectedDmpProfileDefinition">
</app-dynamic-dmp-field-resolver>
<!-- Associates Users -->
<!-- <div class="col-8">
<!-- Associates Users -->
<!-- <div class="col-8">
<mat-list *ngIf="associatedUsers?.length" role="list" class="col-md-12">
<h3 mat-subheader>Associated Users</h3>
<mat-list-item role="listitem" *ngFor="let user of associatedUsers">
@ -103,21 +104,21 @@
</mat-list-item>
</mat-list>
</div> -->
</div>
</div>
<!-- Versioning Container-->
<div class='col-3'>
<div class='row version-menu'>
<mat-form-field class="col-auto">
<input matInput placeholder="Version" disabled
[value]="formGroup.get('version').value== undefined ?0 :formGroup.get('version').value">
</mat-form-field>
<!-- <app-dynamic-dmp-field-resolver *ngIf="dmp.definition" class="col-md-12" [formGroup]="formGroup" [dmpProfileDefinition]=dmp.definition></app-dynamic-dmp-field-resolver> -->
<div class="col-auto mb-2">
Versioning is automated.
</div>
<!-- Versioning Actions -->
<!-- <div class="col-auto d-flex align-content-center mb-1" style="cursor: pointer;">
<!-- Versioning Container-->
<div class="col-3">
<div class='row version-menu'>
<mat-form-field class="col-auto">
<input matInput placeholder="Version" disabled
[value]="formGroup.get('version').value== undefined ?0 :formGroup.get('version').value">
</mat-form-field>
<!-- <app-dynamic-dmp-field-resolver *ngIf="dmp.definition" class="col-md-12" [formGroup]="formGroup" [dmpProfileDefinition]=dmp.definition></app-dynamic-dmp-field-resolver> -->
<div class="col-auto mb-2">
Versioning is automated.
</div>
<!-- Versioning Actions -->
<!-- <div class="col-auto d-flex align-content-center mb-1" style="cursor: pointer;">
<mat-icon>edit</mat-icon>
<span>Click here to edit</span>
</div>
@ -125,6 +126,7 @@
<mat-icon>history</mat-icon>
Click here to view previous versions
</div> -->
</div>
</div>
</div>
</div>

View File

@ -1,6 +1,6 @@
<div class="main-content">
<div class="container-fluid">
<div *ngIf="dmp" class="card col-12 pb-4">
<div *ngIf="dmp" class="card pb-4">
<div class="card-header card-header-plain d-flex">
<div class="card-desc d-flex flex-column justify-content-center">
<h4 class="card-title">{{ dmp.label }}</h4>